I am having a problem forwarding emails using custom rules. ISPconfig 3 - Amazon EC2 server using dovecot and roundcube. I want to forward the email and keep it in the original email inbox. I followed the steps detailed here, https://www.faqforge.com/linux/cont...-copys-of-incoming-emails-to-other-mailboxes/, for sieve with both single quotes and double quotes but while the email lands in the sent to mailbox it does not get forwarded on to the addresses in the custom rule. Custom rule has the following: redirect [email protected]'; keep; I am sending to an email in the same domain but have also tried to redirect to a domain not on the same server but no luck. Thanks. Here is a section of the mail.log Mar 21 14:43:02 ip-172-31-25-207 postfix/smtpd[25045]: connect from localhost[127.0.0.1] Mar 21 14:43:02 ip-172-31-25-207 dovecot: auth: Debug: auth client connected (pid=0) Mar 21 14:43:02 ip-172-31-25-207 postfix/smtpd[25045]: 1ABC64201A: client=localhost[127.0.0.1] Mar 21 14:43:02 ip-172-31-25-207 postfix/cleanup[25029]: 1ABC64201A: message-id=<CALN4Np9mCpbFaLp6fQ=[email protected]> Mar 21 14:43:02 ip-172-31-25-207 postfix/qmgr[1841]: 1ABC64201A: from=<[email protected]>, size=4139, nrcpt=1 (queue active) Mar 21 14:43:02 ip-172-31-25-207 postfix/smtpd[25045]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5 Mar 21 14:43:02 ip-172-31-25-207 amavis[29669]: (29669-10) Passed CLEAN {RelayedInbound}, [209.85.161.172]:43418 [209.85.161.172] <[email protected]>-> <[email protected]>, Queue-ID: 1E1EF3F236, Message-ID: <CALN4Np9mCpbFaLp6fQ=[email protected]>, mail_id: LfvfHhuWlf03, Hits: -0.018, size: 3482, queued_as: 1ABC64201A, dkim_sd=20150623utsidedomain-com.20150623.gappssmtp.com, 850 ms Mar 21 14:43:02 ip-172-31-25-207 postfix/smtp[25030]: 1E1EF3F236: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.1, delays=0.27/0.01/0/0.85, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 1ABC64201A) Mar 21 14:43:02 ip-172-31-25-207 postfix/qmgr[1841]: 1E1EF3F236: removed Mar 21 14:43:02 ip-172-31-25-207 dovecot: auth: Debug: master in: USER#0111#[email protected]#011service=lda Mar 21 14:43:02 ip-172-31-25-207 dovecot: auth: Debug: prefetch([email protected]): passdb didn't return userdb entries, trying the next userdb Mar 21 14:43:02 ip-172-31-25-207 dovecot: auth-worker(24711): Debug: sql([email protected]): SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '[email protected]' OR email = '[email protected]') AND `disablelda` = 'n' AND server_id = '1' Mar 21 14:43:02 ip-172-31-25-207 dovecot: auth: Debug: userdb out: USER#0111#011usertobeforwarded@addresscom#011home=/var/vmail/address.com/themurphys#011mail=maildir:/var/vmail/address.com/usertobeforwarded/Maildir#011uid=5000#011gid=5000#011quota_rule=*:storage=0B#011sieve=/var/vmail/address.com/usertobeforwarded/.sieve Mar 21 14:43:02 ip-172-31-25-207 dovecot: lda([email protected]): msgid=<CALN4Np9mCpbFaLp6fQ=[email protected]>: saved mail to INBOX Mar 21 14:43:02 ip-172-31-25-207 postfix/pipe[25047]: 1ABC64201A: to=<[email protected]>, relay=dovecot, delay=0.06, delays=0.01/0.01/0/0.04, dsn=2.0.0, status=sent (delivered via dovecot service) Mar 21 14:43:02 ip-172-31-25-207 postfix/qmgr[1841]: 1ABC64201A: removed
Sorry it is actually there in the rules I must have stepped on it when scrubbing the actual address, redirect '[email protected]'; keep;
Check /var/vmail/domain/user/.sieve.log for errors/clues. Maybe post the contents of the .sieve file in that same directory.
Thanks for the suggestion. I do not see a log file, /var/vmail/domain/user/ only contains ispconfig.sieve. Is it possible sieve is not being triggered? The query within the logs already submitted seem to indicate same.
Here you go. Thanks require ["fileinto", "regex", "date", "relational", "vacation"]; redirect '[email protected]'; keep;
So the forward address is in the file as it should be and your debug output shows that dovecot is aware of the sieve file sieve=/var/vmail/address.com/usertobeforwarded/.sieve, so the forwarding should happen.
Earlier on it was suggested to check the .sieve.log for errors/clues. Is the fact that this log does not exist an indication that the forwarding is not happening?
Not really, as far as I know, this log gets created only when an error occurs, so no such log is a good sign.
So if the configuration is correct and the lack of a log file suggests no errors, any ideas on next steps to work out why the emails do not appear to be redirected?
maybe set `sieve_trace_level=actions` or such, see https://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration#Trace_Debugging You might remove /var/vmail/address.com/usertobeforwarded/.sieve.svbin to ensure it is recreated, or at least check ownership/permissions (it's vmail:vmail, mode 644 on a system here, fwiw).
Thanks Jesse - We're still coming up empty here. Tried that link to turn on trace logging, to no avail. There is no file ".sieve.svbin"; the only file in the usertobeforwarded dir is .sieve, which is a link to usertobeforwarded/sieve/ispconfig.sieve Everything we're looking at seems to imply that the .sieve file considered (it is cited in the logs when expected), but no action is ever taken. syslog and mail.log show no entries relating to any send after the sieve (the forward), nor do they show any related errors. There are no sieve logs being created. Permissions are wide open (for the moment), 0755/vmail:vmail. Are there any general settings that would cause any sieve directives to be ignored? Any suggestions you can offer sure would be appreciated. Cheers ~
I know this thread is old but I'm having the same problem and have spent days on it. I did the last command that was suggested and fixed Gary's issue (same issue as mine). grep mail_plugins /etc/dovecot/dovecot.conf What I got back was; root@server:/var/mail# grep mail_plugins /etc/dovecot/dovecot.conf mail_plugins = quota mail_plugins = $mail_plugins quota imap_quota mail_plugins = $mail_plugins quota mail_plugins = $mail_plugins sieve quota mail_plugins = $mail_plugins quota sieve root@server:/var/mail# My question is, this this look correct? I'm still pretty new to ISPconfig and it's been a big learning curve this past week. Any help/advice is appreciated.
You may want to create a new Thread then and post your .sieve filter, the relevant part of the mail.log when it should redirect and the .sieve.log if there is any.