Re: [exim] change recipient

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Geraint Edwards
Date:  
À: Martins Smilga
CC: exim-users
Sujet: Re: [exim] change recipient
Martins Smilga <smilga@???> said
        (on Thu, Oct 13, 2005 at 11:43:44AM +0300):

> I need to change recipient fo specifig mails.
>
> For example if mails come from sender xyz@??? and to user@??? it must be delivered administrator@???.
>
> Does anyone know how to do that?


Do you mean "redirected to" or "copied to"? I shall assume
redirection...

There are several options:

    == Option 1


The quick answer is probably to use a .forward file of some
kind, in the $HOME for <user>. This assumes a cooperative user.
This forward file should look something like this (untested):

-----cut here-----
# Exim filter (do not change this magic)

if    error_message
then
    finish
endif


if $return_path is "xyz@???"
then
    forward administrator@???
    finish
endif
-----cut here-----


You may need to allow_filter in the transport for the above.


    == Option 2


If you want to redirect before delivery, see the documentation on
the "rewriting rules" (it is a section towards the bottom of your
configuration file). This cannot (to my knowledge) be limited to
certain senders, though. You may need a new transport or setup a
system-wide filter for that.


    == Option 3


If you mean to do this by hand, then you need to add the new
recipient with
    exim -Mar q-id administrator@???
before marking the old address as delivered:
    exim -Mmd q-id user@???
where <q-id> is the exim queue ID (e.g. 1a23b4-00a4fa-e0).



All these solutions are well documented.

--
Geraint A. Edwards (aka "Gedge")
gedge@???