[Mimedefang] Re: Spam Assassin

David F. Skoll dfs at roaringpenguin.com
Tue Jan 8 19:42:07 EST 2002

On Tue, 8 Jan 2002, Jeff Heinen wrote:

> Interesting, $status->finish() is the deconstructor for the status object.
> I'm running defang under the multiplexor and haven't seen any issues,

I haven't had problems either, but I added the call in is_spam and check.
MIMEDefang kills the Perl process after it has processed (by default) 100
messages, so this limits the propagation of memory leaks.

> That is what I resorted to. However, for some odd reason, adding a
> boilerplate messed up all the MIME attachments on every message.

Really?  Are you resetting your variables in filter_begin?  Don't forget
that in server mode, a given Perl process can process many e-mails, and you
need to explicitly set every global variable you use later on.

> I've started looking for ways to add the
> report as a text/plain attachment named 'SA Report' instead as a hopeful
> replacement.

You can build a MIME::Entity and add it in.  The MIME::Tools man pages
aren't bad.

> How much access is there to sendmail variables, etc. within a milter
> script?  Is there any way to leverage the sendmail internal map
> files?

No.  Milters don't necessarily even run on the same machine as
sendmail, so they have no access to its databases.  Per-user stuff
should NOT be done by MIMEDefang; it's best done by the delivery
agent.  If a message comes for a at mydomain.net and b at mydomain.net,
MIMEDefang processes it only *once*, and if "a" and "b" have different
policies, you're in trouble.

> Unfortunately for me, I need a little more customizability from it. I've
> been asked for the ability to not only decide if I should PASS, TAG or DROP
> a piece of mail based on hit limits, but also be able to include a
> 'per-domain' contact we forward the message to in each case.

See stream_by_domain in mimedefang-filter(5).  You _can_ use MIMEDefang
fairly efficiently to make per-domain decisions.


More information about the MIMEDefang mailing list