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

Page principale
Supprimer ce message
Répondre à ce message
Auteur: admin
Date:  
À: exim-users
Sujet: Re: [exim] Auth'd Mail to bucket-1, localsent to the world

> I want to accept incoming mail using AUTH and TLS - done. But I want to
> process this mail first with an external program and then send it out.
>
> 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.


The easiest approach is to pipe it all and pass $received protocol to the
script. If mail is sent with "sendmail", the value is "local", if it's
sent with authentication but no encryption, it yields "esmtpa", with auth
and encryption it's "esmtpsa" IIRC. Your script then can make a detailed
decision what to do with this. Or you could create relevant routers making
the decision on basis of expanded $received_protocol variable.

Regards,
Marcin Krol