Sendmail + Cyrus + Procmail(?) + SpamAssassin

Kirk Strauser kirk at strauser.com
Tue Apr 1 07:30:13 PST 2003


At 2003-04-01T06:30:42Z, Miguel Mendez <flynn at energyhq.homeip.net> writes:

> On Tue, 01 Apr 2003 00:17:40 -0600
> Kirk Strauser <kirk at strauser.com> wrote:
>
> Howdy,
>  
>> It's now well past my bed time, my brain is all muzzy, and I'm "this
>> close" to giving up on the whole project.  Before I do, I have to ask:
>> has *anyone* made Sendmail+Cyrus+Procmail+SpamAssassin work?  In order
>> of most undesirable to least:
>
> Almost, my setup is a bit different, but perhaps I can give you some
> ideas. My mailserver goes like this:
>
> postfix -> spamassassin -> deliver -> sieve
>
> Now, how does one accomplish this? postfix pipes mail through a shell
> script instead of feeding it directly to Cyrus' deliver. This shell
> script pipes mail through spamassassin, and then finally to deliver,
> which uses my .sieve to automagically bounce all Spam to trustic's
> database and move messages to the appropriate folders.

Said script:

    #!/bin/sh
    #
    # /usr/local/sbin/deliver.sh
    #
    # A wrapper for running spamassassin & Cyrus deliver
    #

    if [ "$#" -ne 2 ]; then exit 64; fi

    user="$1"
    extension="$2"

    if grep -q "^$user:" /etc/passwd; then :; else exit 67; fi

What does the above line do?

    /usr/local/bin/spamassassin -F0 -P -x \
       -p "/home/${user}/.spamassassin/user_prefs" |
    /usr/local/cyrus/bin/deliver -e -m "${extension}" "${user}"

Since '-P' is now the default, that's no problem.  What did '-F0' do?

> What you could do is something like have sendmail pipe you email to a
> shell script that would pipe it to procmail, and finally to Cyrus'
> deliver. Note that you can't have procmail deliver the mail becuase Cyrus
> uses its own storage method (a Maildir lookalike combined with some
> BerkeleyDB stuff)

I'm beginning to think that procmail may not be very good for use with
Cyrus.  I'd originally "locked" on it because it seemed like an easy way to
pipe the mail through commands (such as spamc), but if I'm going to script
that anyway, then I don't such much need to keep it.

> But I hope it will help as a starter.

Thansk for the pointer!  It may not be *exactly* what I needed, but I think
it's close enough that I should be able to go on from here.

> Also, if you have time, I'd recommend playing with sieve, it's quite
> powerful and yet easy to use tool to do server side mail
> filtering/sorting.

Do you have a good reference for that?  I Googled "sieve cyrus" and got more
information than I could handle.
-- 
Kirk Strauser
In Googlis non est, ergo non est.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030401/5be956cd/attachment.bin


More information about the freebsd-questions mailing list