Perl filtering before final delivery

Ian McDonald ian at londontown.com
Fri Nov 8 10:50:13 EST 2002


----- Original Message -----
From: "Mike Brodbelt" <m.brodbelt at acu.ac.uk>
To: "Ian McDonald" <ian at londontown.com>
Cc: <info-cyrus at lists.andrew.cmu.edu>
Sent: Friday, October 25, 2002 1:31 PM
Subject: Re: Perl filtering before final delivery


>  If you are using sendmail, the cleanest way of doing what you want would
> be to make use of the milter interface, which allows you to pass
> messages through an external program that can change them as you wish.
> This would not require users to have accounts on the server, and would
> not interfere with the normal cyrus delivery mechanisms. For examples of
> something similar, look at the sendmail milters available for hooking in
> Spam Assassin.

Alas, the Milter interface is multithreaded, Sendmail::Milter seems (to be)
to be relatively unstable, and the Perl DBI libraries do not work reliably
in a Milter environment.

> > So, when I have an amended mail message and a destination folder, what
do I
> > do? Call /usr/cyrus/bin/deliver with my settings?
>
> Yes, you could do that. Deliver is just a wrapper that sends a message
> submitted to it to Cyrus via LMTP. If you can do your processing in the
> MTA pipeline, before it reaches Cyrus however, I think you'll have a
> better solution. The Milter interface for sendmail allows you additional
> latitude, such as specifying what should happen if the filter is not
> available, and multiple filters can also be chained together. Other
> MTA's may have other means of achieving this.

Alas, this would require reworking Cyrus and sendmail again; Sendmail 8.12.6
seems to talk directly to lmtp. Given how long it took me to set up Cyrus
the first time, I am loathe to tinker.

Is moving to /usr/cyrus/bin/deliver as simple as replacing:
define(`confLOCAL_MAILER', `cyrusv2')
MAILER(`cyrusv2')with this? :define(`confLOCAL_MAILER', `cyrus')
MAILER(`cyrus')
Does /usr/cyrus/bin/deliver run as a nice, straightforward, single-threaded
process which is called many times?Thanks,Ian





More information about the Info-cyrus mailing list