Re: [exim] Auth'd Mail to bucket-1, localsent to the world

Etusivu
Poista viesti
Vastaa
Lähettäjä: Daniel Tiefnig
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] Auth'd Mail to bucket-1, localsent to the world
Jean-Luc Cooke wrote:
> How do I create the rule:
> - if incoming mail is authenticated, then pipe to this script.
> - if someone locally is trying to send mail using "/usr/sbin/sendmail
>    -t", then just send it out to the world as normal.


There's an expansion variable called $sender_host_address that is emtpy
for locally submitted messages. So, implementing something like the
following two routers should do the trick:

remote_smtp:
driver = dnslookup
domains = ! +local_domains
condition = ${if eq{$sender_host_address}{}}
transport = remote_smtp

pipe_to_script:
driver = accept
domains = ! +local_domains
transport = your_pipe_transport
no_more


lg,
daniel