Yeah, it's pretty easy. I strongly suggest running SA with SPAMD and SPAMC. SPAMD will always run, and when postfix receives an email it will spawn a filter script which in turn execs SPAMC process which is written in compiled C and very lean/small footprint. Otherwise, it will be spawning a new PERL process for each instance of SA and that is SLOW and bloated.
So you start SPAMD: (replace 0.0.0.0 with IP of your box. I don't want spamd talking to any other boxes!) spamd --daemonize -p 783 --pidfile /var/run/spamd.pid -x --allowed-ips=127.0.0.1,0.0.0.0 You might want to create a nice rc.d init script, or just tack this onto the end of inittab so when your box is restarted your filtering will continue to work as desired. (/me shudders) You need to modify your postfix /etc/postfix/master.cf like this: (dont delete the stuff in between, just change the respective lines. LOOK CLOSELY AT ARGS) # ========================================================================== # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (50) # ========================================================================== smtp inet n - n - - smtpd -o content_filter=filter: filter unix - n n - - pipe user=someuser argv=/usr/local/spamass/filter.sh -f ${sender} -- ${recipient} The filter.sh file I have looks like: #!/bin/sh # File locations: (CHANGE AS REQUIRED TO MATCH YOUR SERVER) INSPECT_DIR=/var/spool/filter SENDMAIL=/usr/sbin/sendmail SPAMASSASSIN=/usr/local/bin/spamc # Exit codes from <sysexits.h> EX_TEMPFAIL=75 EX_UNAVAILABLE=69 cd $INSPECT_DIR || { echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; } # Clean up when done or when aborting. trap "rm -f in.$$; rm -f out.$$" 0 1 2 3 15 cat | $SPAMASSASSIN -d 127.0.0.1 -p 783 > out.$$ || \ { echo Message content rejected; exit $EX_UNAVAILABLE; } $SENDMAIL "$@" < out.$$ exit $? You need to add a user to your box called "someuser" or whatever you like. Probably should have settings in etc/passwd like: someuser:x:UID#:GID#::/no/where:/sbin/nologin Probably want to: mkdir /var/spool/filter chown root:someuser /usr/local/spamass/filter.sh /var/spool/filter chmod 750 /usr/local/spamass/filter.sh chmod 770 /var/spool/filter Perhaps this helps. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Apolinaras 'Apollo' Sinkevicius (Carmel Music & Entertainment, LLC) Sent: Monday, November 11, 2002 2:25 AM To: [EMAIL PROTECTED] Subject: [SAtalk] Postfix. How do I do quick set-up for SA? (NEWBIE) I am trying to figure out what would be the least time consuming and easiest way to integrate SA into postfix. Any ideas? ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk