Re: Procmail to Sieve translation

2014-06-28 Thread Daniel Parthey

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_headers

if header :contains subject [order, buy] {
  redirect recipi...@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.part...@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


Re: Procmail to Sieve translation

2014-06-28 Thread Daniel Parthey

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.part...@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


Re: Procmail to Sieve translation

2014-06-28 Thread Gerhard Wiesinger

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_headers 



if header :contains subject [order, buy] {
  redirect recipi...@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:.*myem...@mydomain.com.*
| formail -IX-Priority: 2 (high) -IX-mydomain-com-seen: yes | 
$SENDMAIL -oi \

  myem...@mydomain2.com  \
  myem...@mydomain3.com

# http://www.emaildiscussions.com/showthread.php?t=57138
# http://tools.ietf.org/html/rfc5293
if header :contains [from] [myem...@mydomain.com] {
  addheader X-Priority 2 (high);
  addheader X-mydomain-com-seen yes;
  redirect :copy myem...@mydomain2.com;
  redirect myem...@mydomain3.com;
}

:0c
* ^From:.*myem...@mydomain.com.*
! +1123456...@mysmsprovider.com

if header :contains [from] [myem...@mydomain.com] {
  redirect +1123456...@mysmsprovider.com;
}

:0c
* ^(To|Cc|Bcc):.*myem...@mydomain.com.*
!   myem...@mydomain2.com myem...@mydomain3.com

if envelope :detail :contains [to, cc, bcc] myem...@mydomain.com {
  redirect :copy myem...@mydomain2.com;
  redirect myem...@mydomain3.com;
}


Thank you.

Ciao,
Gerhard

-- http://www.wiesinger.com/


Procmail to Sieve translation

2014-06-27 Thread Gerhard Wiesinger

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:.*myem...@mydomain.com.*
| formail -IX-Priority: 2 (high) -IX-mydomain-com-seen: yes | 
$SENDMAIL -oi \

  myem...@mydomain2.com  \
  myem...@mydomain3.com

:0c
* ^From:.*myem...@mydomain.com.*
! +1123456...@mysmsprovider.com

:0c
* ^(To|Cc|Bcc):.*myem...@mydomain.com.*
!   myem...@mydomain2.com myem...@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