Hey
At least once a week our server hangs. I can't figure this out. It seems to be hanging when spamassassin is working on large emails. Here is how I have it setup and where I am confused.
My confusion lies in this. If I use the mailbox_command field in postfix do I need all of below, or will that invoke procmail and all I really need is a properly configed .procmailrc file?
In postfix main.cf: mailbox_command = /usr/bin/procmail -f -a "$USER"
In master.cf it invokes a file spamfilter.sh:
spamassassin unix - n n - - pipe user=filter argv=/usr/local/bin/spamfilter.sh -f ${sender} -- ${recipient}
smtp inet n - n - - smtpd -o content_filter=spamassassin:
smtp unix - - n - - smtp -o content_filter=spamassassin:
The spamfilter.sh file looks like:
#!/bin/bash /usr/bin/spamassassin | /usr/sbin/sendmail -i "$@" exit $?
Then there is a .forward file in each users directory: "|IFS='' && exec /usr/bin/procmail || exit 75 #username"
And a .procmailrc file: #---------------------------- MAILDIR=$HOME/mail LOGFILE=$HOME/promaillog
#Blackberry forward #----------------------------
well first off, I wouldn't run spamassassin on email that is over 512k in size. Spamc/Spamd won't run on mail over 250K if I remember correctly.
I don't know of a good way to use a shell script to determine the size of the message, but if you want to continue using the shell script, I would switch to using spamc/spamd
otherwise you can use sitewide procmail and put in your /etc/procmail file the following:
:0fw
* < 512000
| spamassassin
which will test to see if the mail is under 512000 bytes, and if it is run spamassassin on it.
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk