Casey,

> I'm sure this is a simple problem, but I can't find the solution.  Hopefully
> someone here could point me in the correct direction to find a solution.

> I've built a new mail server, basically replicating a system I had operating
> for 3 years.  I'm using postfix/amavisd-new/spamasassin system on a brand new
> Debian Lenny (stable) installation.  

> Previously, I had setup up amavis and postfix to forward all spams to a
> separate eMail account, and to add the subject "SPAM" and the spam value in
> the header (This makes it easy to sort by spam severity and isolate the
> occasional ham from the spam.)   


> With my new setup, however, the subject line does not get re-written and I
> cannot additional headers into the checked eMails.   


> Other than the inability to add custom headers, however, everything works
> perfectly.  (ie: spam is correctly identified and isolated in the appropriate
> eMail account.)


> In accordance with the Debian way of doing things, I've changed the file
> /etc/amavis/conf.d/50-user to add the following items:

> $sa_tag_level_deflt  = undef;     
> $sa_tag2_level_deflt = 2.5;
> $sa_kill_level_deflt = 2.5;    
> $sa_dsn_cutoff_level = undef;  
> $sa_spam_subject_tag = "SPAM! _SCORE_ (_REQD_)";   
> $final_spam_destiny = D_DISCARD;        # Was D_BOUNCE;
> $spam_quarantine_to  = 's...@nerdworld.org';  
> $virus_quarantine_to = 'vi...@nerdworld.org'; 
> $X_HEADER_TAG = 'X-Virus-Scanned';   

Maybe it helps when you add

$X_HEADER_LINE = "$myproduct_name at $mydomain";

in 50-user too?


> Here are examples of the the spam headers added to the quarantined eMails when
> I sent myself a test spam:


> Return-Path: <ca...@nerdworld.org>
>  X-Original-To: s...@nerdworld.org
>  Delivered-To: s...@nerdworld.org
>  Received: from localhost (localhost [127.0.0.1])
>          by VMailServer.NerdWorld.org (Postfix) with ESMTP id 6235D5DE7E
>          for <s...@nerdworld.org>; Sat, 16 Jan 2010 13:06:46 -0500 (EST)
>  X-Envelope-From: <ca...@nerdworld.org>
>  X-Envelope-To: <ca...@nerdworld.org>
>  X-Envelope-To-Blocked: <ca...@nerdworld.org>
>  X-Quarantine-ID: <kHEBix-KePDD>
>  X-Spam-Flag: YES
>  X-Spam-Score: 998.641
>  X-Spam-Level: 
> ****************************************************************
>  X-Spam-Status: Yes, score=998.641 tag=x tag2=2.5 kill=2.5
>          tests=[ALL_TRUSTED=-1.44, AWL=0.081, GTUBE=1
> Received: from VMailServer.NerdWorld.org ([127.0.0.1])
>          by localhost (VMailServer.NerdWorld.org [127.0.0.1]) (amavisd-new,
> port 10024)
>          with ESMTP id kHEBix-KePDD for <ca...@nerdworld.org>;
>          Sat, 16 Jan 2010 13:06:45 -0500 (EST)
>  Received: from m5.localnet (M5.NerdWorld.org [192.168.1.100])
>          by VMailServer.NerdWorld.org (Postfix) with ESMTPSA id D5ECC5DE5D
>          for <ca...@nerdworld.org>; Sat, 16 Jan 2010 13:06:45 -0500 (EST)
>  From: Casey Bralla <ca...@nerdworld.org>
>  Organization: The NerdWorld Organisation
>  To: Mr J R Casey Bralla <ca...@nerdworld.org>
>  Subject: SDpam Testing
>  Date: Sat, 16 Jan 2010 13:05:41 -0500
>  User-Agent: KMail/1.12.4 (Linux/2.6.32-gentoo-r1; KDE/4.3.4; x86_64; ; )
>  MIME-Version: 1.0
>  Content-Type: Text/Plain;
>    charset="us-ascii"
>  Content-Transfer-Encoding: 7bit
>  Message-Id: <201001161305.41481.ca...@nerdworld.org>
>  X-Length: 1900
>  X-UID: 25190


> Notice that the X-Virus-Scanned message never gets added, and the subject line
> does not change to add the spam score.

It's not possible with amavisd to add the spam score in the subject
line as with spamassassin. The header edits is done by amavisd and
ther's no config option or else to add the score in the subject line.

The subject is only rewritten if mail is passed to the recipient. If
mail gets quarantained then the subject is not rewritten.

When you set D_PASS as final_spam_destiny or you increase the kill
level and the mail is passed to the recipient the subject line should
be rewritten.


Daniel


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to