Procmail to Sieve translation
Hello,
I'm trying to move from procmail to dovecot sieve.
I found the translation script at http://www.dovecot.org/tools/procmail2sieve.pl It works well except the following use cases:
- ^From:.*myemail@mydomain.com.*
| formail -I"X-Priority: 2 (high)" -I"X-mydomain-com-seen: yes" |
$SENDMAIL -oi
myemail@mydomain2.com
myemail@mydomain3.com
:0c
- ^From:.*myemail@mydomain.com.* ! +1123456789@mysmsprovider.com
:0c
- ^(To|Cc|Bcc):.*myemail@mydomain.com.* ! myemail@mydomain2.com myemail@mydomain3.com
Is there a possibility to support these use cases (can be done manually)?
How does forwarding to another domain work at the deliver process?
:copy seems not to be supported, right?
Thank you.
Ciao, Gerhard
Hi Gerhard,
Am 28.06.2014 07:40, schrieb Gerhard Wiesinger:
I'm trying to move from procmail to dovecot sieve.
How does forwarding to another domain work at the deliver process?
:copy seems not to be supported, right?
http://wiki2.dovecot.org/Pigeonhole/Sieve/Examples#Mail_filtering_by_various...
if header :contains "subject" ["order", "buy"] { redirect "recipient@example.org"; }
Dovecot/Pigeonhole simply uses the sendmail executable or SMTP to reinject the redirected/forwarded mail:
See Dovecot Options
- sendmail_path (to send mail via pipe)
- submission_host (to send mail via smtp)
Regards Daniel
Dipl.-Inf. Daniel Parthey System Engineer Metaways Infosystems GmbH Pickhuben 2, D-20457 Hamburg
E-Mail: d.parthey@metaways.de Web: http://www.metaways.de Tel: +49 (0)40 317031-537 Fax: +49 (0)40 317031-937
Metaways Infosystems GmbH - Sitz: D-22967 Tremsbüttel Handelsregister: Amtsgericht Lübeck HRB 4508 AH Geschäftsführung: Hermann Thaele, Lüder-H.Thaele
On 28.06.2014 14:33, Daniel Parthey wrote:
Hi Gerhard,
Am 28.06.2014 07:40, schrieb Gerhard Wiesinger:
I'm trying to move from procmail to dovecot sieve.
How does forwarding to another domain work at the deliver process?
:copy seems not to be supported, right?
http://wiki2.dovecot.org/Pigeonhole/Sieve/Examples#Mail_filtering_by_various...
if header :contains "subject" ["order", "buy"] { redirect "recipient@example.org"; }
Dovecot/Pigeonhole simply uses the sendmail executable or SMTP to reinject the redirected/forwarded mail:
See Dovecot Options
- sendmail_path (to send mail via pipe)
- submission_host (to send mail via smtp)
Thank you.
As I'm new to sieve can someone verify the example translations?
################################################################################################################################################################
- ^From:.*myemail@mydomain.com.*
| formail -I"X-Priority: 2 (high)" -I"X-mydomain-com-seen: yes" |
$SENDMAIL -oi
myemail@mydomain2.com
myemail@mydomain3.com ################################################################################
http://www.emaildiscussions.com/showthread.php?t=57138
# http://tools.ietf.org/html/rfc5293 if header :contains ["from"] ["myemail@mydomain.com"] { addheader "X-Priority" "2 (high)"; addheader "X-mydomain-com-seen" "yes"; redirect :copy "myemail@mydomain2.com"; redirect "myemail@mydomain3.com"; } ################################################################################################################################################################ :0c
- ^From:.*myemail@mydomain.com.* ! +1123456789@mysmsprovider.com ################################################################################ if header :contains ["from"] ["myemail@mydomain.com"] { redirect "+1123456789@mysmsprovider.com"; } ################################################################################################################################################################ :0c
- ^(To|Cc|Bcc):.*myemail@mydomain.com.* ! myemail@mydomain2.com myemail@mydomain3.com ################################################################################ if envelope :detail :contains ["to", "cc", "bcc"] "myemail@mydomain.com" { redirect :copy "myemail@mydomain2.com"; redirect "myemail@mydomain3.com"; } ################################################################################################################################################################
Thank you.
Ciao, Gerhard
Am 28.06.2014 07:40, schrieb Gerhard Wiesinger:
:copy seems not to be supported, right?
Copy is supported, you just need to require the extension in your SIEVE script like this:
require ["copy"];
For a complete list of supported extensions please take a look at:
http://wiki2.dovecot.org/Pigeonhole/Sieve
Regards Daniel
Dipl.-Inf. Daniel Parthey System Engineer Metaways Infosystems GmbH Pickhuben 2, D-20457 Hamburg
E-Mail: d.parthey@metaways.de Web: http://www.metaways.de Tel: +49 (0)40 317031-537 Fax: +49 (0)40 317031-937
Metaways Infosystems GmbH - Sitz: D-22967 Tremsbüttel Handelsregister: Amtsgericht Lübeck HRB 4508 AH Geschäftsführung: Hermann Thaele, Lüder-H.Thaele
participants (2)
-
Daniel Parthey
-
Gerhard Wiesinger