Re: [Exim] Exim and Sieve rules

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Michael Haardt
Dátum:  
Címzett: exim-users
Tárgy: Re: [Exim] Exim and Sieve rules
> So, we turned to the Sieve support in Exim instead - however we
> are struggling to get it working. We have setup a router as so:
>
> driver = redirect
>    check_local_user
>    allow_filter
>    file = $home/.forward
>    no_verify

>
> The $home/.forward is just for testing... This works okay for redirects, but we
> are stuggling to understand how we can get Exim to 'forward and keep' a
> message. What file_transport should we use to deliver the message to the
> mailbox? I also understand that Exim sieves don't support 'reject' etc.


A filter that forwards and keeps mail would be:

----------
# sieve filter
redirect "new@address";
keep;
----------

On my workstation, I use this transport to deliver "inbox" to /var/mail,
and folders to my home directory:

localuser:
  driver = appendfile
  file = ${if eq{$address_file}{inbox} \
              {/var/mail/$local_part} \
              {${if eq{${substr_0_1:$address_file}}{/} \
                    {$address_file} \
                    {$home/$address_file} \
              }} \
         }
  delivery_date_add
  envelope_to_add
  return_path_add
  mode = 0600


Since keep is equivalent to fileinto "inbox", you need to check if the
router returns the path inbox.

Indeed the Exim Sieve implementation does not support reject, because
that requires building a complex MDN message. Simply bouncing the mail
is not allowed. One can argue if Exim should generate MDNs instead of
its own bounce format, but I did not feel like hacking code for that,
because I don't need it.

If someone writes code for that, I offer to integrate it into Sieve.

Michael