Increase limit on email forwards, SOGo / dovecot


(Ben Pittman) #1

NethServer Version: 7.5
Module: SOGo / dovecot

I am using email forwarding in SOGo to distribute emails to a group of 30ish people. My test with 3 or 4 forwards works, but the larger groups do not send. I located the .dovecot.sieve.log, which told me there was a maximum of 4 forwards allowed. When I went to edit the dovecot.conf file, I see that i should not edit it! Where can i change this setting so i can forward to my 30 recipients through a single forward?

(Stéphane de Labrusse) #2

You need to create a custom template,

What is the setting you want to modify, maybe the default value is not enough

(Davide Principi) #3

Steph is right. As alternative you can configure a mail alias with multiple recipients.

What do you want to achieve? Why sieve?

Could you describe the issue with an example?

(Ben Pittman) #4

Thanks! this looks like exactly what I need to do. This is my first attempt at trying to migrate a client from SBS 2013 to Nethserver. In exchange we create distribution lists. You can email the distribution list name, and anyone in that list gets a copy of the email. I decided to use email forwards to accomplish the same thing via SOGo, but the distribution lists contain 20-30 emails each.

The dovecot.seive.log for the email address that serves as a distribution list says: “main script: line 5: error: number of redirect actions exceeds policy limit (5 >4).” I am interpreting this to mean that the system will not forward an email to more than 4 other email addresses.

the solution I found says to add this:

sieve_max_redirects = 25

in dovecot.conf file and restart dovecot.

(Ben Pittman) #5

Thank you for the help! I am loving working on Nethserver, it is extremely well done. but I have a steep learning curve. The goal was to create a way to allow end users (teachers at a k-5 school) to edit their own email list of parents. (in Exchange this is called a distribution list) I could not see a way for teachers to edit an alias every semester, so I decided that an email forward would be a method they could edit themselves. Is there a better way to accomplish this?

I tested email forwards with 3 email addresses in an account and all worked well. the full list does not send.

(Davide Principi) #6

In this scenario I agree with your solution. To correctly put the sieve_max_redirects in dovecot configuration, follow the link provided by Stephane above:

(Ben Pittman) #7

If I understand the manual correctly, I should edit /etc/e-smith/templates/etc/dovecot/dovecot.conf ?

(Ben Pittman) #8

I am not able to edit either /etc/e-smith/templates-custom/dovecot.conf or /etc/e-smith/templates/dovecot.conf?

I Am SSH 'd in as root, I see that the file dovecot.conf exists and I enter the following command: vi /etc/e-smith/templates-custom/dovecot.conf my fonts go from white to blue, and says I am creating a new file?

(Stéphane de Labrusse) #9

not exactly because when we will push a new rpm your changes will be erased

mkdir  -p /etc/e-smith/templates-custom/etc/dovecot/dovecot.conf
vim /etc/e-smith/templates-custom/etc/dovecot/dovecot.conf/50example

this will create custom template of an existant file /etc/e-smith/templates/etc/dovecot/dovecot.conf/50example

expand-template /etc/dovecot/dovecot.conf
systemctl restart dovecot


signal-event nethserver-mail-server-save

(Ben Pittman) #10

Thank you so much for your help. I want to make sure I understand what is happening here. This first line creates a directory called dovecot.conf. in the appropriate place. then the second line creates a file called 50example. then I add the following as the text in the file 50example

sieve_max_redirects = 55
:wq to save 50example

then run the commands to add this custom file to the dovecot template and restart dovecot?

(Stéphane de Labrusse) #11

you must copy and paste the full content of the file you want to modify, then modify the setting you want to adjust.

I do not know where is the setting you want to adjust, find it in the dovecot template

keep us in touch

(Ben Pittman) #12

Hi Stephane,

I copied the dovecot.conf file from etc/dovecot into the created directory under custom templates, added my one line into the plugins section, then ran the expand template command. this generated a ton of errors. I am assuming that the errors mean it will NOT apply the changes to the conf file? expand%20%20error
In viewing the errors, it looks like I somehow managed to get 2 /'s before the etc and that may be the source of the problem?

(Markus Neuberger) #13

You have to copy the relevant file from /etc/e-smith/templates/etc/dovecot/ like

cp /etc/e-smith/templates/etc/dovecot/dovecot.conf/00example /etc/e-smith/templates-custom/etc/dovecot/dovecot.conf/

and edit the template-custom it to fit your needs.

Notice that copying should only be done if there’s no other way because a system update of the relevant fragment will not be applied.

(Ben Pittman) #14

Ok, now I think I comprehend. all of the files in /etc/e-smith/templates/etc/dovecot/dovecot.conf/ create what would normally be in the dovecot.conf.
After a few hours of testing adding the appropriate settings with no luck, I think that using aliases it the pragmatic best solution.

(Stéphane de Labrusse) #15

Yes sometimes, create a custom-template needs some programmer’s skill, you need to play with perl