Sendmail + Cyrus + Procmail(?) + SpamAssassin
I don't know if anyone is still interested, but I found a solution to this problem. My mail goes Sendmail-->Procmail-->CyrusIMAP. There are numerous discussions of how to configure the Sendmail-->Procmail portion, so I'll skip that. The problem lies in the Procmail-->Cyrus part. Sendmail and/or Procmail insists on adding a "From" line to the top of the message, and this causes an error when trying to pass the message from the procmailrc file to /usr/lib/cyrus-imapd/deliver. So I wrote a little C-program that the email can be piped through (removing the "From" line); the resulting message is passed to /usr/lib/cyrus-imapd/deliver. Here is my ~/.promailrc file. Note that all mail is first delivered to the user's CyrusIMAP box, then it goes through the procmail checks. This is because if I don't do this, then all mail that fails all the conditions (recipes) gets shoved into /usr/local/mail/~, which is basically a black hole if you are using Cyrus. # This file is: ~/.procmailrc # # REQUIREMENTS: #1) cyrus-imap (specifically, "/usr/lib/cyrus-imapd/deliver"). #2) the C-program "rmfromln" in a reachable place (like /usr/local/bin). #rmfromln: the email argument is piped in; if the email message #has been appended with starting "From" line, then this line is # removed, otherwise the message remains unchanged. LOGFILE=/home/r2/procmail.log ### # This is the default action; it delivers the email to the imap mailbox, # and thus this happens regardless of the success|failure of the recipes. # RATIONAL: every email MUST have a "To" field, otherwise sendmail would #not have passed it to us!? :0 c * ^To:. | rmfromln | /usr/lib/cyrus-imapd/deliver $LOGNAME ### :0 * ^Subject:.*(callalert|CALLALERT) * ^Subject:.*(on|ON) | /root/scripts/callalert on :0 * ^Subject:.*(callalert|CALLALERT) * ^Subject:.*(off|OFF) | /root/scripts/callalert off ALSO: I've attached the C-program "rmfromln" (and it's source code) which removes the "From" line (if it is present). -Andy Swartz rmfromln Description: Binary data /* NEW plan: 1) create a temp io-stream with tempfile() 2) read in from stdin and out to temp until EOL (or EOF) 3) dynamically create a string of the appropriate length (i.e. the number of characters written to temp-stream) 4) copy temp-stream to the new string 5) search the string for "From" 6) if found, copy the string to stdout 7) copy the remaining stdin to stdout until EOF reached. */ #include "stdio.h" #include "string.h" #include "stddef.h" #include "stdlib.h" // ### #define EOL '\n' // ### main () { charc; int length; int j; FILE*tempstream; char*tempstring; // Create the temp-stream tempstream = tmpfile(); // Read from stdin into tempstream until EOF or EOL is encountered. length = 0; rewind(tempstream); while ((c=fgetc(stdin)) && (c != EOL)) { fputc(c,tempstream); length++; } // if no input, then just exit and do nothing. if (length == 0) exit(0); // the above code did not put the EOL in the temp-stream, so add it. fputc(EOL,tempstream); length++; // create the tempSTRING and copy the tempstream into it. // tempstring = new string[length]; tempstring = (char *) calloc(length,sizeof(char)); rewind(tempstream); for(j=0;j___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Sendmail + Cyrus + Procmail(?) + SpamAssassin
On Wed, 02 Apr 2003 11:46:33 -0600 Kirk Strauser <[EMAIL PROTECTED]> wrote: Howdy, > Quick OT question: how do you debug a sieve script? I uploaded a very > simple script to my server: > > require "fileinto"; > > if header :contains "X-Spam-Flag" "YES" { > fileinto "INBOX.spam"; > } else { > fileinto "INBOX.foo"; > } > > and made it active. Both of the mailboxes user.kirk.foo and > user.kirk.spam(or INBOX.foo and INBOX.spam as seen from the client) > exist, but all mail keeps coming into INBOX. Did I miss a > "process_sieve_scripts = yes" flag somewhere? Oops, didn't see this one. There are two ways to use sieve, one is having a .sieve file in your home dir, the other is having sieve scripts in /usr/sieve. There's a setting in imapd.conf to select which way sieve scripts are handled, e.g. if you have lots of users but no real accounts. The relevant bits: sievedir: /var/imap/sieve # If enabled, deliver wil look for Sieve scripts in user's home # directories:# ~user/.sieve. sieveusehomedir: true Another thing, if you're using sieveshell you need to 1) upload script, 2) activate it, if you dont' activate it, it won't take effect. Perhaps that's what's happening? Cheers, -- Miguel Mendez - [EMAIL PROTECTED] GPG Public Key :: http://energyhq.homeip.net/files/pubkey.txt EnergyHQ :: http://www.energyhq.tk Tired of Spam? -> http://www.trustic.com pgp0.pgp Description: PGP signature
Re: (IFS)Sendmail + Cyrus + Procmail(?) + SpamAssassin
* Jan Grant ([EMAIL PROTECTED]) wrote: ==> On Tue, 1 Apr 2003, Kirk Strauser wrote: ==> ==> > I may be showing my ignorance here, but what is "IFS"? Googling for ==> > "sendmail forward ifs" returned over 3000 hits, none of them actually ==> > explaining it. ==> ==> IFS is a /bin/sh variable controlling which characters are considered ==> 'whitespace'. ==> Input Field Separator, I think. -- Joshua ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: SOLVED! Re: Sendmail + Cyrus + Procmail(?) + SpamAssassin
At 2003-04-03T14:51:05Z, [EMAIL PROTECTED] (Alexander Farber) writes: > I use fetchmail -> procmail -> SpamAssasin -> Courier-IMAP on OpenBSD and > it works fine - procmail is able to deliver to Courier-IMAP folders, you > just have to name them .blah/ Cyrus is a little different. It maintains its own database, and the only way to write to it is through cyrus' own "deliver" program. > (and BTW you don't have to have locks on them so you don't need the last > colon in :0:) Here is my ~/.procmailrc: Thanks for the tip! I'm not good with procmail at all; I've only ever used it with SpamAssassin and never as a stand-alone program. -- Kirk Strauser pgp0.pgp Description: PGP signature
Re: SOLVED! Re: Sendmail + Cyrus + Procmail(?) + SpamAssassin
Hi, On Tue, Apr 01, 2003 at 04:00:56PM -0600, Kirk Strauser wrote: > At 2003-04-01T06:17:40Z, Kirk Strauser <[EMAIL PROTECTED]> writes: > > 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? > > I fixed my problem. The writeup is at > > http://subwiki.honeypot.net/cgi-bin/view/Freebsd/SendMailAndCyrus > > under "Using ProcMail for local delivery". I hope this helps someone in the > same situation. I use fetchmail -> procmail -> SpamAssasin -> Courier-IMAP on OpenBSD and it works fine - procmail is able to deliver to Courier-IMAP folders, you just have to name them .blah/ (and BTW you don't have to have locks on them so you don't need the last colon in :0:) Here is my ~/.procmailrc: PATH=/bin:/usr/bin:/usr/local/bin MAILDIR=$HOME/Maildir # you'd better make sure it exists DEFAULT=$MAILDIR/INBOX # completely optional LOGFILE=$MAILDIR/logfile# recommended VERBOSE=on YEARMONTH=`date +%Y-%m` :0 * ^TO_.*openbsd\.(org|com) .$YEARMONTH-OpenBSD/ :0 * ^TO_.*freebsd\.(org|com) .$YEARMONTH-FreeBSD/ :0 * ^List-Id:.*gentoo-user\.gentoo\.org { :0hf | formail -fc | sed -e '/^Subject:/ s,\[gentoo-user\] ,,g' :0: .$YEARMONTH-Gentoo/ } :0fw * < 262144 | spamassassin :0 * ^X-Spam-Status: Yes .Spam/ :0 .$YEARMONTH-Inbox/ ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Sendmail + Cyrus + Procmail(?) + SpamAssassin
At 2003-04-02T08:45:08Z, Miguel Mendez <[EMAIL PROTECTED]> writes: > http://www.cyrusoft.com/sieve/ is a good starter, specially the provided > samples. Have a look at them and you'll figure out most of the stuff. Quick OT question: how do you debug a sieve script? I uploaded a very simple script to my server: require "fileinto"; if header :contains "X-Spam-Flag" "YES" { fileinto "INBOX.spam"; } else { fileinto "INBOX.foo"; } and made it active. Both of the mailboxes user.kirk.foo and user.kirk.spam (or INBOX.foo and INBOX.spam as seen from the client) exist, but all mail keeps coming into INBOX. Did I miss a "process_sieve_scripts = yes" flag somewhere? -- Kirk Strauser In Googlis non est, ergo non est. pgp0.pgp Description: PGP signature
Re: Sendmail + Cyrus + Procmail(?) + SpamAssassin
On 04/02/03 09:27 AM, Kirk Strauser sat at the `puter and typed: > At 2003-04-02T08:45:08Z, Miguel Mendez <[EMAIL PROTECTED]> writes: > > > The -F0 option was an option that made spamassassin not alter the headers, > > as it would confuse some programs. It's not needed since 2.44 > > iirc. > > Gotcha. > > > Because spamassassin is being ran as user cyrus, you need to tell it where > > to search for user_prefs. > > I covered that at: > > http://subwiki.honeypot.net/cgi-bin/view/Freebsd/SpamAssassinAndCyrus > > > http://www.cyrusoft.com/sieve/ is a good starter, specially the provided > > samples. Have a look at them and you'll figure out most of the stuff. > > That's just what I needed. Thanks! I didn't realize until yesterday that > the lack of a common filtering method was pretty much the sole component > that keeps me from switching email clients at will. If I can get the > server-side filtering to the point I like it, I should be able to use any > number of clients (depending on whether I'm at a local X terminal, SSH'ing > in remotely, etc.) without any significant difference in functionality. > That's pretty slick. > > > Btw, I've seen you finally solved it. I'd like to add your howto document > > to ezunix.org's site, mind if I do (giving credit, of course) > > Feel free. Of course, be advised that the document is on a Wiki server, and > therefore subject to change (even by people other than me) at any time. > -- > Kirk Strauser > In Googlis non est, ergo non est. I hate to be a johnny-come-lately in a discussion like this, but I'm running Sendmail->procmail->SA->Cyrus Imapd. I'm sorry I missed the beginning of this thread, I might have been able to help with some of the pitfalls I had to overcome. One of my more difficult issues was getting SA to run as the recipient - I know Cyrus doesn't require a login account to be associated with an IMAP account, but I only have a few users (like 3). I also know that might not be ideal for your purposes. Anyway, I had a little trouble at first, but I've got it working quite nicely now. Each user has his/her own SA prefs, bayes database, procmail recipes, etc. Even the cyrus deliver tool runs as the user, which is probably not desireable, but the whole key is in the sendmail.mc file. If I understand it all correctly, if you change one flag there, the whole thing goes back to being global in scale, and procmail and cyrus deliver run as the user sendmail runs as. The vast majority of this is based directly on the subwiki.honeypot.net page above, but the difference is that the Cyrus flags are left out of sendmail.mc, which is set up to use procmail as an LDA. If anyone thinks this might be useful, I'll dig the particulars back up and present them for general use. Lou -- Louis LeBlanc [EMAIL PROTECTED] Fully Funded Hobbyist, KeySlapper Extrordinaire :) http://www.keyslapper.org ԿԬ Osborn's Law: Variables won't; constants aren't. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Sendmail + Cyrus + Procmail(?) + SpamAssassin
At 2003-04-02T08:45:08Z, Miguel Mendez <[EMAIL PROTECTED]> writes: > The -F0 option was an option that made spamassassin not alter the headers, > as it would confuse some programs. It's not needed since 2.44 > iirc. Gotcha. > Because spamassassin is being ran as user cyrus, you need to tell it where > to search for user_prefs. I covered that at: http://subwiki.honeypot.net/cgi-bin/view/Freebsd/SpamAssassinAndCyrus > http://www.cyrusoft.com/sieve/ is a good starter, specially the provided > samples. Have a look at them and you'll figure out most of the stuff. That's just what I needed. Thanks! I didn't realize until yesterday that the lack of a common filtering method was pretty much the sole component that keeps me from switching email clients at will. If I can get the server-side filtering to the point I like it, I should be able to use any number of clients (depending on whether I'm at a local X terminal, SSH'ing in remotely, etc.) without any significant difference in functionality. That's pretty slick. > Btw, I've seen you finally solved it. I'd like to add your howto document > to ezunix.org's site, mind if I do (giving credit, of course) Feel free. Of course, be advised that the document is on a Wiki server, and therefore subject to change (even by people other than me) at any time. -- Kirk Strauser In Googlis non est, ergo non est. pgp0.pgp Description: PGP signature
Re: Sendmail + Cyrus + Procmail(?) + SpamAssassin
On Tue, 01 Apr 2003 09:30:04 -0600 Kirk Strauser <[EMAIL PROTECTED]> wrote: Hi Kirk, sorry for not replying earlier. > 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? The -F0 option was an option that made spamassassin not alter the headers, as it would confuse some programs. It's not needed since 2.44 iirc. Because spamassassin is being ran as user cyrus, you need to tell it where to search for user_prefs. > Do you have a good reference for that? I Googled "sieve cyrus" and > got more information than I could handle. http://www.cyrusoft.com/sieve/ is a good starter, specially the provided samples. Have a look at them and you'll figure out most of the stuff. Btw, I've seen you finally solved it. I'd like to add your howto document to ezunix.org's site, mind if I do (giving credit, of course) Cheers, -- Miguel Mendez - [EMAIL PROTECTED] GPG Public Key :: http://energyhq.homeip.net/files/pubkey.txt EnergyHQ :: http://www.energyhq.tk Tired of Spam? -> http://www.trustic.com pgp0.pgp Description: PGP signature
Re: Sendmail + Cyrus + Procmail(?) + SpamAssassin
At 2003-04-01T21:37:09Z, Jan Grant <[EMAIL PROTECTED]> writes: > IFS is a /bin/sh variable controlling which characters are considered > 'whitespace'. Gotcha - thanks. -- Kirk Strauser In Googlis non est, ergo non est. pgp0.pgp Description: PGP signature
SOLVED! Re: Sendmail + Cyrus + Procmail(?) + SpamAssassin
At 2003-04-01T06:17:40Z, Kirk Strauser <[EMAIL PROTECTED]> writes: > 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? I fixed my problem. The writeup is at http://subwiki.honeypot.net/cgi-bin/view/Freebsd/SendMailAndCyrus under "Using ProcMail for local delivery". I hope this helps someone in the same situation. -- Kirk Strauser In Googlis non est, ergo non est. pgp0.pgp Description: PGP signature
Re: Sendmail + Cyrus + Procmail(?) + SpamAssassin
On Tue, 1 Apr 2003, Kirk Strauser wrote: > I may be showing my ignorance here, but what is "IFS"? Googling for > "sendmail forward ifs" returned over 3000 hits, none of them actually > explaining it. IFS is a /bin/sh variable controlling which characters are considered 'whitespace'. -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/ ioctl(2): probably the coolest Unix system call in the world ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Sendmail + Cyrus + Procmail(?) + SpamAssassin
At 2003-04-01T06:30:42Z, Miguel Mendez <[EMAIL PROTECTED]> writes: > On Tue, 01 Apr 2003 00:17:40 -0600 > Kirk Strauser <[EMAIL PROTECTED]> 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. pgp0.pgp Description: PGP signature
Re: Sendmail + Cyrus + Procmail(?) + SpamAssassin
At 2003-04-01T06:30:53Z, Rick Fournier <[EMAIL PROTECTED]> writes: > Well for the worth of it, I use Sendmail, Procmail, SpamAssassin and > IMAP-UW but with my setup the IMAP software used, is totaly irrelevant. Almost, but not quite. You have to call Cyrus' "deliver" program to actually deliver the mail; you can't just write it to the end of a particular file. > My setup is as follows: > > $ tail /usr/local/etc/procmailrc > DROPPRIVS=yes > :0fw: /var/run/spamassassin.lock > * < 256000 > | /usr/local/bin/spamc That looks similar to what I tried to do, which the exception of calling "deliver" as the final step. I'm not sure why that didn't work - the mail just silently disappeared (wasn't in Cyrus' spools, wasn't in /var/mail/username) although /var/log/maillog didn't show any errors. > $ tail $HOME/.forward > "|IFS=' '&&exec /usr/local/bin/procmail -f-||exit 75 $USER" I may be showing my ignorance here, but what is "IFS"? Googling for "sendmail forward ifs" returned over 3000 hits, none of them actually explaining it. -- Kirk Strauser In Googlis non est, ergo non est. pgp0.pgp Description: PGP signature
Re: Sendmail + Cyrus + Procmail(?) + SpamAssassin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, Well for the worth of it, I use Sendmail, Procmail, SpamAssassin and IMAP-UW but with my setup the IMAP software used, is totaly irrelevant. My setup is as follows: $ tail /usr/local/etc/procmailrc DROPPRIVS=yes :0fw: /var/run/spamassassin.lock * < 256000 | /usr/local/bin/spamc $ tail $HOME/.procmailrc :0: * ^X-Spam-Status: Yes $PROCMAILDIR/junk $ tail $HOME/.forward "|IFS=' '&&exec /usr/local/bin/procmail -f-||exit 75 $USER" Maybe this can help you out... Rick, On April 1, 2003 01:17 am, Kirk Strauser wrote: > Up until this morning, I had a working setup where Sendmail used Procmail > for local delivery, and the global procmailrc called SpamAssassin (via > spamc) to insert an "X-Spam-Status:" header into incoming emails. I used > Procmail rather than a milter because my server is a secondary MX for an > associate's domains, and the poor unenlightened soul doesn't want his email > to be processed. Since a milter processes all email passing through a > machine, and Procmail only works on mail being delivered locally, it was > the perfect fit. > > I installed Cyrus IMAP 2.1.12 from ports today, and was able to make > Sendmail deliver directly to it without too much work. However, now I > really want to insert Procmail (or at least spamc) somewhere into the > pipeline so that my mail is conveniently marked for disposal again. I've > found about 100 half-way recipes on Google (web and Usenet); some call > Procmail as the local mailer and ignore Cyrus altogether, and some set > Procmail to by Cyrus' delivery agent. However, not one single setup that I > tried seemed to work. No matter what I did, either procmailrc was ignored, > or mail was silently discarded without being delivered. > > 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: > > 1) Sendmail needs to stay. Switching MTA's isn't something I can do right >now. > > 2) I don't want to give up SpamAssassin. I've been without it for about 12 >hours, and the amount of spam in my previously-pristine inbox is >sickening. > > 3) I don't want to give up Procmail, because I don't want to process mail >that's merely passing through my machine. > > 4) I don't want to give up Cyrus because I'm trying to get some experience >with it locally before deploying it on customers' production systems. > > Anyone who can help me with the least amount of pain (see the above metric) > will have my eternal gratitude. Or at least a hearty "Thanks!" once I've > had a sleep cycle and some caffeine. - -- Rick Fournier ([EMAIL PROTECTED]) PGP Key: 31846E22 (http://www.rptn.net/rick.asc) Key Fingerprint: B1E3 AE2E C867 F491 BF9F 9485 7818 122D 3184 6E22 -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+iTIeeBgSLTGEbiIRAjLxAJ42NZP1TNc7jNnjjYbXJPfvdz9dnACgtwVt YyRGwAk7P2fbhHquTkAN7GA= =wN4/ -END PGP SIGNATURE- ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Sendmail + Cyrus + Procmail(?) + SpamAssassin
On Tue, 01 Apr 2003 00:17:40 -0600 Kirk Strauser <[EMAIL PROTECTED]> 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. 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) If you want to have a look at the shell script I'm using, I got it from here: http://www.tml.hut.fi/~pnr/spam.html 2 remarks: Newer versions of SA don't support the -F0 and -P options, and , you'll have to modify it, since it was made for postfix, but I hope it will help as a starter. 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. HTH, -- Miguel Mendez - [EMAIL PROTECTED] GPG Public Key :: http://energyhq.homeip.net/files/pubkey.txt EnergyHQ :: http://www.energyhq.tk Tired of Spam? -> http://www.trustic.com pgp0.pgp Description: PGP signature
Sendmail + Cyrus + Procmail(?) + SpamAssassin
Up until this morning, I had a working setup where Sendmail used Procmail for local delivery, and the global procmailrc called SpamAssassin (via spamc) to insert an "X-Spam-Status:" header into incoming emails. I used Procmail rather than a milter because my server is a secondary MX for an associate's domains, and the poor unenlightened soul doesn't want his email to be processed. Since a milter processes all email passing through a machine, and Procmail only works on mail being delivered locally, it was the perfect fit. I installed Cyrus IMAP 2.1.12 from ports today, and was able to make Sendmail deliver directly to it without too much work. However, now I really want to insert Procmail (or at least spamc) somewhere into the pipeline so that my mail is conveniently marked for disposal again. I've found about 100 half-way recipes on Google (web and Usenet); some call Procmail as the local mailer and ignore Cyrus altogether, and some set Procmail to by Cyrus' delivery agent. However, not one single setup that I tried seemed to work. No matter what I did, either procmailrc was ignored, or mail was silently discarded without being delivered. 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: 1) Sendmail needs to stay. Switching MTA's isn't something I can do right now. 2) I don't want to give up SpamAssassin. I've been without it for about 12 hours, and the amount of spam in my previously-pristine inbox is sickening. 3) I don't want to give up Procmail, because I don't want to process mail that's merely passing through my machine. 4) I don't want to give up Cyrus because I'm trying to get some experience with it locally before deploying it on customers' production systems. Anyone who can help me with the least amount of pain (see the above metric) will have my eternal gratitude. Or at least a hearty "Thanks!" once I've had a sleep cycle and some caffeine. -- Kirk Strauser In Googlis non est, ergo non est. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"