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

Top Page
Delete this message
Reply to this message
Author: Daniel Tiefnig
Date:  
To: exim-users
Subject: 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