Perl filtering before final delivery

Ian McDonald ian at londontown.com
Fri Oct 25 07:57:59 EDT 2002


Hi,

I need to manipulate the headers on messages before final delivery. I was
going to use a .forward file which named a pipe to a Perl script, but I'm
not sure how such scripts would name a folder.

The IMAP users won't have Unix logins on the server. This FAQ answer
suggests that putting the IMAP users in /etc/passwd is a prerequesite for
using .forward. Is it?

Sieve isn't adequate for my mail filtering purposes. I want to (for example)
do database access, fiddle with the headers, *and* send it to the right
folder.

The Perl modules Mail::Audit and Mail::Procmail only deliver to mbox and
Maildir formats, so I can't use them.

So, when I have an amended mail message and a destination folder, what do I
do? Call /usr/cyrus/bin/deliver with my settings?

Thanks,

Ian

--

>From the FAQ:

Q: When I enabled Cyrus support in Sendmail, ~/.forward files stopped
working.

A: Sendmail's Cyrus support comes with support for forward files disabled.
If you want .forward files to work, you'll need to add the `w' flag. (This
requires users to have accounts on the imap server.)

Add a line define(`CYRUS_MAILER_FLAGS',`A5 at w') before the MAILER(cyrus)
line. The w flag tells sendmail that users are all in /etc/passwd so it's
okay to read it and find ~/.forward. If users aren't in /etc/passwd, don't
do this.





More information about the Info-cyrus mailing list