Re: [exim] Incoming mail to pipe and outgoing mail to smtp_r…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Magnus Holmgren
Datum:  
To: exim-users
Betreff: Re: [exim] Incoming mail to pipe and outgoing mail to smtp_remote
On tisdagen den 4 december 2007, parser wrote:
> Hello,
> How can i separate incoming mail and outgoing mail,
> i want all incoming mail move to pipe (php script) and all outgoing mail
> move to remote_smtp
>
> begin routers
>
> manualroute:
> driver = manualroute
> condition = ${if or{{eq{$sender_host_address}{127.0.0.1}}
> {eq{$sender_host_address}{NULL}}}{yes}{no}}
> route_list = !+local_domains
> transport = remote_smtp
> no_more


For one thing, $sender_host_address is not set to "NULL" when exim is run from
the command line - it's empty. Use instead:

condition = ${if match_ip{$sender_host_address}{:127.0.0.1}}

> lookuphost:
> driver = dnslookup
> domains = ! +local_domains
> ignore_target_hosts = 127.0.0.0/8
> condition = "${perl{check_limits}}"
> transport = mypipe_smtp
> no_more
>
> #------------------------------
> begin transports
>
> mypipe_smtp:
> driver = pipe
> command = "/usr/local/bin/php /tmp/1.php"
> use_bsmtp = true
> user = mail
> group = mail
>
> What is a wrong?


-- 
Magnus Holmgren        holmgren@???
                       (No Cc of list mail needed, thanks)


"Exim is better at being younger, whereas sendmail is better for
Scrabble (50 point bonus for clearing your rack)" -- Dave Evans