[Pymilter] use py-milter to change the routing of a Mail

Stuart Gathman stuart at gathman.org
Mon Aug 6 09:44:45 EDT 2018


Sendmail routing is controlled by mailertable.db (and SMTP AUTH
passwords are stored in authinfo.db), and mailertable.db can be updated
without restarting sendmail.  In most distros,  mailertable.db is
writable only by root - but one solution is to make it writable by your
milter.  I am assuming that you have a huge database of clients, with
authorized MTA configured for each client - and therefore cannot easily
use the mailertable and authinfo tables for sendmail as a static
configuration.

I believe you are correct in that I am not aware of any milter api
substitute for mailertable/authinfo.  You could also update
mailertable.db/authinfo.db whenever you update the corresponding record
in your client database, but you probably have many MTAs, and therefore
want to do it only when actually sending an email for a client.  Hence,
doing it from milter is the optimum time to do it.

On 08/06/2018 08:15 AM, Gerhard Schmidt wrote:
> I'm hosting a webapp that sends mails under many different domains. Some
> of these domains starting to use spf records to limit who can send mails
> under these domains.
>
> I can send mails from these domains via these mailservers but there is
> no mailserver that can send mails for all domains. I tried to find a way
> to do this via sendmail but didn't find a way to select specific
> Smart-Host based on the sender domain. Is there a way to solve this
> problem with py-milter.
>
> Reading the documentation i didn't find a way to influence the routing
> in sendmail via py-milter, but maybe I'm missed something.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://gathman.org/pipermail/pymilter/attachments/20180806/24991108/attachment.sig>


More information about the Pymilter mailing list