procmail revisited

Louis LeBlanc leblanc+cyrus at keyslapper.org
Sun Feb 9 00:21:49 EST 2003


Hey all.  I've been running Cyrus imap for years now - happily, I
might add.  And now I'm having some problems setting up a new hook.

I am now on FreeBSD 4.6 RELEASE, with cyrus-imapd-2.0.17,
procmail-3.22_1, and sendmail 8.12.3.

I have always used the sendmail -> procmail -> deliver -> cyrus setup,
and I kind of like it.  Using procmail allowed me to do some spam and
whitelist/blacklist filtering, but it was never really adequate until
I decided to fight through setting up spamassassin.  Now I have, and I
find I need procmail executing *as the message recipient* in order to
allow the builtin whitelists and blacklists to be user specific (very
important).

Anyway, I have procmail being called from sendmail using the
following:

define(`CYRUS_MAILER_FLAGS',`SA5@|:/w')
define(`CYRUS_MAILER_PATH',`/usr/local/bin/procmail')
define(`CYRUS_MAILER_USER',`cyrus:mail')

define(`CYRUS_MAILER_ARGS',`procmail -Y -m /etc/procmailrc $u $h')
define(`CYRUS_MAILER_MAX',`eval(5*1024*1024)')

Kind of a bait and switch as I understand it.  Unfortunately, I need
procmail to be set up and called differently in order to accomplish
this, and I just can't seem to get it to work like this.

So, here's the thing.  If I save a message from my MUA to a flat file,
remove the bogus From header at the top, and pipe it into the deliver
command as any old user (just like I'm doing in procmail), it works
like a charm.  So, is there any reason I couldn't use a standard
sendmail config using procmail as the LDA, and just have deliver
called from procmail (like I already am)? Do the above CYRUS_MAILER
configs really do anything except tell sendmail what to run?

The only thing I really need sendmail to do is take incoming mail,
pipe it to procmail for delivery to cyrus (ALL incoming mail goes this
route) and take outgoing mail (from local users only) and send it to
my upstream smtp relay.  I'm not relaying for anyone else, I don't
have any complicated schemes for deciding how and where mail goes,
multiple servers, etc.  The same machine runs the internet gateway,
firewall, ppp connection, sendmail, cyrus, and whatever else.

I hope this is clear enough about what I have, what I am doing, and
what I want to happen.  If not, just let me know.

BTW, as many people who have so kindly tried to explain sendmail to me
in the past can vouch, I have a very tough time grokking any but the
most basic sendmail configuration concepts.  This isn't for a lack of
trying, a lack of interest, or a lack of skills.  I can easily write
HTTP clients and servers in C, with and without secure socket
functionality and any manner of atypical features, but understanding
sendmail remains a very high fruit for me.  Please be patient with me
if I fail to understand statements that seem as plain as 2 + 2 =3D 4.
Feel free to say this section does that, that section does this.
Don't touch that part, but change this part like this, . . .  I'll
back track as much as I can in the sendmail configs, and try to get an
idea.

And rest assured that this isn't my job you're helping me with.  I am
trying to reconfigure my own personal system running my own personal
mail server, with only 3 active users.  And my mother and my wife
won't exactly beat me up if they drop one or two messages while I get
this working.

TIA
Lou
--=20
Louis LeBlanc               leblanc at keyslapper.org
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
http://www.keyslapper.org                     =D4=BF=D4=AC

Emotions are alien to me.  I'm a scientist.
    -- Spock, "This Side of Paradise", stardate 3417.3




More information about the Info-cyrus mailing list