I use Postfix and configure it to deliver email with no other logical destination to a .forward Perl script which is written with Mail::Audit so that I can do fancy logic about post-processing and redirection to final destinations.
You might even find that you don't need to use Perl, but that Postfix directly supports the type of multiple accounts per user you want to provide.
Update: Use Email::Filter instead of Mail::Audit per the author's documentation.
--
Eric Hammond
| [reply] |
There is a Mail::Filter module on CPAN too. How those two Mail::Audit and Mail::Filter compare?
| [reply] |
Mail::Filter doesn't do at all the same thing, but since you made me go look, I see that Mail::Audit has been replaced by Email::Filter. Both are written by the same author (Simon Cozens) and Mail::Audit documentation has a comment that Email::Filter should be used instead.
Looks like I have a conversion project to add to my todo list.
--
Eric Hammond
| [reply] |
| [reply] |
I don't know what exactly you want to do (if it's just
users having more than one email address, that's trivial
in sendmail, just set up an alias), but sendmail isn't
modular in the sense that you can replace certain parts
of it with code you wrote. And I don't know any MTA that
does.
However, if it's just some kind of post-processing (which
would include any redirection) of incoming email, that's
fairly trivial with MTAs like sendmail, qmail or postfix.
But that's not a Perl issue anymore, and you're better off
consulting the various manual pages.
Abigail | [reply] |
Postfix uses a regexp engine for mail filtering, although i'm not certain it's perl regexp... | [reply] |
It is possible for sendmail to call Perl code at various points in its processing - and that's about as much as I know. Use Google and search "milter api sendmail" for some links. The module Sendmail::Milter is a little old but presumably still good for use. | [reply] |
ActiveState's PureMessage is exactly what you descibed: a Perl interface to Sendmail. It is a commercial product though, so if you were looking for an open source solution, this is not it. | [reply] |