From owner-freebsd-questions@FreeBSD.ORG Tue Apr 1 07:30:12 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B071837B401 for ; Tue, 1 Apr 2003 07:30:12 -0800 (PST) Received: from kanga.honeypot.net (kanga.honeypot.net [208.162.254.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C05B43FA3 for ; Tue, 1 Apr 2003 07:30:09 -0800 (PST) (envelope-from kirk@strauser.com) Received: from pooh.honeypot.net.strauser.com (kirk@pooh.honeypot.net [10.0.5.128]) by kanga.honeypot.net (8.12.8/8.12.7) with ESMTP id h31FU4Pk004465 for ; Tue, 1 Apr 2003 09:30:05 -0600 (CST) (envelope-from kirk@strauser.com) To: freebsd-questions@freebsd.org From: Kirk Strauser Date: Tue, 01 Apr 2003 09:30:04 -0600 In-Reply-To: <20030401083042.35dceb2f.flynn@energyhq.homeip.net> (Miguel Mendez's message of "Tue, 1 Apr 2003 08:30:42 +0200") Message-ID: <8765pyxmkj.fsf@pooh.honeypot.net> Lines: 73 X-Mailer: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 (gnu/linux) References: <87k7eeyc57.fsf@pooh.honeypot.net> <20030401083042.35dceb2f.flynn@energyhq.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: Sendmail + Cyrus + Procmail(?) + SpamAssassin X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2003 15:30:13 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable At 2003-04-01T06:30:42Z, Miguel Mendez writes: > On Tue, 01 Apr 2003 00:17:40 -0600 > Kirk Strauser 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----- --=-=-=--