View previous topic :: View next topic |
Author |
Message |
martinj n00b
Joined: 06 Jan 2004 Posts: 16 Location: Paderborn (Germany)
|
Posted: Tue Mar 15, 2005 10:46 am Post subject: [solved] Amavisd-new not writing X-Spam-* but X-Virus Header |
|
|
Hi there,
I have installed postfix, spamassassin, amavisd-new, clamav on my mailserver.
Everything is working well except for Spam-Scanning.
amavisd-new puts spam-messages into quarantine, but the messages passed to the recipient do not contain any X-Spam-Headers nor the changed ****SPAM**** subject.
Important entries from amavisd.conf
Code: |
$final_spam_destiny = D_PASS; # (defaults to D_BOUNCE)
$remove_existing_spam_headers = 0; # leave existing X-Spam* headers alone
# (I also tried with the above line set to 1, but didn't change anything)
$sa_local_tests_only = 0; # (default: false)
$sa_mail_body_size_limit = 200*1024; # don't waste time on SA if mail is larger
$sa_tag_level_deflt = 2.0; # add spam info headers if at, or above that level;
$sa_tag2_level_deflt = 6.31;# add 'spam detected' headers at that level to
$sa_kill_level_deflt = $sa_tag2_level_deflt; # triggers spam evasive actions
$sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent,
|
I'm quite sure that the mail is scanned for spam, as they are correctly put into quarantine and as the logfile says "ANTI-SPAM code loaded" when restarting amavisd-new.
The mails are correctly passed to amavisd-new and back to postfix, as the "X-Virus-Scanned by amavisd-new at myhostname" is added to the mail, you fetch via pop from the server.
I looked at the mails in /var/amavis/quarantine/. They contain the X-Spam-Headers!
My postfix configs main.cf and master.cf are based on the following Howto:
http://www.gentoo.org/doc/en/mailfilter-guide.xml
If it helps, here the important parts of the master.cf:
Code: |
smtp inet n - n - - smtpd -v
-o content_filter=smtp-amavis:[127.0.0.1]:10024
#
# amavisd-new
#
smtp-amavis unix - - n - 2 smtp
-o smtp_data_done_timeout=1200
-o disable_dns_lookups=yes
127.0.0.1:10025 inet n - n - - smtpd
-o local_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o strict_rfc821_envelopes=yes
|
Does anyone have an idea what I could have configured wrong?
Thanks,
Martin
Last edited by martinj on Thu Mar 17, 2005 4:32 pm; edited 1 time in total |
|
Back to top |
|
|
martinj n00b
Joined: 06 Jan 2004 Posts: 16 Location: Paderborn (Germany)
|
Posted: Tue Mar 15, 2005 10:18 pm Post subject: |
|
|
I just got it to change the body of the message by setting $defang_spam = 1;
Thus the original message was attached and I got a message telling me that the original message was spam.
But the X-Spam-Headers don't appear....
Could it be a bug in spamassassin? |
|
Back to top |
|
|
Casper Gasper Tux's lil' helper
Joined: 07 Sep 2004 Posts: 75 Location: London
|
Posted: Wed Mar 16, 2005 11:04 am Post subject: |
|
|
By the looks of things amavisd-new isn't quarantining spam, as you have FINAL_SPAM_DESTINY = D_PASS.
Can you see the SA headers in every mail? Try changing $sa_tag_level_deflt = -999 to make sure they always should appear.
hth,
Casper. |
|
Back to top |
|
|
martinj n00b
Joined: 06 Jan 2004 Posts: 16 Location: Paderborn (Germany)
|
Posted: Thu Mar 17, 2005 8:07 am Post subject: |
|
|
Hey Casper,
thanks for your hint.
I set $sa_tag_level_deflt = -999, but it didn't help.
I tried with one ham and one spam message. The ham message is passed with the hint "Passed CLEAN" und is not put into quarantine. The spam message (that GTUBE test-spam message) was put into quarantine and furthermore passed with the hint "Passed SPAM" in the logs.
There were no X-Spam-Headers in the passed messages, neither in the ham message nor in the spam message!
The message in quarantine contained the following X-Spam-Headers:
X-Spam-Status: Yes, hits=1001.356 tag=-999 tag2=6.31 kill=6.31 tests=AWL,
BLANK_LINES_70_80, DNS_FROM_RFC_ABUSE, GTUBE, RCVD_BY_IP
X-Spam-Level: ****************************************************************
But strangely the quarantine-message did not contain the X-Virus-Scanned header, but the passed messages contain it...
What is happening with my amavisd-new...? |
|
Back to top |
|
|
martinj n00b
Joined: 06 Jan 2004 Posts: 16 Location: Paderborn (Germany)
|
Posted: Thu Mar 17, 2005 4:22 pm Post subject: |
|
|
I got it....
The problem was the setting:
$mydomain = serverkompetenz.net
As I have a machine with multiple virtual hosts, I set this domainname to the domain of Strato, which is housing my server. They give you a hostname something.serverkompetenz.net when you order a rootserver there.
When I tried $mydomain = my-real-domain.net, the X-Spam-headers were correctly added to all emails at my-real-domain.net. But the problem is, that they are not added to emails at the other domains, I am hosting on my server!
What can I do now? Can $mydomain be an array of all domains, I am hosting, so that everyone can benefit from spam-checking?
I think this is very confusing, mainly because of the comments in the config-file:
Code: | # $mydomain serves as a quick default for some other configuration settings.
# More refined control is available with each individual setting further down.
# $mydomain is never used directly by the program.
|
This made me think that $mydomain is not a very important setting... |
|
Back to top |
|
|
martinj n00b
Joined: 06 Jan 2004 Posts: 16 Location: Paderborn (Germany)
|
Posted: Thu Mar 17, 2005 4:31 pm Post subject: |
|
|
OK, I think I didn't read the comments in the config file carefully enough.
The @local_domains_maps is used for that purpose. So my problem is solved... |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|