View previous topic :: View next topic |
Author |
Message |
lostinspace2011 Apprentice
Joined: 09 Sep 2005 Posts: 230
|
Posted: Sat Jan 09, 2010 5:41 pm Post subject: Amavis, Spamassassin not checking for Spam [RESOLVED] |
|
|
I followed the mail filter instructions and have it almost working. All my incoming messages are tagged with the following:
Quote: | X-Virus-Scanned: amavisd-new myspecialdomain.com |
However I am not getting the X-Spam header on any of my messages. I already tried to set the $sa_tag_level_deflt to -999 and checked the domain settings in /etc/amavisd.conf. The domain is set correctly.
Quote: |
$mydomain = 'myspecialdomain.com';
|
and this email as addressed to andice @ myspecialdomain.com. I am hosting other domains as well if that makes any difference. Also all my messages are being passed. I see the following message in my /var/log/messages for all messages.
I don't think amavis check spam at all. Maybe it's not connected to spam assassin ? How could I check for this. Are there any messages in the log I can look out for. Right now I am only seeing postfix/qmgr, postfix/smtpd and amavis listed as applications in the log.
Thanks in advance
Last edited by lostinspace2011 on Mon Jan 11, 2010 7:29 pm; edited 2 times in total |
|
Back to top |
|
|
lostinspace2011 Apprentice
Joined: 09 Sep 2005 Posts: 230
|
Posted: Sun Jan 10, 2010 10:31 am Post subject: |
|
|
I also tried setting the default tag level to -999
Code: | $sa_tag_level_deflt = -999; |
as well as adding my domain to the list of local domains
Code: | @local_domains_maps = ( [".$mydomain",".myspecialdomain.com"] ); |
Here are the messages from the system log.
Quote: |
Jan 10 10:25:31 bumblebee amavis[29093]: (29093-01) ESMTP::10024 /var/amavis/tmp/amavis-20100110T102531-29093: <sender @ sender.co.uk> -> <alex @ bumblebee.myspecialdomain.com> SIZE=904 Received: from bumblebee.myspecialdomain.com ([127.0.0.1]) by localhost (bumblebee.myspecialdomain.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for <alex @ bumblebee.myspecialdomain.com>; Sun, 10 Jan 2010 10:25:31 +0000 (GMT)
Jan 10 10:25:31 bumblebee postfix/smtpd[29096]: disconnect from smarthost02.mail.zen.net.uk[212.23.3.141]
Jan 10 10:25:31 bumblebee amavis[29093]: (29093-01) Checking: dI+2dMgQQMBL [212.23.3.141] <sender @ sender.co.uk> -> <alex @ bumblebee.myspecialdomain.com>
Jan 10 10:25:31 bumblebee amavis[29093]: (29093-01) p001 1 Content-Type: text/plain, size: 0 B, name:
Jan 10 10:25:32 bumblebee postfix/smtpd[29151]: sql auxprop plugin using pgsql engine
Jan 10 10:25:32 bumblebee postfix/smtpd[29151]: initializing the server-side TLS engine
Jan 10 10:25:32 bumblebee postfix/smtpd[29151]: connect from localhost[127.0.0.1]
Jan 10 10:25:32 bumblebee postfix/smtpd[29151]: 0B11A6283FD: client=localhost[127.0.0.1]
Jan 10 10:25:32 bumblebee postfix/cleanup[29105]: 0B11A6283FD: message-id=<5E9BB386-A79B-4C2C-A79C-C52869C14295 @ sender.co.uk>
Jan 10 10:25:32 bumblebee postfix/qmgr[29009]: 0B11A6283FD: from=<sender @ sender.co.uk>, size=1386, nrcpt=1 (queue active)
Jan 10 10:25:32 bumblebee amavis[29093]: (29093-01) FWD via SMTP: <sender @ sender.co.uk> -> <alex @ bumblebee.myspecialdomain.com>,BODY=7BIT 250 2.0.0 Ok, id=29093-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 0B11A6283FD
Jan 10 10:25:32 bumblebee amavis[29093]: (29093-01) Passed CLEAN, [212.23.3.141] [82.71.16.58] <sender @ sender.co.uk> -> <alex @ bumblebee.myspecialdomain.com>, Message-ID: <5E9BB386-A79B-4C2C-A79C-C52869C14295@zen.co.uk>, mail_id: dI+2dMgQQMBL, Hits: -, size: 904, queued_as: 0B11A6283FD, 163 ms
Jan 10 10:25:32 bumblebee postfix/smtp[29107]: D4FA46283F4: to=<alex @ bumblebee.myspecialdomain.com>, orig_to=<alex @ myspecialdomain.com>, relay=localhost[127.0.0.1]:10024, delay=0.23, delays=0.05/0/0.01/0.16, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=29093-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 0B11A6283FD)
Jan 10 10:25:32 bumblebee postfix/local[29112]: 0B11A6283FD: to=<alex @ bumblebee.myspecialdomain.com>, relay=local, delay=0.06, delays=0.03/0/0/0.03, dsn=2.0.0, status=sent (delivered to maildir)
Jan 10 10:25:32 bumblebee postfix/qmgr[29009]: D4FA46283F4: removed
Jan 10 10:25:32 bumblebee postfix/qmgr[29009]: 0B11A6283FD: removed
Jan 10 10:25:32 bumblebee amavis[29093]: (29093-01) TIMING [total 174 ms] - SMTP greeting: 8 (4%)4, SMTP EHLO: 2 (1%)5, SMTP pre-MAIL: 1 (1%)6, mkdir tempdir: 1 (0%)6, create email.txt: 1 (0%)7, SMTP pre-DATA-flush: 6 (3%)10, SMTP DATA: 29 (17%)27, check_init: 1 (1%)28, digest_hdr: 1 (1%)28, digest_body: 0 (0%)28, gen_mail_id: 3 (2%)30, mkdir parts: 3 (2%)32, mime_decode: 16 (9%)41, get-file-type0: 1 (0%)42, parts_decode: 0 (0%)42, check_header: 3 (2%)43, AV-scan-1: 6 (3%)47, update_cache: 2 (1%)48, decide_mail_destiny: 1 (0%)48, fwd-connect: 28 (16%)64, fwd-mail-pip: 19 (11%)75, fwd-rcpt-pip: 0 (0%)75, fwd-data-chkpnt: 0 (0%)75, write-header: 2 (1%)76, fwd-data-contents: 0 (0%)76, fwd-end-chkpnt: 14 (8%)84, prepare-dsn: 2 (1%)85, main_log_entry: 20 (11%)96, update_snmp: 4 (2%)98, SMTP pre-response: 1 (0%)99, SMTP response: 1 (1%)99, unlink-1-files: 0 (0%)99, rundown: 1 (1%)100
|
|
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Sun Jan 10, 2010 11:11 am Post subject: |
|
|
have a go at
Code: |
spamassassin -D --lint
|
Paste maybe the last 20 lines.
Might also be worthwhile to post your amavisd.conf up on pastebin (sanitize it of course, e.g. if you have any passwords in the file, scramble them) _________________ Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash |
|
Back to top |
|
|
lostinspace2011 Apprentice
Joined: 09 Sep 2005 Posts: 230
|
Posted: Sun Jan 10, 2010 12:17 pm Post subject: |
|
|
Thanks for your reply. Here is the output from the debug command. It reported a warning, but I couldn't make out what it was referring to.
Quote: | [30284] dbg: eval: stock info total: 0
[30284] dbg: rules: running rawbody tests; score so far=1.899
[30284] dbg: rules: compiled rawbody tests
[30284] dbg: rules: running full tests; score so far=1.899
[30284] dbg: rules: compiled full tests
[30284] dbg: rules: running meta tests; score so far=1.899
[30284] dbg: rules: compiled meta tests
[30284] dbg: check: running tests for priority: 500
[30284] dbg: rules: running head tests; score so far=1.899
[30284] dbg: rules: compiled head tests
[30284] dbg: rules: running body tests; score so far=1.899
[30284] dbg: rules: compiled body tests
[30284] dbg: rules: running uri tests; score so far=1.899
[30284] dbg: rules: compiled uri tests
[30284] dbg: rules: running rawbody tests; score so far=1.899
[30284] dbg: rules: compiled rawbody tests
[30284] dbg: rules: running full tests; score so far=1.899
[30284] dbg: rules: compiled full tests
[30284] dbg: rules: running meta tests; score so far=1.899
[30284] dbg: rules: meta test DIGEST_MULTIPLE has undefined dependency 'DCC_CHECK'
[30284] info: rules: meta test FM_DDDD_TIMES_2 has dependency 'FH_HOST_EQ_D_D_D_D' with a zero score
[30284] info: rules: meta test FM_SEX_HOSTDDDD has dependency 'FH_HOST_EQ_D_D_D_D' with a zero score
[30284] info: rules: meta test HS_PHARMA_1 has dependency 'HS_SUBJ_ONLINE_PHARMACEUTICAL' with a zero score
[30284] dbg: rules: compiled meta tests
[30284] dbg: check: running tests for priority: 1000
[30284] dbg: rules: running head tests; score so far=4.205
[30284] dbg: rules: compiled head tests
[30284] dbg: rules: running body tests; score so far=4.205
[30284] dbg: rules: compiled body tests
[30284] dbg: rules: running uri tests; score so far=4.205
[30284] dbg: rules: compiled uri tests
[30284] dbg: rules: running rawbody tests; score so far=4.205
[30284] dbg: rules: compiled rawbody tests
[30284] dbg: rules: running full tests; score so far=4.205
[30284] dbg: rules: compiled full tests
[30284] dbg: rules: running meta tests; score so far=4.205
[30284] dbg: rules: compiled meta tests
[30284] dbg: check: is spam? score=4.205 required=5
[30284] dbg: check: tests=MISSING_DATE,MISSING_HEADERS,MISSING_SUBJECT,NO_RECEIVED,NO_RELAYS
[30284] dbg: check: subtests=__HAS_MSGID,__MISSING_REF,__MSGID_OK_DIGITS,__MSGID_OK_HOST,__MSOE_MID_WRONG_CASE,__NONEMPTY_BODY,__SANE_MSGID,__UNUSABLE_MSGID
[30284] warn: lint: 1 issues detected, please rerun with debug enabled for more information
|
|
|
Back to top |
|
|
lostinspace2011 Apprentice
Joined: 09 Sep 2005 Posts: 230
|
Posted: Sun Jan 10, 2010 12:22 pm Post subject: |
|
|
I had use_dcc 1 in /etc/mail/spamassassin/local.cf. After removing it the warning was gone, however the problem with spam still persists.
Quote: | 30376] dbg: rules: running meta tests; score so far=4.205
[30376] dbg: rules: compiled meta tests
[30376] dbg: check: is spam? score=4.205 required=5
[30376] dbg: check: tests=MISSING_DATE,MISSING_HEADERS,MISSING_SUBJECT,NO_RECEIVED,NO_RELAYS
[30376] dbg: check: subtests=__HAS_MSGID,__MISSING_REF,__MSGID_OK_DIGITS,__MSGID_OK_HOST,__MSOE_MID_WRONG_CASE,__NONEMPTY_BODY,__SANE_MSGID,__UNUSABLE_MSGID
|
|
|
Back to top |
|
|
lostinspace2011 Apprentice
Joined: 09 Sep 2005 Posts: 230
|
Posted: Sun Jan 10, 2010 8:59 pm Post subject: |
|
|
Even emerging to the latest release did not make any difference. |
|
Back to top |
|
|
lostinspace2011 Apprentice
Joined: 09 Sep 2005 Posts: 230
|
Posted: Mon Jan 11, 2010 2:11 pm Post subject: |
|
|
Any suggestion what else I can do to debug this further. I already tried running amavisd debug-sa however this produced similar output without any reference to any problems / errors or warning. |
|
Back to top |
|
|
lostinspace2011 Apprentice
Joined: 09 Sep 2005 Posts: 230
|
Posted: Mon Jan 11, 2010 7:02 pm Post subject: |
|
|
Sometime, every to often I also get this header in some email:
Quote: | X-Amavis-Alert: BAD HEADER SECTION, Non-encoded 8-bit data (char C2 hex): From: Approved VIAGRA\302\256 Store <aekq5j[...] |
However even in that case the X-Spam header is still absent. |
|
Back to top |
|
|
lostinspace2011 Apprentice
Joined: 09 Sep 2005 Posts: 230
|
Posted: Mon Jan 11, 2010 7:15 pm Post subject: |
|
|
When running amavis in debug mode I noticed the following messages
Quote: | Jan 11 19:15:57.325 bumblebee.j2anywhere.com /usr/sbin/amavisd[3075]: ANTI-VIRUS code loaded
Jan 11 19:15:57.325 bumblebee.j2anywhere.com /usr/sbin/amavisd[3075]: ANTI-SPAM code NOT loaded
Jan 11 19:15:57.325 bumblebee.j2anywhere.com /usr/sbin/amavisd[3075]: ANTI-SPAM-EXT code NOT loaded
Jan 11 19:15:57.325 bumblebee.j2anywhere.com /usr/sbin/amavisd[3075]: ANTI-SPAM-C code NOT loaded
Jan 11 19:15:57.326 bumblebee.j2anywhere.com /usr/sbin/amavisd[3075]: ANTI-SPAM-SA code NOT loaded
|
Looks like ANTI-SPAM-SA is not enabled ? How can I enable it ? |
|
Back to top |
|
|
lostinspace2011 Apprentice
Joined: 09 Sep 2005 Posts: 230
|
Posted: Mon Jan 11, 2010 7:29 pm Post subject: |
|
|
After commenting :
Quote: | @bypass_spam_checks_maps = (1); |
and merging the configuration with the one from the latest build it worked. Not quite sure if I uncommented this or if this was from the previous build. Most likely it was me. On the latest emerge I changed the use flags for amavisd-new to include spamassassin and razor. Again I am not sure if this made a difference. However the mail filter how to does not list those. |
|
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
|
|