Sieve forwarding not working

I can’t get sieve filters to “send a copy” to another email address.

This is a brand new installation of HestiaCP and I added sieve to the installation script.

I restored several users from my VestaCP server and noticed that managesieve rules were not in the same place so I manually moved and changed permissions and created sym links. Once I had the rules showing up in roundcube and I sent a test email that was properly put into a sub folder based on one of the rules, I THOUGHT it was working perfectly, but now I realize that the “Send a copy” rules where it should forward to a different email address are not working.

I’ve been reading all the forum messages for the past several hours but I can’t get it working.

What is wrong? I definitely might have not set a permission to a specific folder properly but I can’t figure out where.

Thanks!

Also, note that I am seeing these errors in the file:

/home/testingfilters/mail/domainname.com/testing/dovecot.sieve.log

redirect action: failed to check for duplicate forward: internal error occurred: refer to server log for more information.

Try this workaround (replace user by your actual user):

touch /home/user/.dovecot.lda-dupes
mkdir /home/user/.dovecot.lda-dupes.locks
chown user:user /home/user/.dovecot.lda-dupes*

If you want to know the reason for this, check this post:

1 Like

Thanks for the FAST reply!

Unfortunately, that didn’t make it work. I had already found your post and tried this, but just to be safe I tried it again, I ran this:

touch /home/testingfilters/.dovecot.lda-dupes
mkdir /home/testingfilters/.dovecot.lda-dupes.locks
chown testingfilters:testingfilters /home/testingfilters/.dovecot.lda-dupes*

Then I resent a test email, the only difference is that nothing shows up in:

/home/testingfilters/mail/domainname.com/testing/dovecot.sieve.log

But, it doesn’t forward still.

Any other log files I can look at?

You know what, I found these messages in the “/var/log/dovecot.log” file, but I can’t understand them

Jan 06 02:12:35 lda([email protected])<656906><//c/HXMLmWUKBgoAE4T90w>: Error: duplicate db: transaction: file_dotlock_open(/home/testingfilters/.dovecot.lda-dupes) failed: Permission denied
Jan 06 02:12:35 lda([email protected])<656906><//c/HXMLmWUKBgoAE4T90w>: Error: unlink(/home/testingfilters/.dovecot.lda-dupes) failed: Permission denied (in mail-duplicate.c:365)
Jan 06 02:12:35 lda([email protected])<656906><//c/HXMLmWUKBgoAE4T90w>: Info: sieve: msgid=[email protected]: redirect action: forwarded to [email protected]
Jan 06 02:12:35 lda([email protected])<656906><//c/HXMLmWUKBgoAE4T90w>: Info: sieve: msgid=[email protected]: stored mail into mailbox ‘INBOX’
Jan 06 02:12:35 lda([email protected])<656906><//c/HXMLmWUKBgoAE4T90w>: Error: duplicate db: transaction: file_dotlock_open(/home/testingfilters/.dovecot.lda-dupes) failed: Permission denied

OK, another update,

I changed the forwarding email address to a different [email protected] and it worked!

So, I think that workaround DID make it kinda work. Although the original forward to email address DID work with a sieve filter on vesta, so I don’t know why it doesn’t work now?

so, do I need to run the 3 commands:

touch /home/user/.dovecot.lda-dupes
mkdir /home/user/.dovecot.lda-dupes.locks
chown user:user /home/user/.dovecot.lda-dupes*

for every user I currently have? and then every user that I add in the future?

I’m probably way off in terms of the logs you sent, but you could try running /usr/local/hestia/install/upgrade/manual/install_sieve.sh to first uninstall and then reinstall Sieve

You can see what it does here: hestiacp/install/upgrade/manual/install_sieve.sh at main · hestiacp/hestiacp · GitHub

Just wanted to throw it in there :innocent:

Thanks CStangerup ! you aren’t way off. I had tried that command, I had found it in another conversation. It just shows:

transport = dovecot_virtual_delivery
dovecot_virtual_delivery:
Plugin allready enabled

So I think it is just solving a previous issue, which is fine, but didn’t help me. I think the 3 commands:

touch /home/user/.dovecot.lda-dupes
mkdir /home/user/.dovecot.lda-dupes.locks
chown user:user /home/user/.dovecot.lda-dupes*

Does solve the issue. I just hope this is made part of the hestiaCP updates because I won’t remember this in the future when I add new users.

1 Like