Database-driven virtusertable mappings in sendmail
by Simon at 09:42 18/12/04 (Blogs::Simon)
Noted down here so I don't forget what I was doing :-)
Sendmail doesn't need to be restarted for changes to the virtusertable.db to be recognised (obvious when you think about it).

This means I can have a script (let's call it dbvut for now) that runs on the mailserver and fetches pairs of email addresses from MySQL and emits them on STDOUT in the form:

$source $target

I can then update the virtusertable.db mappings with a simple root cron of the form:

*/5 * * * * /usr/sbin/dbvut | makemap hash /etc/mail/virtusertable.db

dbvut will need to suck in and emit the contents of /etc/mail/virtusertabl or I'll lose all my static mappings, and I need to remember to change the sendmail rc script where it rebuilds the .db files on startup.

--
simon

<< Virtual Land for sale Equinotial Marker HowTo >>
Powered by
Powered by Novacaster