I would like to make it so that when mail arrives from a certain address, it is forwarded to another email address. The simple sieve redirect is not good, because it misses the SPF, DKIM check, because Sieve does not modify the email, so e.g. icloud and gmail thinks that it did not come from the original location. I thought I would use the pipe command to call a script that will generate a new one based on the original email, and so the correct DKIM, SPF, DMARC records will belong to it. However, I see this in the mail log: Error: sieve: Failed to compile script `/var/vmail/xyz.hu/nio/.ispconfig-before.sieve' I have set the following: /etc/dovecot/conf.d/90-sieve.conf sieve_extensions = +vnd.dovecot.execute sieve_plugins = sieve_extprograms /etc/dovecot/conf.d/90-sieve-extprograms.conf sieve_execute_bin_dir = /usr/lib/dovecot/sieve-pipe I created the sieve-pipe folder under /usr/lib/dovecot and added the push_notify_tickets.sh file. I added it under custom rules in the ipsconfig admin interface: Code: if allof ( address :comparator "i;ascii-casemap" :is "from" "[email protected]", header :comparator "i;ascii-casemap" :contains "subject" "[#" ) { pipe :copy "push_notify_tickets.sh"; setflag "\"; fileinto "INBOX.Tickets"; stop; } Restarted the dovecot.service -t. What have I missed?
This configuration file is not used by dovecot ISPConfig systems. Use the file 99-ispconfig-custom-config.conf instead.
I read it: https://forum.howtoforge.com/threads/new-handling-for-custom-postfix-and-dovecot-config.86559/ I made this file: /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master Code: plugin { sieve_extensions = +vnd.dovecot.execute sieve_plugins = sieve_extprograms } Then I copied cp /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master /etc/dovecot/conf.d/99-ispconfig-custom-config.conf and systemctl restart dovecot, but doesnt work: Error: sieve: .ispconfig-before: line 37: unknown command 'pipe' (only reported once at first occurrence) Error: sieve: .ispconfig-before: validation failed Error: sieve: Failed to compile script `/var/vmail/xyz.hu/nio/.ispconfig-before.sieve'
I'm not sure where you found that Dovecot has a pipe command. As far as I know, no such command exists in Dovecot sieve.
Ok, have not seen that yet. There are sevarl possibilities then, either its not included in the dovecot version you have installed or its not in the Debian/Ubuntu package you use or its still not right in the config, in this case you could try adding it to dovecot.conf directly.
That is doesnt help, because the dovecot.conf file contain the following line (last line): !include_try conf.d/99-ispconfig-custom-config.conf
I know that it contains that line. But maybe you created it with wrong permissions or whatever, that's why I suggested you to try to edit it in dovecot.conf directly.
I tried, but the same error. Anyway, the permission must be good, because I use a custom file like this for postfix and it works fine. Then I might let this problem go, because it seems that it is not feasible on ispconfig. Thanks for your help.
Your issue is not ISPConfig related. It's dovecot sieve and not ISPConfig that tells you that the command you used does not exist.
I found the solution. No need pipe extension. Edit /etc/dovecot/conf.d/90-sieve.conf file: Code: sieve_redirect_envelope_from = orig_recipient sieve_editheader_max_header_size = 4k Then restart dovecot service. After that, you just need to redirect command under sieve script and icloud will no longer block it, because it will contain normal SPF, DKIM data.