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.


In reply to Mail::Audit as demon? by swiftone

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.