Q0808 - Exim/exim GitHub Wiki
I want to rewrite recipient address depending on the domain of the sender... qend
For example:
*@example.com * FtTq
\N^.+@mr-spark\N [email protected] FtT
\N^.+@rewind\N [email protected] FtT
\N^.+@eug\N [email protected] FtT
\N^.+@tux\N [email protected] FtT
\N^.+@proj-ws-43\N [email protected] FtT
\N^.+@proj-lx-29\N [email protected] FtT
*@example.com * FtTq
* developer@localhost FtT
So I want the following:
-
If mail is sent for
*@example.com
then it will be sent to*@example.com
-
If mail is sent from
*@rewind
then it will be sent to[email protected]
-
If mail is sent from
*@eug
then it will be sent to[email protected]
-
...
-
Otherwise mail will be send to local mailbox
developer@localhost
But the rules don't work property, for example:
If I use exim -brw kamenskiyvv@proj-lx-29 it all works well:
sender: kamenskiyvv@proj-lx-29
from: kamenskiyvv@proj-lx-29
to: [email protected]
cc: kamenskiyvv@proj-lx-29
bcc: kamenskiyvv@proj-lx-29
reply-to: kamenskiyvv@proj-lx-29
env-from: [email protected]
env-to: [email protected]
But if I send mail from proj-lx-29 host I will see the following in the log:
2007-10-31 13:51:39 1InDyt-0007Zy-0O <= [email protected] H=proj-lx-29 [192.168.9.29] P=smtp S=418
2007-10-31 13:51:39 1InDyt-0007Zy-0O => developer <developer@localhost> R=localuser T=local_delivery
2007-10-31 13:51:39 1InDyt-0007Zy-0O Completed
Your rules are incorrect, exim rewrites only addresses that are matched with expression. If rule can be applied to only From header it will be applied to From Header only.