Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Mail::Audit as demon?

by swiftone (Curate)
on Sep 20, 2002 at 14:14 UTC ( #199475=perlquestion: print w/ replies, xml ) Need Help??
swiftone has asked for the wisdom of the Perl Monks concerning the following question:

Some time ago I got my DSL setup, and finally had a perm. IP and a pretty stable connection, so I setup my box (Debian Linux) to act as my mailserver and had all my accounts forward to there.

Mail::Audit, Mail::ListDetector, and Mail::SpamAssassin made life good. And I saw that it was good, and was content.

Then my DSL borked. There was gnashing of teeth and fuming and saying of unkind words. Resetting the DSL restored my connection, and mail did pour forth from the ether(net) into my box.

Which slowed to a crawl. A slow crawl.

Granted, that only lasted about 5-10 seconds, and it filtered several hundred messages in addition to everything else my (none too powerful) box was waiting for a connection to do, but it was an annoyance and a surprise. I could live quite happily without ever changing anything, but I can't leave well enough alone.

My understanding of the issue is that each message launches a perl script, and thus the perl interpreter. In essence, the Apache Perl CGI problem. So I started thinking about fixing it in a similar vein to mod_perl. Comments? I know other solutions exist that involve playing with the mailserver, but I like the general elegance and flexibility of a script called from a .forward file.

So: Is it possible to have my filter running as a demon, and have something small and quick, say, a simple C program, hand off the mail to the demon for filtering? Well, I know it is possible, so would this have any impact on the efficiency of the filtering? I don't really have a need for it, but would something like this make Mail::Audit a more friendly solution for ISPs and the like? I'm sure this could be set up as a mod_perl solution and have everything filter through that, but I don't want to subscribe to the "everything in HTTP" crowd, and my idea is to make the prequisites easy, not forcing someone to run mod_perl if they don't want to.

Comment on Mail::Audit as demon?
Re: Mail::Audit as demon?
by Aristotle (Chancellor) on Sep 20, 2002 at 14:40 UTC
    I don't have any propositions myself, but the Mail::SpamAssassin folks have created a spamd / spamc pair of programs do daemonize the module for the same reason you explained. Maybe these could be a source of inspiration. (Pun intended.)

    Makeshifts last the longest.

Re: Mail::Audit as demon?
by perrin (Chancellor) on Sep 20, 2002 at 15:47 UTC
      Wow. I haven't been able to give this any subjective testing, but the concept alone is....beautiful. perrin++ and matts*=2

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://199475]
Approved by Aristotle
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2014-09-17 12:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (79 votes), past polls