RE: [suse-sles-e] Configuring Spamassassin and amavisd-new
Still not quite there. First, thanks to all (especially JQ and Sandy) for your suggestions. I've implemented several of them, but still do not get the X-Spam* headers. I sent a test SPAM message from one of my email addresses to another (actually forwarded some real SPAM). Below are the following: 1 - a snippet from my /var/log/mail file; 2 - the headers in the message I received. 3 - startup messages from amavis-new 4 - the spamassassin config lines in /etc/amavisd.conf Again I am running SLES9, Postfix, cyrus and amavisd-new with clamd and spamassassin configured. did one thing different than before - somewhere I read that if spamassassin was configured in amavis-new that I did not need to run spamd. I thought they might be conflicting so I stopped spamd and just started amavis-new. The amavis startup messages appear to indicate that it has started spamassassin OK, but I might be wrong. Many thanks in advance for your help - Richard **** /var/log/mail - BEGIN **** <SNIP> Apr 1 09:24:12 gofish amavis[19362]: (19362-01) Passed, <email1@qwest.net> -> <email1@gofish.acmesoftware.com>, Message-ID: <DKELJBPNDHJEECCAEPGOKEALLEAA.email1@qwest.net>, Hits: 3.584 Apr 1 09:24:12 gofish amavis[19362]: (19362-01) TIMING [total 1300 ms] - SMTP EHLO: 4 (0%), SMTP pre-MAIL: 0 (0%), mkdir tempdir: 0 (0%), create email.txt: 0 (0%), SMTP pre-DATA-flush: 3 (0%), SMTP DATA: 38 (3%), body hash: 1 (0%), mkdir parts: 1 (0%), mime_decode: 15 (1%), get-file-type: 14 (1%), get-file-type: 14 (1%), decompose_part: 2 (0%), decompose_part: 0 (0%), parts: 0 (0%), AV-scan-1: 4 (0%), SA msg read: 2 (0%), SA parse: 1 (0%), SA check: 1106 (85%), fwd-connect: 33 (3%), fwd-mail-from: 2 (0%), fwd-rcpt-to: 7 (1%), write-header: 2 (0%), fwd-data: 0 (0%), fwd-data-end: 46 (4%), fwd-rundown: 1 (0%), unlink-2-files: 3 (0%), rundown: 0 (0%) Apr 1 09:24:12 gofish postfix/smtp[19399]: CC8E1165A: to=<email1@gofish.acmesoftware.com>, orig_to=<email1@acme.com>, relay=localhost[127.0.0.1], delay=2, status=sent (250 2.6.0 Ok, id=19362-01, from MTA: 250 Ok: queued as 3F7AE175C) Apr 1 09:24:12 gofish postfix/qmgr[10679]: CC8E1165A: removed Apr 1 09:24:12 gofish postfix/lmtp[19405]: 3F7AE175C: to=<email1@gofish.acmesoftware.com>, relay=/var/lib/imap/socket/lmtp[/var/lib/imap/socket/lmtp], delay=0, status=sent (250 2.1.5 Ok) Apr 1 09:24:12 gofish postfix/qmgr[10679]: 3F7AE175C: removed <SNIP> **** /var/log/mail - END **** **** Received message headers - BEGIN **** Return-Path: <email1@qwest.net> Received: from gofish.acmesoftware.com ([unix socket]) by gofish (Cyrus v2.2.3) with LMTP; Fri, 01 Apr 2005 09:24:12 -0700 X-Sieve: CMU Sieve 2.2 Received: from localhost (localhost [127.0.0.1]) by gofish.acmesoftware.com (Postfix) with ESMTP id 3F7AE175C for <email1@gofish.acmesoftware.com>; Fri, 1 Apr 2005 09:24:12 -0700 (MST) Received: from gofish.acmesoftware.com ([127.0.0.1]) by localhost (gofish [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 19362-01 for <email1@gofish.acmesoftware.com>; Fri, 1 Apr 2005 09:24:11 -0700 (MST) Received: from mpls-qmqp-02.inet.qwest.net (mpls-qmqp-02.inet.qwest.net [63.231.195.113]) by gofish.acmesoftware.com (Postfix) with SMTP id CC8E1165A for <email1@acme.com>; Fri, 1 Apr 2005 09:24:10 -0700 (MST) Received: (qmail 19474 invoked by uid 0); 1 Apr 2005 16:24:10 -0000 Received: from mpls-pop-10.inet.qwest.net (63.231.195.10) by mpls-qmqp-02.inet.qwest.net with QMQP; 1 Apr 2005 16:24:10 -0000 Received: from vdsl-130-13-0-2.phnx.qwest.net (HELO redfish) (130.13.0.7) by mpls-pop-10.inet.qwest.net with SMTP; 1 Apr 2005 16:24:09 -0000 Date: Fri, 1 Apr 2005 09:23:54 -0700 Message-ID: <DKELJBPNDHJEECCAEPGOKEALLEAA.email1@qwest.net> From: "Richard Mixon (qwest)" <email1@qwest.net> To: email1@acme.com Subject: test s p a m MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_04AC_01C5369C.8624BD80" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Importance: Normal X-Virus-Scanned: by amavisd-new at acme.com **** Received message headers - END **** **** /var/log/messages - BEGIN **** <SNIP> Apr 1 09:22:16 gofish amavis[19360]: starting. amavisd at gofish amavisd-new-20030616-p9, Unicode aware, LC_CTYPE=en_US.UTF-8 Apr 1 09:22:16 gofish amavis[19360]: Perl version 5.008003 Apr 1 09:22:16 gofish amavis[19360]: Module Amavis::Conf 1.15 Apr 1 09:22:16 gofish amavis[19360]: Module Archive::Tar 1.08 Apr 1 09:22:16 gofish amavis[19360]: Module Archive::Zip 1.14 Apr 1 09:22:16 gofish amavis[19360]: Module Compress::Zlib 1.33 Apr 1 09:22:16 gofish amavis[19360]: Module Convert::TNEF 0.17 Apr 1 09:22:16 gofish amavis[19360]: Module Convert::UUlib 1.0 Apr 1 09:22:16 gofish amavis[19360]: Module DB_File 1.808 Apr 1 09:22:16 gofish amavis[19360]: Module MIME::Entity 5.404 Apr 1 09:22:16 gofish amavis[19360]: Module MIME::Parser 5.406 Apr 1 09:22:16 gofish amavis[19360]: Module MIME::Tools 5.411 Apr 1 09:22:16 gofish amavis[19360]: Module Mail::Header 1.60 Apr 1 09:22:16 gofish amavis[19360]: Module Mail::Internet 1.60 Apr 1 09:22:16 gofish amavis[19360]: Module Mail::SpamAssassin 2.64 Apr 1 09:22:16 gofish amavis[19360]: Module Net::Cmd 2.24 Apr 1 09:22:16 gofish amavis[19360]: Module Net::DNS 0.46 Apr 1 09:22:16 gofish amavis[19360]: Module Net::SMTP 2.26 Apr 1 09:22:16 gofish amavis[19360]: Module Net::Server 0.87 Apr 1 09:22:16 gofish amavis[19360]: Module Time::HiRes 1.52 Apr 1 09:22:16 gofish amavis[19360]: Module Unix::Syslog 0.100 Apr 1 09:22:16 gofish amavis[19360]: Found myself: /usr/sbin/amavisd -c /etc/amavisd.conf Apr 1 09:22:16 gofish amavis[19360]: Lookup::SQL code NOT loaded Apr 1 09:22:16 gofish amavis[19360]: Lookup::LDAP code NOT loaded Apr 1 09:22:16 gofish amavis[19360]: AMCL-in protocol code loaded Apr 1 09:22:16 gofish amavis[19360]: SMTP-in protocol code loaded Apr 1 09:22:16 gofish amavis[19360]: ANTI-VIRUS code loaded Apr 1 09:22:16 gofish amavis[19360]: ANTI-SPAM code loaded Apr 1 09:22:16 gofish amavis[19361]: Net::Server: Process Backgrounded Apr 1 09:22:16 gofish amavis[19361]: Net::Server: 2005/04/01-09:22:16 Amavis (type Net::Server::PreForkSimple) starting! pid(19361) Apr 1 09:22:16 gofish amavis[19361]: Net::Server: Binding to UNIX socket file /var/spool/amavis/amavisd.sock using SOCK_STREAM Apr 1 09:22:16 gofish amavis[19361]: Net::Server: Binding to TCP port 10024 on host 127.0.0.1 Apr 1 09:22:16 gofish amavis[19361]: Net::Server: Setting gid to "103 103" Apr 1 09:22:16 gofish amavis[19361]: Net::Server: Setting uid to "65" Apr 1 09:22:16 gofish amavis[19361]: Found $file at /usr/bin/file Apr 1 09:22:16 gofish amavis[19361]: Found $arc at /usr/bin/arc Apr 1 09:22:16 gofish amavis[19361]: Found $gzip at /usr/bin/gzip Apr 1 09:22:16 gofish amavis[19361]: Found $bzip2 at /usr/bin/bzip2 Apr 1 09:22:16 gofish amavis[19361]: No $lzop, not using it Apr 1 09:22:16 gofish amavis[19361]: Found $lha at /usr/bin/lha Apr 1 09:22:16 gofish amavis[19361]: Found $unarj at /usr/bin/unarj Apr 1 09:22:16 gofish amavis[19361]: Found $uncompress at /usr/bin/uncompress Apr 1 09:22:16 gofish amavis[19361]: No $unfreeze, not using it Apr 1 09:22:16 gofish amavis[19361]: Found $unrar at /usr/bin/unrar Apr 1 09:22:16 gofish amavis[19361]: Found $zoo at /usr/bin/zoo Apr 1 09:22:16 gofish amavis[19361]: Found $cpio at /usr/bin/cpio Apr 1 09:22:16 gofish amavis[19361]: Using internal av scanner code for (primary) Clam Antivirus-clamd Apr 1 09:22:16 gofish amavis[19361]: Found secondary av scanner Clam Antivirus - clamscan at /usr/bin/clamscan Apr 1 09:22:16 gofish amavis[19361]: SpamControl: initializing Mail::SpamAssassin Apr 1 09:22:17 gofish amavis[19361]: SpamControl: done <SNIP> **** /var/log/messages - END **** **** /etc/amavisd.conf - BEGIN **** <SNIP> # SpamAssassin settings # $sa_local_tests_only is passed to Mail::SpamAssassin::new as a value # of the option local_tests_only. See Mail::SpamAssassin man page. # If set to 1, SA tests are restricted to local tests only, i.e. no tests # that require internet access will be performed. # #$sa_local_tests_only = 1; # (default: false) #$sa_auto_whitelist = 1; # turn on AWL (default: false) $sa_timeout = 30; # timeout in seconds for a call to SpamAssassin # (default is 30 seconds, undef disables it) $sa_mail_body_size_limit = 256*1024; # don't waste time on SA if mail is larger # (less than 1% of spam is > 64k) # default: undef, no limitations # default values, can be overridden by more specific lookups, e.g. SQL $sa_tag_level_deflt = 3.0; # add spam info headers if at, or above that level $sa_tag2_level_deflt = 5.0; $sa_kill_level_deflt = $sa_tag2_level_deflt; # triggers spam evasive actions # at or above that level: bounce/reject/drop, # quarantine, and adding mail address extension $sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent, # effectively turning D_BOUNCE into D_DISCARD; # undef disables this feature and is a default; # # The $sa_tag_level_deflt, $sa_tag2_level_deflt and $sa_kill_level_deflt # may also be hashrefs to hash lookup tables, to make static per-recipient # settings possible without having to resort to SQL or LDAP lookups. # a quick reference: # tag_level controls adding the X-Spam-Status and X-Spam-Level headers, # tag2_level controls adding 'X-Spam-Flag: YES', and editing Subject, # kill_level controls 'evasive actions' (reject, quarantine, extensions); # it only makes sense to maintain the relationship: # tag_level <= tag2_level <= kill_level < $sa_dsn_cutoff_level # string to prepend to Subject header field when message exceeds tag2 level $sa_spam_subject_tag = '***SPAM*** '; # (defaults to undef, disabled) # (only seen when spam is not to be rejected # and recipient is in local_domains*) $sa_spam_modifies_subj = 1; # may be a ref to a lookup table, default is true # Example: modify Subject for all local recipients except user@example.com #$sa_spam_modifies_subj = [qw( !user@example.com . )]; <SNIP> **** /etc/amavisd.conf - END ****
Richard Mixon (qwest) wrote:
**** /var/log/mail - BEGIN **** <SNIP> Apr 1 09:24:12 gofish amavis[19362]: (19362-01) Passed, <email1@qwest.net> -> <email1@gofish.acmesoftware.com>, Message-ID: <DKELJBPNDHJEECCAEPGOKEALLEAA.email1@qwest.net>, Hits: 3.584
According to your settings below, this mail should have at least the X-Spam-Status header. I am slowly beginning to suspect that Outlook simply doesn't show that header. Could you do me the favor and check the email itself on the server (just open it with less) to see, if you suddenly find the missing header? Or as an alternative just use Thunderbird to read your mail and have a look at the message source.
$sa_tag_level_deflt = 3.0; # add spam info headers if at, or above that
If you wish to add the info headers to EVERY mail you could give the setting above a negative score. The server for this list for example uses a score of -20, so really every mail gets the info headers. Sandy
Sandy Drobic wrote:
Richard Mixon (qwest) wrote:
**** /var/log/mail - BEGIN **** <SNIP> Apr 1 09:24:12 gofish amavis[19362]: (19362-01) Passed, <email1@qwest.net> -> <email1@gofish.acmesoftware.com>, Message-ID: <DKELJBPNDHJEECCAEPGOKEALLEAA.email1@qwest.net>, Hits: 3.584
According to your settings below, this mail should have at least the X-Spam-Status header. I am slowly beginning to suspect that Outlook simply doesn't show that header.
Could you do me the favor and check the email itself on the server (just open it with less) to see, if you suddenly find the missing header?
Or as an alternative just use Thunderbird to read your mail and have a look at the message source.
$sa_tag_level_deflt = 3.0; # add spam info headers if at, or above that
If you wish to add the info headers to EVERY mail you could give the setting above a negative score. The server for this list for example uses a score of -20, so really every mail gets the info headers.
OK, in /etc/amavisd.conf I set sa_tag_level_deflt = -20.0 saved and and did a "rcamavis restart" Not sure how to use "less" to read mail, so I just used the "mail" command - but nothing was there from a ssh session. So I used our webmail, which is squirrelmail. It has an option to view "full header" which I did. It does not have the X-Spam* headers of any kind. See below and also further down I have the messages from /var/log/mail. Thanks again - Richard ***** SQUIRRELMAIL - Full Headers BEGIN ***** Return-Path: <email1@qwest.net> Received: from gofish.acmesoftware.com ([unix socket]) by gofish (Cyrus v2.2.3) with LMTP; Fri, 01 Apr 2005 11:46:14 -0700 X-Sieve: CMU Sieve 2.2 Received: from localhost (localhost [127.0.0.1]) by gofish.acmesoftware.com (Postfix) with ESMTP id 036A31777 for <email1@gofish.acmesoftware.com>; Fri, 1 Apr 2005 11:46:14 -0700 (MST) Received: from gofish.acmesoftware.com ([127.0.0.1]) by localhost (gofish [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 19362-04 for <email1@gofish.acmesoftware.com>; Fri, 1 Apr 2005 11:46:12 -0700 (MST) Received: from mpls-qmqp-02.inet.qwest.net (mpls-qmqp-02.inet.qwest.net [63.231.195.113]) by gofish.acmesoftware.com (Postfix) with SMTP id 97C8F1612 for <email1@acme.com>; Fri, 1 Apr 2005 11:46:12 -0700 (MST) Received: (qmail 19600 invoked by uid 0); 1 Apr 2005 18:46:12 -0000 Received: from mpls-pop-08.inet.qwest.net (63.231.195.8) by mpls-qmqp-02.inet.qwest.net with QMQP; 1 Apr 2005 18:46:12 -0000 Received: from vdsl-130-13-0-2.phnx.qwest.net (HELO redfish) (130.13.0.7) by mpls-pop-08.inet.qwest.net with SMTP; 1 Apr 2005 18:46:11 -0000 Date: Fri, 1 Apr 2005 11:46:08 -0700 Message-ID: <DKELJBPNDHJEECCAEPGOOEBKLEAA.email1@qwest.net> From: "Richard Mixon (qwest)" <email1@qwest.net> To: email1@acme.com Subject: test s p a m MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0029_01C536B0.64E32940" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Virus-Scanned: by amavisd-new at acme.com ***** SQUIRRELMAIL - Full Headers END ***** ***** /var/log/mail BEGIN ***** <SNIP> Apr 1 11:53:33 gofish postfix/smtpd[22039]: connect from mpls-qmqp-03.inet.qwest.net[63.231.195.114] Apr 1 11:53:33 gofish postfix/smtpd[22039]: 69ED51612: client=mpls-qmqp-03.inet.qwest.net[63.231.195.114] Apr 1 11:53:33 gofish postfix/cleanup[22041]: 69ED51612: message-id=<DKELJBPNDHJEECCAEPGOAEBMLEAA.email1@qwest.net> Apr 1 11:53:33 gofish postfix/qmgr[10679]: 69ED51612: from=<email1@qwest.net>, size=3639, nrcpt=1 (queue active) Apr 1 11:53:33 gofish postfix/smtp[22042]: connect to localhost[::1]: Connection refused (port 10024) Apr 1 11:53:33 gofish amavis[22022]: (22022-01) ESMTP::10024 /var/spool/amavis/amavis-20050401T115333-22022: <email1@qwest.net> -> <email1@gofish.acmeSoftware.com> Received: SIZE=3639 from gofish.acmeSoftware.com ([127.0.0.1]) by localhost (gofish [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 22022-01 for <email1@gofish.acmeSoftware.com>; Fri, 1 Apr 2005 11:53:33 -0700 (MST) Apr 1 11:53:33 gofish postfix/smtpd[22039]: disconnect from mpls-qmqp-03.inet.qwest.net[63.231.195.114] Apr 1 11:53:33 gofish amavis[22022]: (22022-01) Checking: <email1@qwest.net> -> <email1@gofish.acmeSoftware.com> Apr 1 11:53:36 gofish amavis[22022]: (22022-01) spam_scan: hits=4.9 tests=BIZ_TLD,GAPPY_SUBJECT,HTML_30_40,HTML_MESSAGE,HTML_TAG_EXISTS_TBOD Y,VIAGRA Apr 1 11:53:36 gofish amavis[22022]: (22022-01) FWD via SMTP: [127.0.0.1]:10025 <email1@qwest.net> -> <email1@gofish.acmeSoftware.com> Apr 1 11:53:36 gofish postfix/smtpd[22046]: connect from localhost[127.0.0.1] Apr 1 11:53:36 gofish postfix/smtpd[22046]: D185D1763: client=localhost[127.0.0.1] Apr 1 11:53:36 gofish postfix/cleanup[22041]: D185D1763: message-id=<DKELJBPNDHJEECCAEPGOAEBMLEAA.email1@qwest.net> Apr 1 11:53:36 gofish postfix/qmgr[10679]: D185D1763: from=<email1@qwest.net>, size=4116, nrcpt=1 (queue active) Apr 1 11:53:36 gofish amavis[22022]: (22022-01) Passed, <email1@qwest.net> -> <email1@gofish.acmeSoftware.com>, Message-ID: <DKELJBPNDHJEECCAEPGOAEBMLEAA.email1@qwest.net>, Hits: 4.9 Apr 1 11:53:36 gofish amavis[22022]: (22022-01) TIMING [total 3301 ms] - SMTP EHLO: 4 (0%), SMTP pre-MAIL: 0 (0%), mkdir tempdir: 0 (0%), create email.txt: 0 (0%), SMTP pre-DATA-flush: 3 (0%), SMTP DATA: 39 (1%), body hash: 1 (0%), mkdir parts: 1 (0%), mime_decode: 15 (0%), get-file-type: 13 (0%), get-file-type: 12 (0%), decompose_part: 2 (0%), decompose_part: 0 (0%), parts: 0 (0%), AV-scan-1: 4 (0%), SA msg read: 2 (0%), SA parse: 1 (0%), SA check: 3106 (94%), fwd-connect: 34 (1%), fwd-mail-from: 4 (0%), fwd-rcpt-to: 9 (0%), write-header: 2 (0%), fwd-data: 0 (0%), fwd-data-end: 44 (1%), fwd-rundown: 1 (0%), unlink-2-files: 3 (0%), rundown: 0 (0%) Apr 1 11:53:36 gofish postfix/smtp[22042]: 69ED51612: to=<email1@gofish.acmeSoftware.com>, orig_to=<email1@acme.com>, relay=localhost[127.0.0.1], delay=3, status=sent (250 2.6.0 Ok, id=22022-01, from MTA: 250 Ok: queued as D185D1763) Apr 1 11:53:36 gofish postfix/qmgr[10679]: 69ED51612: removed Apr 1 11:53:36 gofish postfix/smtpd[22046]: disconnect from localhost[127.0.0.1] Apr 1 11:53:37 gofish postfix/lmtp[22048]: D185D1763: to=<email1@gofish.acmeSoftware.com>, relay=/var/lib/imap/socket/lmtp[/var/lib/imap/socket/lmtp], delay=1, status=sent (250 2.1.5 Ok) Apr 1 11:53:37 gofish postfix/qmgr[10679]: D185D1763: removed <SNIP> ***** /var/log/mail END *****
Richard Mixon (qwest) wrote:
OK, in /etc/amavisd.conf I set sa_tag_level_deflt = -20.0 saved and and did a "rcamavis restart"
Not sure how to use "less" to read mail, so I just used the "mail" command - but nothing was there from a ssh session. So I used our
He he!! In the end emails are just text files, so nothing hinders you to just open the mail stored on your server using "less". less /var/spool/imap/testuser/spam/.1242 There you are. (^-)
webmail, which is squirrelmail. It has an option to view "full header" which I did. It does not have the X-Spam* headers of any kind. See below
I just checked with my own squirrelmail installation. The "full header" view does show the X-Spam headers, so it seems as if your amavis isn't adding the desired headers. You can do two things to get an insight into your problem: $final_spam_destiny = D_PASS; Somewhere within the murky back of my rotting brain, I seem to recall that there are some settings that only work when $final_spam_destiny is set to "D_PASS". You could try that. Another way is to stop amavis and start it in debug mode. It will show lines like "header...." rcamavis stop amavis debug Then you have a real time view into the insides of amavis as is processes the mails. Sandy
Sandy Drobic wrote:
Richard Mixon (qwest) wrote: <SNIP>
You can do two things to get an insight into your problem:
$final_spam_destiny = D_PASS;
Somewhere within the murky back of my rotting brain, I seem to recall that there are some settings that only work when $final_spam_destiny is set to "D_PASS". You could try that.
Another way is to stop amavis and start it in debug mode. It will show lines like "header...." rcamavis stop amavis debug
Then you have a real time view into the insides of amavis as is processes the mails.
Sandy/Carlos/all, Sorry, but his saga continues. But I am learning a lot more than I ever knew before, thanks to each of you for your time. I checked my /etc/amavisd.conf and have the following settings: $final_virus_destiny = D_BOUNCE; # (defaults to D_BOUNCE) $final_banned_destiny = D_BOUNCE; # (defaults to D_BOUNCE) $final_spam_destiny = D_PASS; $final_bad_header_destiny = D_PASS; # (defaults to D_PASS), D_BOUNCE suggested Also, I finally had a chance to get debug turned on for amavsid. Even with debug on I do not see clue as to why the X-Spam* headers are not inserted. I have pretty closely inspected both the console output and the output into /var/log/mail, but do not see anything telling (at least to me). I do see one message in my /var/log/mail (see output #2 below) that might indicate a problem: Apr 6 09:01:26 gofish postfix/smtp[5170]: connect to localhost[::1]: Connection refused (port 10024) This port number is referred to in my /etc/postfix/master.cf file so I've attached the configuration lines from that file. Not sure if this matters, but we are using email client authentication and SSL encryption for our connections if that makes any difference. This has been working fine for quite a while. Our certificate is self-generated so each time Mozilla or Outlook connect we get a warning asking do we want to accept the certificate - but other than that no problems. So, here are the attachments below: 1) /etc/postfix/master.cf 2) Corresponding output from /var/log/mail 3) Headers received with the mail message at the client. Yes, its Outlook, but I have compared Outlook with Squirrelmail and they both pass the same headers. I tried looking in /var/spool, but as I am using Cyrus I do not see a spam folder for any of my users. 4) SPAM notification for the above message that was sent to the designated administrator account. I tried to sen: 5) Amavis debug console output, showing amavis startup and processing of a single SPAM message that I sent from a computer outside my domain (rnmixon@qwest.net) to a user (rnmixon@acme.com) on my domain. but it caused the message to exceed the 20,000 character limit the list has. I can break it in to two chunks and send it separately if needed. NOTE: I have changed my domain name in these messages from XXXXXXXX to Acme and altered my actual server IP address for a (possibly false) sense of security :). Thank you for any ideas/help on resolving this. - Richard 1) /etc/postfix/master.cf (comments ommitted): # ======================================================================== == # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (100) # ======================================================================== == smtp inet n - n - 2 smtpd -o content_filter=smtp:[localhost]:10024 smtps inet n - n - 2 smtpd -o content_filter=smtp:[localhost]:10024 -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes #submission inet n - n - - smtpd # -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes -o smtpd_etrn_restrictions=reject #628 inet n - n - - qmqpd pickup fifo n - n 60 1 pickup cleanup unix n - n - 0 cleanup qmgr fifo n - n 300 1 qmgr #qmgr fifo n - n 300 1 oqmgr #tlsmgr fifo - - n 300 1 tlsmgr rewrite unix - - n - - trivial-rewrite bounce unix - - n - 0 bounce defer unix - - n - 0 bounce trace unix - - n - 0 bounce verify unix - - n - 1 verify flush unix n - n 1000? 0 flush proxymap unix - - n - - proxymap smtp unix - - n - - smtp relay unix - - n - - smtp # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 showq unix n - n - - showq error unix - - n - - error local unix - n n - - local virtual unix - n n - - virtual lmtp unix - - n - - lmtp anvil unix - - n - 1 anvil localhost:10025 inet n - n - - smtpd -o content_filter= # # Interfaces to non-Postfix software. Be sure to examine the manual # pages of the non-Postfix software to find out what options it wants. # # maildrop. See the Postfix MAILDROP_README file for details. # maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient} cyrus unix - n n - - pipe user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user} uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) ifmail unix - n n - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp unix - n n - - pipe flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient vscan unix - n n - 10 pipe user=vscan argv=/usr/sbin/amavis ${sender} ${recipient} procmail unix - n n - - pipe flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient} 2) Corresponding output from /var/log/mail: Apr 6 09:01:25 gofish postfix/smtpd[5167]: connect from mpls-qmqp-03.inet.qwest.net[63.231.195.114] Apr 6 09:01:26 gofish postfix/smtpd[5167]: 2670B1693: client=mpls-qmqp-03.inet.qwest.net[63.231.195.114] Apr 6 09:01:26 gofish postfix/cleanup[5169]: 2670B1693: message-id=<DKELJBPNDHJEECCAEPGOMEFILFAA.rnmixon@qwest.net> Apr 6 09:01:26 gofish postfix/qmgr[25274]: 2670B1693: from=<rnmixon@qwest.net>, size=9795, nrcpt=1 (queue active) Apr 6 09:01:26 gofish postfix/smtp[5170]: connect to localhost[::1]: Connection refused (port 10024) Apr 6 09:01:26 gofish postfix/smtpd[5167]: disconnect from mpls-qmqp-03.inet.qwest.net[63.231.195.114] Apr 6 09:01:27 gofish postfix/smtpd[5174]: connect from localhost[127.0.0.1] Apr 6 09:01:27 gofish postfix/smtpd[5174]: B23BE17A9: client=localhost[127.0.0.1] Apr 6 09:01:27 gofish postfix/cleanup[5169]: B23BE17A9: message-id=<SA05152-01@gofish> Apr 6 09:01:27 gofish postfix/qmgr[25274]: B23BE17A9: from=<rnmixon@acme.com>, size=3250, nrcpt=1 (queue active) Apr 6 09:01:27 gofish postfix/smtpd[5174]: disconnect from localhost[127.0.0.1] Apr 6 09:01:27 gofish postfix/smtpd[5174]: connect from localhost[127.0.0.1] Apr 6 09:01:27 gofish postfix/smtpd[5174]: C337E17AA: client=localhost[127.0.0.1] Apr 6 09:01:27 gofish postfix/cleanup[5169]: C337E17AA: message-id=<DKELJBPNDHJEECCAEPGOMEFILFAA.rnmixon@qwest.net> Apr 6 09:01:27 gofish postfix/qmgr[25274]: C337E17AA: from=<rnmixon@qwest.net>, size=10272, nrcpt=1 (queue active) Apr 6 09:01:27 gofish postfix/smtpd[5174]: disconnect from localhost[127.0.0.1] Apr 6 09:01:27 gofish postfix/smtp[5170]: 2670B1693: to=<rnmixon@gofish.AcmeSoftware.com>, orig_to=<rnmixon@acme.com>, relay=localhost[127.0.0.1], delay=1, status=sent (250 2.6.0 Ok, id=05152-01, from MTA: 250 Ok: queued as C337E17AA) Apr 6 09:01:27 gofish postfix/qmgr[25274]: 2670B1693: removed Apr 6 09:01:27 gofish postfix/lmtp[5177]: B23BE17A9: to=<rnmixon@gofish.AcmeSoftware.com>, orig_to=<rnmixon@acme.com>, relay=/var/lib/imap/socket/lmtp[/var/lib/imap/socket/lmtp], delay=0, status=sent (250 2.1.5 Ok) Apr 6 09:01:27 gofish postfix/qmgr[25274]: B23BE17A9: removed Apr 6 09:01:27 gofish postfix/lmtp[5180]: C337E17AA: to=<rnmixon@gofish.AcmeSoftware.com>, relay=/var/lib/imap/socket/lmtp[/var/lib/imap/socket/lmtp], delay=0, status=sent (250 2.1.5 Ok) Apr 6 09:01:27 gofish postfix/qmgr[25274]: C337E17AA: removed 3) Headers received with the mail message at the client: Here are the corresponding messages from /var/log/mail: Return-Path: <rnmixon@qwest.net> Received: from gofish.AcmeSoftware.com ([unix socket]) by gofish (Cyrus v2.2.3) with LMTP; Wed, 06 Apr 2005 09:01:27 -0700 X-Sieve: CMU Sieve 2.2 Received: from localhost (localhost [127.0.0.1]) by gofish.AcmeSoftware.com (Postfix) with ESMTP id C337E17AA for <rnmixon@gofish.AcmeSoftware.com>; Wed, 6 Apr 2005 09:01:27 -0700 (MST) Received: from gofish.AcmeSoftware.com ([127.0.0.1]) by localhost (gofish [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 05152-01 for <rnmixon@gofish.AcmeSoftware.com>; Wed, 6 Apr 2005 09:01:26 -0700 (MST) Received: from mpls-qmqp-03.inet.qwest.net (mpls-qmqp-03.inet.qwest.net [63.231.195.114]) by gofish.AcmeSoftware.com (Postfix) with SMTP id 2670B1693 for <rnmixon@acme.com>; Wed, 6 Apr 2005 09:01:26 -0700 (MST) Received: (qmail 23637 invoked by uid 0); 6 Apr 2005 16:01:25 -0000 Received: from mpls-pop-07.inet.qwest.net (63.231.195.7) by mpls-qmqp-03.inet.qwest.net with QMQP; 6 Apr 2005 16:01:25 -0000 Received: from vdsl-130-13-0-7.phnx.qwest.net (HELO redfish) (130.13.0.7) by mpls-pop-07.inet.qwest.net with SMTP; 6 Apr 2005 16:01:25 -0000 Date: Wed, 6 Apr 2005 09:02:37 -0700 Message-ID: <DKELJBPNDHJEECCAEPGOMEFILFAA.rnmixon@qwest.net> From: "Richard Mixon (qwest)" <rnmixon@qwest.net> To: rnmixon@acme.com Reply-To: "Richard Mixon" <rnmixon@Acme.com> Subject: Test #10 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0240_01C53A87.614C3F30" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Virus-Scanned: by amavisd-new at acme.com Importance: Normal X-Sieve: CMU Sieve 2.2 X-Virus-Scanned: by amavisd-new at acme.com 4) SPAM notification for the above message that was sent to the designated administrator account. -----Original Message----- From: rnmixon@acme.com [mailto:rnmixon@acme.com] Sent: Wednesday, April 06, 2005 9:01 AM To: rnmixon@acme.com Subject: SPAM FROM <rnmixon@qwest.net> Unsolicited bulk email from: rnmixon@qwest.net Subject: Test #10 According to the 'Received:' trace, the message originated at: vdsl-130-13-0-7.phnx.qwest.net (HELO redfish) (130.13.0.7) The message WILL BE delivered to: <rnmixon@gofish.AcmeSoftware.com> Not quarantined. SpamAssassin report: Spam detection software, running on the system "gofish.AcmeSoftware.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or block similar future email. If you have any questions, see the administrator of that system for details. Content preview: Content analysis details: (5.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------- ------ 2.4 ONLINE_PHARMACY BODY: Online Pharmacy 0.5 HTML_40_50 BODY: Message is 40% to 50% HTML 0.1 HTML_LINK_CLICK_HERE BODY: HTML link text says "click here" 0.0 HTML_MESSAGE BODY: HTML included in message 0.1 HTML_FONT_BIG BODY: HTML has a big font 0.1 HTML_TAG_EXISTS_TBODY BODY: HTML has "tbody" tag 1.8 HTML_SHOUTING5 BODY: HTML has very strong "shouting" markup 0.1 HTML_FONTCOLOR_RED BODY: HTML font color is red 0.0 CLICK_BELOW Asks you to click below ------------------------- BEGIN HEADERS ----------------------------- Return-Path: <rnmixon@qwest.net> Received: from mpls-qmqp-03.inet.qwest.net (mpls-qmqp-03.inet.qwest.net [63.231.195.114]) by gofish.AcmeSoftware.com (Postfix) with SMTP id 2670B1693 for <rnmixon@acme.com>; Wed, 6 Apr 2005 09:01:26 -0700 (MST) Received: (qmail 23637 invoked by uid 0); 6 Apr 2005 16:01:25 -0000 Received: from mpls-pop-07.inet.qwest.net (63.231.195.7) by mpls-qmqp-03.inet.qwest.net with QMQP; 6 Apr 2005 16:01:25 -0000 Received: from vdsl-130-13-0-7.phnx.qwest.net (HELO redfish) (130.13.0.7) by mpls-pop-07.inet.qwest.net with SMTP; 6 Apr 2005 16:01:25 -0000 Date: Wed, 6 Apr 2005 09:02:37 -0700 Message-ID: <DKELJBPNDHJEECCAEPGOMEFILFAA.rnmixon@qwest.net> From: "Richard Mixon (qwest)" <rnmixon@qwest.net> To: rnmixon@acme.com Reply-To: "Richard Mixon" <rnmixon@Acme.com> Subject: Test #10 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0240_01C53A87.614C3F30" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Virus-Scanned: by amavisd-new at acme.com Importance: Normal X-Sieve: CMU Sieve 2.2 -------------------------- END HEADERS ------------------------------
Richard Mixon (qwest) wrote:
Sandy/Carlos/all,
Sorry, but his saga continues. But I am learning a lot more than I ever knew before, thanks to each of you for your time.
That's what life is about, learning something new every day. (^-^)
Even with debug on I do not see clue as to why the X-Spam* headers are not inserted. I have pretty closely inspected both the console output and the output into /var/log/mail, but do not see anything telling (at least to me).
This is what my debug outpot generates (only the relevant lines) Apr 6 19:49:14 japantest.homelinux.com /usr/sbin/amavisd[28276]: (28276-01) lookup: (scalar) matches, result="-20" Apr 6 19:49:14 japantest.homelinux.com /usr/sbin/amavisd[28276]: (28276-01) lookup (spam_tag_level) => true, "suse-linux@japantest.homelinux.com" matches, result="-20", matching_key="(constant:-20)" Apr 6 19:49:14 japantest.homelinux.com /usr/sbin/amavisd[28276]: (28276-01) headers CLUSTERING: NEW CLUSTER <suse-linux@japantest.homelinux.com>: hits=-3.213, tag=1, tag2=0, subj=0, subj_u=0, local=1, bl= This is, what should appear. Here you can see that $spam_tag_level is set and evaluated. Apr 6 19:49:14 japantest.homelinux.com /usr/sbin/amavisd[28276]: (28276-01) header: X-Virus-Scanned: by amavisd-new at japantest.homelinux.com\n This header is set by the following line in amavisd.conf: # Add X-Virus-Scanned header field to mail? $X_HEADER_TAG = 'X-Virus-Scanned'; # (default: undef) # Leave empty to add no header field # (default: undef) $X_HEADER_LINE = "by amavisd-new at $myhostname"; Apr 6 19:49:14 japantest.homelinux.com /usr/sbin/amavisd[28276]: (28276-01) header: X-Spam-Status: No, hits=-3.213 tagged_above=-20 required=3.5 tests=AWL,\n BAYES_00\n And here is the line that is added. Apr 6 19:49:14 japantest.homelinux.com /usr/sbin/amavisd[28276]: (28276-01) header: X-Spam-Level: \n I really have no idea why it doesn't work for you. Have you tried to verify the perl packages that amavisd and spam are using?
I do see one message in my /var/log/mail (see output #2 below) that might indicate a problem:
Apr 6 09:01:26 gofish postfix/smtp[5170]: connect to localhost[::1]: Connection refused (port 10024)
That is no real problem. It seems you have not disabled IPv6, which is queried ahead of IPv4. Disabling IPv6 will get rid of that error message, only to replace it with another: "...protocol family not supported..." It's a question of style which error message you prefer. I haven't been able to get rid of it. Is IPv6 support compiled into postfix by Suse? I think so.
This port number is referred to in my /etc/postfix/master.cf file so I've attached the configuration lines from that file.
It's also set in amavisd.conf as the receiving port on localhost.
Not sure if this matters, but we are using email client authentication and SSL encryption for our connections if that makes any difference. This has been working fine for quite a while. Our certificate is self-generated so each time Mozilla or Outlook connect we get a warning asking do we want to accept the certificate - but other than that no problems.
Shouldn't be a problem. The logs you send don't really help to narrow down the problem. Could you rather post /etc/amavisd.conf? Sandy
Sandy Drobic wrote:
Richard Mixon (qwest) wrote: <SNIP> <SNIP> The logs you send don't really help to narrow down the problem. Could you rather post /etc/amavisd.conf?
Hmms - the "matches" lines from your debug output make sense. I find some "matches" in my debug output, but they are quite different. I have included the debug output form amavisd that is most similar (with capitalized annotations), followed by my /etc/amavisd.conf as you requested. The amavisd.conf is 67kb, so I squished all of the comments out, but left the Section comments. Thanks once again - Richard 1) Debug output of amavis while processing spam message: 09:01:26 gofish amavisd[5152]: Net::Server: 2005/04/06-09:01:26 CONNECT TCP Peer: "127.0.0.1:14047" Local: "127.0.0.1:10024" [BEGINNING OF REMAINING LINES ARE ABBREVIATED TO SAVE SPACE] 26 go amd: lookup_ip_acl: key="127.0.0.1" matches "127.0.0.1", result=1 26 go amd: prolong_timer after new request - timer reset: remaining time = 300 s 26 go amd: SMTP> 220 [127.0.0.1] ESMTP amavisd-new service ready 26 go amd: prolong_timer after reading SMTP command: remaining time = 300 s 26 go amd: SMTP< EHLO gofish.AcmeSoftware.com\r\n 26 go amd: ESMTP> 250-[127.0.0.1] 26 go amd: ESMTP> 250-PIPELINING 26 go amd: ESMTP> 250-SIZE 26 go amd: ESMTP> 250-8BITMIME 26 go amd: ESMTP> 250 ENHANCEDSTATUSCODES <SNIP> 26 go amd: (05152-01) Clam Antivirus-clamd result: /var/spool/amavis/amavis-20050406T090126-05152/parts: OK\n 26 go amd: (05152-01) prolong_timer after virus_scan: remaining time = 300 s 26 go amd: (05152-01) white_black_list: checking sender <rnmixon@qwest.net> 26 go amd: (05152-01) lookup_acl: key="rnmixon@qwest.net", no match 26 go amd: (05152-01) lookup_RE: key="rnmixon@qwest.net", no match 26 go amd: (05152-01) lookup_hash: key="rnmixon@qwest.net", no match 26 go amd: (05152-01) lookup_hash: key="rnmixon@", no match 26 go amd: (05152-01) lookup_hash: key="qwest.net", no match 26 go amd: (05152-01) lookup_hash: key=".qwest.net", no match 26 go amd: (05152-01) lookup_hash: key=".net", no match 26 go amd: (05152-01) lookup_hash: key=".", no match 26 go amd: (05152-01) lookup_acl: key="rnmixon@qwest.net", no match 26 go amd: (05152-01) lookup_acl: key="rnmixon@gofish.AcmeSoftware.com", no match 26 go amd: (05152-01) calling SA parse, SA version 2.64 26 go amd: (05152-01) CALLING SA check 27 go amd: (05152-01) RETURNED FROM NoMailAudit::check, time left: 29 s 27 go amd: (05152-01) prolong_timer after spam_scan_SA: remaining time = 300 s 27 go amd: (05152-01) spam_scan: hits=5 tests=CLICK_BELOW,HTML_40_50,HTML_FONTCOLOR_RED,HTML_FONT_BIG,HTML_LINK_ CLICK_HERE,HTML_MESSAGE,HTML_SHOUTING5,HTML_TAG_EXISTS_TBODY,ONLINE_PHAR MACY 27 go amd: (05152-01) prolong_timer after spam_scan: remaining time = 300 s <FIRST MATCHES LINE> 27 go amd: (05152-01) lookup: (scalar) matches, result="5" 27 go amd: (05152-01) lookup: (scalar) matches, result="-20" 27 go amd: (05152-01) lookup: (scalar) matches, result="5" 27 go amd: (05152-01) lookup: (scalar) matches, result="5" 27 go amd: (05152-01) do_spam: looking for a quarantine address 27 go amd: (05152-01) SPAM, <rnmixon@qwest.net> -> <rnmixon@gofish.AcmeSoftware.com>, Yes, hits=5.0 tag1=-20.0 tag2=5.0 kill=5.0 tests=CLICK_BELOW, HTML_40_50, HTML_FONTCOLOR_RED, HTML_FONT_BIG, HTML_LINK_CLICK_HERE, HTML_MESSAGE, HTML_SHOUTING5, HTML_TAG_EXISTS_TBODY, ONLINE_PHARMACY <MORE MATCHES> 27 go amd: (05152-01) lookup: (scalar) matches, result="rnmixon@acme.com" 27 go amd: (05152-01) DO_SPAM - NOTIFICATIONS, sender: rnmixon@qwest.net 27 go amd: (05152-01) lookup_acl: key="rnmixon@qwest.net", no match 27 go amd: (05152-01) first_received_from: vdsl-130-13-0-7.phnx.qwest.net (HELO redfish) (130.13.0.7) 27 go amd: (05152-01) first_received_from: vdsl-130-13-0-7.phnx.qwest.net (HELO redfish) (130.13.0.7) 27 go amd: (05152-01) string_to_mime_entity Date: Wed, 6 Apr 2005 09:01:27 -0700 (MST) 27 go amd: (05152-01) string_to_mime_entity From: rnmixon@acme.com 27 go amd: (05152-01) string_to_mime_entity Subject: SPAM FROM <rnmixon@qwest.net> 27 go amd: (05152-01) string_to_mime_entity To: <rnmixon@acme.com> 27 go amd: (05152-01) string_to_mime_entity Message-ID: <SA05152-01@gofish> 27 go amd: (05152-01) SEND via SMTP: [127.0.0.1]:10025 <rnmixon@acme.com> -> <rnmixon@acme.com> 27 go amd: (05152-01) Remote host introduces itself as: gofish.AcmeSoftware.com 27 go amd: (05152-01) prolong_timer after fwd-connect: remaining time = 300 s 27 go amd: (05152-01) prolong_timer after fwd-mail-from: remaining time = 300 s 27 go amd: (05152-01) prolong_timer after fwd-rcpt-to: remaining time = 300 s 27 go amd: (05152-01) response to DATA: "354 End data with <CR><LF>.<CR><LF>" 27 go amd: (05152-01) prolong_timer after fwd-data: remaining time = 300 s 27 go amd: (05152-01) prolong_timer after fwd-data-end: remaining time = 300 s 27 go amd: (05152-01) response to data end: "250 Ok: queued as B23BE17A9" 27 go amd: (05152-01) prolong_timer after fwd-rundown-1: remaining time = 300 s 27 go amd: (05152-01) mail_via_smtp: 250 2.6.0 Ok, id=05152-01, from MTA: 250 Ok: queued as B23BE17A9 27 go amd: (05152-01) one_response_for_all <rnmixon@acme.com>: success, dsn_needed=0, '250 2.6.0 Ok, id=05152-01, from MTA: 250 Ok: queued as B23BE17A9' 27 go amd: (05152-01) DO_SPAM DONE 27 go amd: (05152-01) header: Received: from gofish.AcmeSoftware.com ([127.0.0.1])\n by localhost (gofish [127.0.0.1]) (amavisd-new, port 10024) with ESMTP\n id 05152-01 for <rnmixon@gofish.AcmeSoftware.com>;\n Wed, 6 Apr 2005 09:01:26 -0700 (MST)\n 27 go amd: (05152-01) header: X-Virus-Scanned: by amavisd-new at acme.com\n 27 go amd: (05152-01) lookup_acl: key="rnmixon@gofish.AcmeSoftware.com", no match 27 go amd: (05152-01) lookup_acl: key="rnmixon@gofish.AcmeSoftware.com", no match <MORE MATCHES> 27 go amd: (05152-01) lookup: (scalar) matches, result="-20" 27 go amd: (05152-01) lookup: (scalar) matches, result="5" 27 go amd: (05152-01) headers CLUSTERING: NEW CLUSTER <rnmixon@gofish.AcmeSoftware.com>: hits=5.0, tag=0, tag2=0, subj=0, subj_u=0, local=0, bl=0 27 go amd: (05152-01) headers CLUSTERING: done all 1 recips in one go <SNIP> 2) /etc/amavisd.conf (comments removed): use strict; # # Section I - Essential daemon and MTA settings # $MYHOME = '/var/spool/amavis'; $mydomain = 'Acme.com'; $daemon_user = 'vscan'; $daemon_group = 'vscan'; $TEMPBASE = $MYHOME; $ENV{TMPDIR} = $TEMPBASE; $max_servers = 2; $max_requests = 10; $child_timeout=5*60; @local_domains_acl = ( ".$mydomain" ); # # Section II - MTA specific (defaults should be ok) # $unix_socketname = "$MYHOME/amavisd.sock"; $inet_socket_port = 10024; @inet_acl = qw( 127.0.0.1 ); $DO_SYSLOG = 1; $LOGFILE = "$MYHOME/amavis.log"; $log_level = 2; $log_templ = '[? %#V |[? %#F |[?%#D|Not-Delivered|Passed]|BANNED name/type (%F)]|INFECTED (%V)], <%o> -> [<%R>|,][? %i ||, quarantine %i], Message-ID: %m, Hits: %c'; # # Section IV - Notifications/DSN, BOUNCE/REJECT/DROP/PASS destiny, quarantine # $final_virus_destiny = D_BOUNCE; $final_banned_destiny = D_BOUNCE; $final_spam_destiny = D_PASS; $final_bad_header_destiny = D_PASS; $viruses_that_fake_sender_re = new_RE( qr'nimda|hybris|klez|bugbear|yaha|braid|sobig|fizzer|palyh|peido|holar 'i, qr'tanatos|lentin|bridex|mimail|trojan\.dropper|dumaru|parite|spaces'i , qr'dloader|galil|gibe|swen|netwatch|bics|sbrowse|sober|rox|val(hal)?la 'i, qr'frethem|sircam|be?agle|tanx|mydoom|novarg|shimg|netsky|somefool|moo down'i, qr'@mm|@MM', qr'Worm'i, [qr'^(EICAR|Joke\.|Junk\.)'i => 0], [qr'^(WM97|OF97|W95/CIH-|JS/Fort)'i => 0], [qr/.*/ => 1], ); $virus_admin = "rnmixon\@$mydomain"; $spam_admin = "rnmixon\@$mydomain"; $mailfrom_notify_admin = "rnmixon\@$mydomain"; $mailfrom_notify_recip = "rnmixon\@$mydomain"; $mailfrom_notify_spamadmin = "rnmixon\@$mydomain"; $mailfrom_to_quarantine = ''; $QUARANTINEDIR = '/var/spool/amavis/virusmails'; $virus_quarantine_to = 'virus-quarantine'; $spam_quarantine_to = undef; $X_HEADER_TAG = 'X-Virus-Scanned'; $X_HEADER_LINE = "by amavisd-new at $mydomain"; $undecipherable_subject_tag = '***UNCHECKED*** '; $remove_existing_x_scanned_headers = 0; $remove_existing_spam_headers = 1; $keep_decoded_original_re = new_RE( qr'^MAIL-UNDECIPHERABLE$', qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i, ); $banned_filename_re = new_RE( qr'\.[^.]*\.(exe|vbs|pif|scr|bat|cmd|com|dll)$'i, qr'^\.exe$'i, qr'^application/x-msdownload$'i, qr'^application/x-msdos-program$'i, ); # # Section V - Per-recipient and per-sender handling, whitelisting, etc. # $sql_select_white_black_list = undef; $recipient_delimiter = '+'; $localpart_is_case_sensitive = 0; $blacklist_sender_re = new_RE( qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryou|greatcasino)@'i, qr'^(investments|lose_weight_today|market.alert|money2you|MyGreenCar d)@'i, qr'^(new\.tld\.registry|opt-out|opt-in|optin|saveonlsmoking2002k)@'i , qr'^(specialoffer|specialoffers|stockalert|stopsnoring|wantsome)@'i, qr'^(workathome|yesitsfree|your_friend|greatoffers)@'i, qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i, ); map { $whitelist_sender{lc($_)}=1 } (qw( nobody@cert.org owner-alert@iss.net slashdot@slashdot.org bugtraq@securityfocus.com NTBUGTRAQ@LISTSERV.NTBUGTRAQ.COM security-alerts@linuxsecurity.com amavis-user-admin@lists.sourceforge.net notification-return@lists.sophos.com mailman-announce-admin@python.org owner-postfix-users@postfix.org owner-postfix-announce@postfix.org owner-sendmail-announce@Lists.Sendmail.ORG owner-technews@postel.ACM.ORG lvs-users-admin@LinuxVirtualServer.org ietf-123-owner@loki.ietf.org cvs-commits-list-admin@gnome.org rt-users-admin@lists.fsck.com clp-request@comp.nus.edu.sg surveys-errors@lists.nua.ie emailNews@genomeweb.com owner-textbreakingnews@CNNIMAIL12.CNN.COM yahoo-dev-null@yahoo-inc.com returns.groups.yahoo.com )); # # Section VI - Resource limits # $MAXLEVELS = 14; $MAXFILES = 1500; $MIN_EXPANSION_QUOTA = 100*1024; $MAX_EXPANSION_QUOTA = 300*1024*1024; $MIN_EXPANSION_FACTOR = 5; $MAX_EXPANSION_FACTOR = 500; # # Section VII - External programs, virus scanners $path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin'; $file = 'file'; $gzip = 'gzip'; $bzip2 = 'bzip2'; $lzop = 'lzop'; $uncompress = ['uncompress', 'gzip -d', 'zcat']; $unfreeze = ['unfreeze', 'freeze -d', 'melt', 'fcat']; $arc = ['nomarch', 'arc']; $unarj = ['arj', 'unarj']; $unrar = ['rar', 'unrar']; $zoo = 'zoo'; $lha = 'lha'; $cpio = ['gcpio','cpio']; $sa_timeout = 30; $sa_mail_body_size_limit = 256*1024; $sa_tag_level_deflt = -20.0; $sa_tag2_level_deflt = 5.0; $sa_kill_level_deflt = $sa_tag2_level_deflt; $sa_dsn_cutoff_level = 10; $sa_spam_subject_tag = '***SPAM*** '; $sa_spam_modifies_subj = 1; @av_scanners = ( ['Clam Antivirus-clamd', \&ask_daemon, ["CONTSCAN {}\n", "/var/lib/clamav/clamd-socket"], qr/\bOK$/, qr/\bFOUND$/, qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ], ['KasperskyLab AVP - aveclient', ['/usr/local/kav/bin/aveclient','/usr/local/share/kav/bin/aveclient' , '/opt/kav/bin/aveclient','aveclient'], '-p /var/run/aveserver -s {}/*', [0,3,6,8], qr/\b(INFECTED|SUSPICION)\b/, qr/(?:INFECTED|SUSPICION) (.+)/, ], ['KasperskyLab AntiViral Toolkit Pro (AVP)', ['avp'], '-* -P -B -Y -O- {}', [0,8,16,24], [2,3,4,5,6, 18,19,20,21,22], qr/infected: (.+)/, sub {chdir('/opt/AVP') or die "Can't chdir to AVP: $!"}, sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"}, ], ## ## ['KasperskyLab AVPDaemonClient', [ '/opt/AVP/kavdaemon', 'kavdaemon', '/opt/AVP/AvpDaemonClient', 'AvpDaemonClient', '/opt/AVP/AvpTeamDream', 'AvpTeamDream', '/opt/AVP/avpdc', 'avpdc' ], "-f=$TEMPBASE {}", [0,8,16,24], [2,3,4,5,6, 18,19,20,21,22], qr/infected: ([^\r\n]+)/ ], ## ['H+BEDV AntiVir or CentralCommand Vexira Antivirus', ['antivir','vexira'], '--allfiles -noboot -nombr -rs -s -z {}', [0], qr/ALERT:|VIRUS:/, qr/(?x)^\s* (?: ALERT: \s* (?: \[ | [^']* ' ) | (?i) VIRUS:\ .*?\ virus\ '?) ( [^\]\s']+ )/ ], ## ['Command AntiVirus for Linux', 'csav', '-all -archive -packed {}', [50], [51,52,53], qr/Infection: (.+)/ ], ## ['Symantec CarrierScan via Symantec CommandLineScanner', 'cscmdline', '-a scan -i 1 -v -s 127.0.0.1:7777 {}', qr/^Files Infected:\s+0$/, qr/^Infected\b/, qr/^(?:Info|Virus Name):\s+(.+)/ ], ## ['Symantec AntiVirus Scan Engine', 'savsecls', '-server 127.0.0.1:7777 -mode scanrepair -details -verbose {}', [0], qr/^Infected\b/, qr/^(?:Info|Virus Name):\s+(.+)/ ], ## ['drweb - DrWeb Antivirus', ['/usr/local/drweb/drweb', '/opt/drweb/drweb', 'drweb'], '-path={} -al -go -ot -cn -upn -ok-', [0,32], [1,33], qr' infected (?:with|by)(?: virus)? (.*)$'], ## ['F-Secure Antivirus', 'fsav', '--dumb --mime --archive {}', [0], [3,8], qr/(?:infection|Infected|Suspected): (.+)/ ], ['CAI InoculateIT', 'inocucmd', '-sec -nex {}', [0], [100], qr/was infected by virus (.+)/ ], ['MkS_Vir for Linux (beta)', ['mks32','mks'], '-s {}/*', [0], [1,2], qr/--[ \t]*(.+)/ ], ['MkS_Vir daemon', 'mksscan', '-s -q {}', [0], [1..7], qr/^... (\S+)/ ], ## ['ESET Software NOD32', 'nod32', '-all -subdir+ {}', [0], [1,2], qr/^.+? - (.+?)\s*(?:backdoor|joke|trojan|virus|worm)/ ], ## ['ESET Software NOD32 - Client/Server Version', 'nod32cli', '-a -r -d recurse --heur standard {}', [0], [10,11], qr/^\S+\s+infected:\s+(.+)/ ], ## ['Norman Virus Control v5 / Linux', 'nvccmd', '-c -l:0 -s -u {}', [0], [1], qr/(?i).* virus in .* -> \'(.+)\'/ ], ## ['Panda Antivirus for Linux', ['pavcl'], '-aut -aex -heu -cmp -nbr -nor -nso -eng {}', qr/Number of files infected[ .]*: 0(?!\d)/, qr/Number of files infected[ .]*: 0*[1-9]/, qr/Found virus :\s*(\S+)/ ], ## ['NAI McAfee AntiVirus (uvscan)', 'uvscan', '--secure -rv --mime --summary --noboot - {}', [0], [13], qr/(?x) Found (?: \ the\ (.+)\ (?:virus|trojan) | \ (?:virus|trojan)\ or\ variant\ ([^ ]+) | :\ (.+)\ NOT\ a\ virus)/, ], ## ['VirusBuster', ['vbuster', 'vbengcl'], "{} -ss -i '*' -log=$MYHOME/vbuster.log", [0], [1], qr/: '(.*)' - Virus/ ], ## ['CyberSoft VFind', 'vfind', '--vexit {}/*', [0], [23], qr/# ], ## ['Ikarus AntiVirus for Linux', 'ikarus', '{}', [0], [40], qr/Signature (.+) found/ ], ## ['BitDefender', 'bdc', '--all --arc --mail {}', qr/^Infected files *:0(?!\d)/, qr/^(?:Infected files|Identified viruses|Suspect files) *:0*[1-9]/, qr/(?:suspected|infected): (.*)$/ ], ); @av_scanners_backup = ( ## ['Clam Antivirus - clamscan', 'clamscan', '--stdout --no-summary -r {}', [0], [1], qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ], ## ['FRISK F-Prot Antivirus', ['f-prot','f-prot.sh'], '-dumb -archive -packed {}', [0,8], [3,6], qr/Infection: (.+)/ ], ## ['Trend Micro FileScanner', ['/etc/iscan/vscan','vscan'], '-za -a {}', [0], qr/Found virus/, qr/Found virus (.+) in/ ], ['KasperskyLab kavscanner', ['/opt/kav/bin/kavscanner','kavscanner'], '-i1 -xp {}', [0,10,15], [5,20,21,25], qr/(?:CURED|INFECTED|CUREFAILED|WARNING|SUSPICION) (.*)/ , sub {chdir('/opt/kav/bin') or die "Can't chdir to kav: $!"}, sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"}, ], ); # # Section VIII - Debugging # 1;
The Wednesday 2005-04-06 at 12:33 -0700, Richard Mixon (qwest) wrote:
1) Debug output of amavis while processing spam message:
Umpf! Instead of that, you could have touched this: $log_level = 2; and set it to 3 or 4 (in /etc/amavisd.conf).
09:01:26 gofish amavisd[5152]: Net::Server: 2005/04/06-09:01:26 CONNECT TCP Peer: "127.0.0.1:14047" Local: "127.0.0.1:10024" [BEGINNING OF REMAINING LINES ARE ABBREVIATED TO SAVE SPACE]
Argh. I'm feeling sleeeepy... (early hours here). Ok, a quick glance.
$log_level = 2;
Increase it, don't use perl debugging.
$remove_existing_x_scanned_headers = 0; $remove_existing_spam_headers = 1;
I wonder :-? -- Cheers, Carlos Robinson
The Wednesday 2005-04-06 at 20:36 +0200, Sandy Drobic wrote:
And here is the line that is added.
Apr 6 19:49:14 japantest.homelinux.com /usr/sbin/amavisd[28276]: (28276-01) header: X-Spam-Level: \n
I think you need to increase debug level in amavisd.conf to get that log line. Richard, try that.
Apr 6 09:01:26 gofish postfix/smtp[5170]: connect to localhost[::1]: Connection refused (port 10024)
That is no real problem. It seems you have not disabled IPv6, which is queried ahead of IPv4. Disabling IPv6 will get rid of that error message, only to replace it with another: "...protocol family not supported..." It's a question of style which error message you prefer. I haven't been able to get rid of it. Is IPv6 support compiled into postfix by Suse? I think so.
You probably have a line in main.cf like this one: mynetworks = 192.168.100.2/8 127.0.0.0/8 [::1/128] Just remove the [::1/128] part.
The logs you send don't really help to narrow down the problem. Could you rather post /etc/amavisd.conf?
You should have posted the grep trick to remove comments :-p -- Cheers, Carlos Robinson
The Friday 2005-04-01 at 12:05 -0700, Richard Mixon (qwest) wrote:
X-Virus-Scanned: by amavisd-new at acme.com ... Apr 1 11:53:33 gofish postfix/smtpd[22039]: connect from mpls-qmqp-03.inet.qwest.net[63.231.195.114]
Your machine, is it acme.com, or is it "gofish...somewhere"? There is an amavis-new running at the "acme.com" machine. The amavis-new program running at gofish...somewhere will not scan it again, I think. Can you clarify the name clash there? -- Cheers, Carlos Robinson
Carlos E. R. wrote:
The Friday 2005-04-01 at 12:05 -0700, Richard Mixon (qwest) wrote:
X-Virus-Scanned: by amavisd-new at acme.com ... Apr 1 11:53:33 gofish postfix/smtpd[22039]: connect from mpls-qmqp-03.inet.qwest.net[63.231.195.114]
Your machine, is it acme.com, or is it "gofish...somewhere"? There is an amavis-new running at the "acme.com" machine. The amavis-new program running at gofish...somewhere will not scan it again, I think.
Can you clarify the name clash there?
Carlos, My many thanks for your efforts and analysis. I apologize for the "acme.com" confusion. Yes, "gofish" is the actual host name - but due to a bit of paranoia, I tried to change all references to my real domain in the posting to "acme.com". It is possible that I slipped up and did not make the change uniformly - however I left the hostname a "gofish" in all places. I have made a first pass through your postings ... and have a learned a lot. Still my major outstanding problem is that we are not getting any X-Spam* headers at all in the emails - even though we can clearly see that the spam analysis is working. This does not appear to be an Outlook problem as SquirrelMail also has the problem. I just tried Mozilla mail agent and it also shows not X-Spam* headers - info or otherwise. Any other ideas? Thank you - Richard
The Monday 2005-04-04 at 15:05 -0700, Richard Mixon (qwest) wrote:
Can you clarify the name clash there?
Carlos,
My many thanks for your efforts and analysis. I apologize for the "acme.com" confusion. Yes, "gofish" is the actual host name - but due to a bit of paranoia, I tried to change all references to my real domain in the posting to "acme.com".
I can understand that :-) - but it confused my analysis.
I have made a first pass through your postings ... and have a learned a lot. Still my major outstanding problem is that we are not getting any X-Spam* headers at all in the emails - even though we can clearly see that the spam analysis is working. This does not appear to be an Outlook problem as SquirrelMail also has the problem. I just tried Mozilla mail agent and it also shows not X-Spam* headers - info or otherwise.
Any other ideas?
Not yet... it is late here, and as the list has been down some days, so I don't remember where we where, and I'm not very awake to reread it - I'll have a go tomorrow, and hopefully somebody else will say something before that. Check your amavis configuration carefully. Try to send yourself emails locally, track them. You can increase debug info. -- Cheers, Carlos Robinson
The Friday 2005-04-01 at 10:35 -0700, Richard Mixon (qwest) wrote:
**** /var/log/mail - BEGIN **** <SNIP> Apr 1 09:24:12 gofish amavis[19362]: (19362-01) Passed, <email1@qwest.net> -> <email1@gofish.acmesoftware.com>, Message-ID: <DKELJBPNDHJEECCAEPGOKEALLEAA.email1@qwest.net>, Hits: 3.584
Amavis is working, and gave a level of "3.584" to that email.
Apr 1 09:24:12 gofish amavis[19362]: (19362-01) TIMING [total 1300 ms] - SMTP EHLO: 4 (0%), SMTP pre-MAIL: 0 (0%), mkdir tempdir: 0 (0%), create email.txt: 0 (0%), SMTP pre-DATA-flush: 3 (0%), SMTP DATA: 38 (3%), body hash: 1 (0%), mkdir parts: 1 (0%), mime_decode: 15 (1%), get-file-type: 14 (1%), get-file-type: 14 (1%), decompose_part: 2 (0%), decompose_part: 0 (0%), parts: 0 (0%), AV-scan-1: 4 (0%), SA msg read: 2 (0%), SA parse: 1 (0%), SA check: 1106 (85%), fwd-connect: 33 (3%), fwd-mail-from: 2 (0%), fwd-rcpt-to: 7 (1%), write-header: 2 (0%), fwd-data: 0 (0%), fwd-data-end: 46 (4%), fwd-rundown: 1 (0%), unlink-2-files: 3 (0%), rundown: 0 (0%)
You can tell amavis-new not to add this line, it is too verbose. But you can see there that it in fact running SA.
**** Received message headers - BEGIN **** .... Content-Type: multipart/alternative; boundary="----=_NextPart_000_04AC_01C5369C.8624BD80" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
I would try to use a "real" mail program, say Mozilla, for example...
X-Virus-Scanned: by amavisd-new at acme.com
It has been scanned.
**** Received message headers - END ****
**** /var/log/messages - BEGIN **** ... Apr 1 09:22:16 gofish amavis[19360]: ANTI-SPAM code loaded
Ok.
**** /etc/amavisd.conf - BEGIN **** <SNIP> ...
# default values, can be overridden by more specific lookups, e.g. SQL $sa_tag_level_deflt = 3.0; # add spam info headers if at, or above that level $sa_tag2_level_deflt = 5.0;
These two are interesting. Info headers are only added if level is more or equal to 3.0. You have the explanation below: # a quick reference: # tag_level controls adding the X-Spam-Status and X-Spam-Level headers, # tag2_level controls adding 'X-Spam-Flag: YES', and editing Subject, # kill_level controls 'evasive actions' (reject, quarantine, extensions); # it only makes sense to maintain the relationship: # tag_level <= tag2_level <= kill_level < $sa_dsn_cutoff_level So, it will only add the X-Spam-Flag above level 5.0. Your email does not get to that level. But you should be seeing the "X-Spam-Status" and "X-Spam-Level" headers - unless outlook is playing tricks on you. Change.
$sa_kill_level_deflt = $sa_tag2_level_deflt; # triggers spam evasive actions # at or above that level: bounce/reject/drop, # quarantine, and adding mail address extension
Translation: above level 5.0, it will take "evasive action".
$sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent, # effectively turning D_BOUNCE into D_DISCARD; # undef disables this feature and is a default;
If I read it correctly, from level 5 to 10, email is bounced, and above 10 it is discarded. You don't see them at all. I don't like those actions. I would never bounce an spam! I don't clearly see how to tell it to quarantine always, or to do nothing. To do nothing I think would be, perhaps, setting "sa_kill_level_deflt = 10000" I don't see this clear, and I know no documentation. :-/ -- Cheers, Carlos Robinson
The Friday 2005-04-01 at 21:33 +0200, I wrote:
I don't see this clear, and I know no documentation. :-/
I said that amavis-new has no documentation. I'll qualify that statement: there is no manual under "/usr/share/doc/packages/amavisd-new", and "man amavis-new" produces nothing, not found (nor info nor perldoc). Some say that the documentation is included as comments in "/etc/amavis.conf", but while that is true, it is a "documentation" that only programmers can really understand. There is no user documentation, or, at least, it was not included with SuSE 9.1. So... reading that file, I have some more info on the problem at hand, after an hour or more studying it - but before, check this two vars: # @bypass_virus_checks_acl = qw( . ); # uncomment to DISABLE anti-virus code # @bypass_spam_checks_acl = qw( . ); # uncomment to DISABLE anti-spam code I would write that as "comment to enable whatever" - that explanation above is in "programmers parlance". You need both commented, then, as I suppose you need to check both spam and viruses. This setting, around 1/3 of the file, defines what action it takes for spam: $final_spam_destiny = D_PASS; The possible actions are: # Alternatives to consider for spam: # - use D_PASS if clients will do filtering based on inserted mail headers; # - use D_DISCARD, if kill_level is set safely high; # - use D_BOUNCE instead of D_REJECT if not using milter; ... # The separation of *_destiny values into D_BOUNCE, D_REJECT, D_DISCARD # and D_PASS made settings $warnvirussender and $warnspamsender only still # useful with D_PASS. # Notify spam sender? $warnspamsender = 0; # (defaults to false (undef)) The possible actions we can use are: # The following symbolic constants can be used in *destiny settings: # # D_PASS mail will pass to recipients, regardless of bad contents; # # D_DISCARD mail will not be delivered to its recipients, sender will NOT be # notified. Effectively we lose mail (but will be quarantined # unless disabled). Losing mail is not decent for a mailer, # but might be desired. # # D_BOUNCE mail will not be delivered to its recipients, a non-delivery # notification (bounce) will be sent to the sender by amavisd-new; # Exception: bounce (DSN) will not be sent if a virus name matches # $viruses_that_fake_sender_re, or to messages from mailing lists # (Precedence: bulk|list|junk); # # D_REJECT mail will not be delivered to its recipients, sender should # preferably get a reject, e.g. SMTP permanent reject response # (e.g. with milter), or non-delivery notification from MTA # (e.g. Postfix). If this is not possible (e.g. different recipients # have different tolerances to bad mail contents and not using LMTP) # amavisd-new sends a bounce by itself (same as D_BOUNCE). # So D_PASS should be the correct action for spam, so that the user can decide. Those actions are taken when? # tag_level <= tag2_level <= kill_level < $sa_dsn_cutoff_level tag_level = 3.0 Adds the X-Spam-Status and X-Spam-Level headers tag2_level = 5.0 Adds 'X-Spam-Flag: YES', and allows editing Subject. kill_level = 5.0 Does whatever action was defined, and we should have D_PASS sa_dsn_cutoff_level = 10.0 Discard email - undef to disable (default, but not for SuSE). Ie, although we defined that action as "D_PASS", above this level it does a "D_DISCARD". This means that it would be quarantined unless disabled, probably in "/var/spool/amavis/virusmails", in almost maildir format. But it is disabled: $spam_quarantine_to = undef; Lets see what I can learn about this. $QUARANTINEDIR = '/var/spool/amavis/virusmails'; # a directory #$virus_quarantine_method = "local:virus-%i-%n"; # default #$spam_quarantine_method = "local:spam-%b-%i-%n"; # default I think this means that virus mails are filed with names like "virus-date-hour-numbers". For example: "virus-20040628-013731-13574-10". Spam mails would be similar... perhaps. The "/etc/amavis.conf" continues saying this: # When using the 'local:' quarantine method (default), the following applies: # # A finer control of quarantining is available through variable # $virus_quarantine_to/$spam_quarantine_to. It may be a simple scalar string, # or a ref to a hash lookup table, or a regexp lookup table object, # which makes possible to set up per-recipient quarantine addresses. There are four variants - and notice that, as I don't know perl, I don't really understand the jargon: # VARIANT 1: # empty or undef disables quarantine; And we have: $virus_quarantine_to = 'virus-quarantine'; # traditional local quarantine $spam_quarantine_to = undef; Ie, spam above level 10 is not quarantined. What if we want to? Well... the file continues: #$spam_quarantine_to = "spam-quarantine\@$mydomain"; #$spam_quarantine_to = new_RE( # per-recip multiple quarantines # [qr'^(.*)@example\.com$'i => 'spam-${1}@example.com'], # [qr/.*/ => 'spam-quarantine'] ); My mind simply refuses to understand that. Somebody, please? I think we could simply write 'spam-quarantine' (single quotes). That would be "VARIANT 2": # VARIANT 2: # a string NOT containing an '@'; # amavisd will behave as a local delivery agent (LDA) and will quarantine # viruses to local files according to hash %local_delivery_aliases (pseudo # aliases map) - see subroutine mail_to_local_mailbox() for details. See? we have to be programmers to read documentation: "see subroutine..." :-/ # Some of the predefined aliases are 'virus-quarantine' and 'spam-quarantine'. # Setting $virus_quarantine_to ($spam_quarantine_to) to this string will: # # * if $QUARANTINEDIR is a directory, each quarantined virus will go # to a separate file in the $QUARANTINEDIR directory (traditional # amavis style, similar to maildir mailbox format); # What I deduce is that if we set $spam_quarantine_to = 'spam-quarantine' it will go to $QUARANTINEDIR in almost maildir format. But I don't know what other "predefined aliases" are there, even though I tried looking at the source. Possibly: virus-quarantine, spam-quarantine, user-quarantine, ham-quarantine, outgoing-quarantine, and incoming-quarantine. This one looks promising also: $spam_quarantine_to = new_RE( # per-recip multiple quarantines [qr'^(.*)@example\.com$'i => 'spam-${1}@example.com'], [qr/.*/ => 'spam-quarantine'] ); but it is not documented, as always... Or, if we simply want spam above 10 to go the final recipients, so the can apply their own filters (that's what I would do), we can do #$sa_dsn_cutoff_level = 10; or perhaps: $sa_dsn_cutoff_level = undef; And I'm tired of this (study). Hope you can make use of this :-) -- Cheers, Carlos Robinson
participants (3)
-
Carlos E. R.
-
Richard Mixon (qwest)
-
Sandy Drobic