Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 Apr 2003 09:30:04 -0600
From:      Kirk Strauser <kirk@strauser.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Sendmail + Cyrus + Procmail(?) + SpamAssassin
Message-ID:  <8765pyxmkj.fsf@pooh.honeypot.net>
In-Reply-To: <20030401083042.35dceb2f.flynn@energyhq.homeip.net> (Miguel Mendez's message of "Tue, 1 Apr 2003 08:30:42 %2B0200")
References:  <87k7eeyc57.fsf@pooh.honeypot.net> <20030401083042.35dceb2f.flynn@energyhq.homeip.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=
Content-Transfer-Encoding: quoted-printable

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

> On Tue, 01 Apr 2003 00:17:40 -0600
> Kirk Strauser <kirk@strauser.com> wrote:
>
> Howdy,
>=20=20
>> 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=3D"$1"
    extension=3D"$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.
=2D-=20
Kirk Strauser
In Googlis non est, ergo non est.

--=-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQA+ibB85sRg+Y0CpvERAkvnAJ95nECPkFTjunblsHMTu1hreFsFbwCfSTdU
eaf50ehkYBnEk60pbBTHQYA=
=IJRb
-----END PGP SIGNATURE-----
--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8765pyxmkj.fsf>