[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: use of spamassassin and razor



N.B. my perspective comes from my setup -- see sig below. ymmv...

On Thu, Feb 20, 2003 at 12:11:03PM +0530, Sandip P Deshmukh wrote:
> On Wed, Feb 19, 2003 at 01:44:55PM +0000, Colin Watson wrote:
> > SpamAssassin just tags the mail. You need to use procmail or
> > similar to decide what to do with the tag.
> 
> well, currently, my spamassassin is not even tagging the mail.
> will i have to make changes to exim also? is there an easy to
> understand, step-by-step guide to do that?

yes, lemme see if i can locate it--

	$ grep exim `dpkg -L spamassassin`
	/usr/share/doc/spamassassin/README.Debian:
		For information on integrating spamassassin and exim, see
	/usr/share/doc/spamassassin/README.Debian:
		http://dman.ddts.net/~dman/config_docs/exim3_spamassassin.html

looking there, i see

	For information on integrating spamassassin and exim, see
	http://dman.ddts.net/~dman/config_docs/exim3_spamassassin.html

here's my setup: after local_delivery (transport) i have

	# Spam Assassin
	spamcheck:
		driver = pipe
		command = /usr/sbin/exim -oMr spam-scanned -bS
		transport_filter = /usr/bin/spamc -u ${local_part}
		bsmtp = all
		home_directory = "/tmp"
		current_directory = "/tmp"
		# must use a privileged user to set $received_protocol on the way back in!
		user = mail
		group = mail
		return_path_add = false
		log_output = true
		return_fail_output = true
		prefix =
		suffix =

and before userforward (directors) i have

	# Spam Assassin
	spamcheck_director:
		# do not use this director when verifying a local-part at SMTP-time
		no_verify
		# When to scan a message :
		#   -   it isn't already flagged as spam
		#   -   it isn't already scanned
		#   -   it didn't originate locally (as long as I don't harbor spammers :-))
		condition = "${if and { {!def:h_X-Spam-Flag:}
		 {!eq {$received_protocol}{spam-scanned}}
		 {!eq {$received_protocol}{local}} } {1}{0}}"
		driver = smartuser
		transport = spamcheck

[mind the line breaks -- you'll figure it out]

then i've also got /etc/default/spamassassin looking like

	ENABLED=1
	OPTIONS="-F 0"

(man spamd for details)

> well, i do not have procmail. but i do have a .forward file
> that is an exim filter. would that be adequate to do the job?
> but i got a hint of what you are doing in procmailrc and it is
> close to what i would like to do.

sure.

	if	$h_x-spam-level begins "*****"
	then
		save Mail/SPAM
		logwrite "From $return_path $tod_log\n Subject: $h_subject:\n  Folder: SPAM		 $message_size"
		finish
	endif

with x-spam-level i can tweak how many stars i'll tolerate. you
can use whichever headers you like.

-- 
I use Debian/GNU Linux version 3.0;
Linux server 2.4.20-k6 #1 Mon Jan 13 23:49:14 EST 2003 i586 unknown
 
DEBIAN NEWBIE TIP #93 from Mike Werner <reznaeous@adelphia.net>
:
How do you get Mutt to GPG SIGN A MESSAGE BASED ON THE
RECIPIENT?  Depending on what address I send mail to, I have the
need to turn GPG signing on and off:
	send-hook .* 'set pgp_autosign=yes; set signature=~/.sigfile'
	send-hook listserv@mitvma.mit.edu 'set pgp_autosign=no; unset signature'
	send-hook majordomo@ 'set pgp_autosign=no; unset signature'
	send-hook suzuki-gs-twin@micapeak.com 'set pgp_autosign=no'
	send-hook camarilla 'set signature=~/.sigfile_cam'
The reason I have the first line there is because without it
after sending a message that matched (for example) one of the
server command addresses (second and third lines) then any
messages after that weren't being signed nor did they have sig
blocks.  So I put the first line in to match all messages.

Also see http://newbieDoc.sourceForge.net/ ...



Reply to: