On 12/6/10, frédéric bordi wrote:
> Hello,
>
> I have a mail server with:
>
> Centos release 5.5 (Final)
> postfix.x86_64
> amavisd-new.x86_64
> clamav.x86_64
> clamav-db.x86_64
> clamd.x86_64
> spamassassin.x86_64
> razor-agents.x86_64
>
> Every single incoming mail is considered as passed SPAM
> I'm using telnet.
> The subject is not rewritten with ***SPAM***
> The X-SPAM headers are not added
>
>
> Could you, please help me to solve this issue?
>
>
> amavisd.conf
>
> @spam_scanners = (['SpamAssassin','Amavis::SpamControl::SpamAssassin']);
> $sa_dsn_cutoff_level = 10;   # spam level beyond which a DSN is not sent
>
> $sa_tag_level_deflt  = -999;  # add spam info headers if at, or above that
> level
> $sa_tag2_level_deflt = 0; # add 'spam detected' headers at that level
> $sa_kill_level_deflt = 0; # triggers spam evasive actions
> $sa_quarantine_cutoff_level = 20; # spam level beyond which quarantine is
> off
> $penpals_bonus_score = 8;  # (no effect without a @storage_sql_dsn database)
> $penpals_threshold_high = $sa_kill_level_deflt; # don't waste time on hi
> spam
> $sa_mail_body_size_limit = 400*1024; # don't waste time on SA if mail is
> larger
> $sa_local_tests_only = 0;    # only tests which do not require internet
> access?
>
> $sa_spam_subject_tag = '*****SPAM***** ';
>
> $final_banned_destiny     = D_REJECT;
> $final_virus_destiny      = D_REJECT;
> $final_spam_destiny       = D_PASS;
> $final_bad_header_destiny = D_PASS;
>
> local.cf
> required_hits 10
> report_safe 0
> rewrite_header Subject *****SPAM*****
>
> #skip_rbl_checks 1
> # By default SpamAssassin runs the Realtime Blackhole List checks.
> # It's better to turn this option off.
>
> use_bayes 0
> # This turns Bayesean Learning on. 0 turns it off.
>
> bayes_path /var/amavis/.spamassassin/bayes
> # Bayesean database location.
>
> use_razor2 1
> # Tells SA that we want to use Razor version 2
>
>
>
> main.cf
> content_filter = smtp-amavis:[127.0.0.1]:10024
>
> master.cf
> smtp      inet  n       -       n       -       -       smtpd -v
>    -o smtpd_proxy_filtering=smtp-amavis:[127.0.0.1]:10024
>
> smtp-amavis
>           unix -      -       -       -       2       smtp
>             -o smtp_data_done_timeout=1200
>             -o disable_dns_lookups=yes
>
> 127.0.0.1:10025
>           inet n      -       n       -       -       smtpd
>            -o content_filter=
>            -o smptd_delay_reject=
>            -o receive_override_options=no_unknown_recipient_checks
>            -o local_recipient_maps=
>            -o relay_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 mynetworks=127.0.0.0/8
>            -o strict_rfc821_envelopes=yes
>
> amavisd debug-sa returns:
>
<...>
> Dec  6 15:53:55.921 mail2.domain.com /usr/sbin/amavisd[27376]: ANTI-SPAM
> code       loaded
> Dec  6 15:53:55.921 mail2.domain.com /usr/sbin/amavisd[27376]: ANTI-SPAM-EXT
> code   NOT loaded
> Dec  6 15:53:55.921 mail2.domain.com /usr/sbin/amavisd[27376]: ANTI-SPAM-C
> code     NOT loaded
> Dec  6 15:53:55.921 mail2.domain.com /usr/sbin/amavisd[27376]: ANTI-SPAM-SA
> code    loaded
<...>
>
>
> /var/log/maillog when I send an email
>
> Dec  6 15:55:40 mail2 postfix/qmgr[27334]: 36F1D3EF49: from=<
> gnav...@domain.com>, size=393, nrcpt=1 (queue active)
> Dec  6 15:55:40 mail2 postfix/smtpd[27393]: initializing the server-side TLS
> engine
> Dec  6 15:55:40 mail2 postfix/smtpd[27393]: connect from
> localhost[127.0.0.1]
> Dec  6 15:55:40 mail2 postfix/trivial-rewrite[27385]: warning: do not list
> domain domain.com in BOTH mydestination and virtual_mailbox_domains
> Dec  6 15:55:40 mail2 postfix/trivial-rewrite[27385]: warning: do not list
> domain domain.com in BOTH mydestination and virtual_mailbox_domains
> Dec  6 15:55:40 mail2 postfix/smtpd[27393]: 9E7893EF51:
> client=unknown[68.175.49.190]
> Dec  6 15:55:40 mail2 postfix/cleanup[27389]: 9E7893EF51: message-id=<
> 20101206205540.36f1d3e...@mail2.domain.com>
> Dec  6 15:55:40 mail2 postfix/qmgr[27334]: 9E7893EF51: from=<
> gnav...@domain.com>,size=838, nrcpt=1 (queue active)
> Dec  6 15:55:40 mail2 postfix/trivial-rewrite[27385]: warning: do not list
> domain domain.com in BOTH mydestination and virtual_mailbox_domains
> Dec  6 15:55:40 mail2 postfix/smtp[27390]: 36F1D3EF49:
> to=<fbo...@domain.com>,
> relay=127.0.0.1[127.0.0.1]:10024, delay=14, delays=14/0.01/0.01/0.42,
> dsn=2.0.0, status=sent (250 2.0.0 Ok, id=27379-01, from
> MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 9E7893EF51)
> Dec  6 15:55:40 mail2 postfix/qmgr[27334]: 36F1D3EF49: removed
> Dec  6 15:55:40 mail2 postfix/virtual[27394]: 9E7893EF51: to=<
> fbo...@domain.com>, relay=virtual, delay=0.03, delays=0.01/0.01/0/0.01,
> dsn=2.0.0, status=sent (delivered to maildir)
> Dec  6 15:55:40 mail2 postfix/qmgr[27334]: 9E7893EF51: removed
> ------------------------------------------------------------------------------

In amavisd.conf, set:
$DO_SYSLOG = 1;
so the amavis entries are shown in your maillog along with the postfix entries.

Looks like you have configured both pre-queue and after-queue filtering.
For the time being, comment this out in master.cf:
#  -o smtpd_proxy_filtering=smtp-amavis:[127.0.0.1]:10024

Make sure the recipient domain is listed in @local_domains_maps in amavisd.conf:
@local_domains_maps = ( [ ".$mydomain", '.example.net', '.example.com' ] );
amavisd-new will not write X-Spam headers or rewrite the subject line
unless the domain is considered local.

You can see that Postfix is complaining:
"warning: do not list domain domain.com in BOTH mydestination and
virtual_mailbox_domains"
So, remove the recipient domain from mydestination since you are using
virtual_mailbox_domains for this domain.

Why use telnet?
Why not simply temporarily reconfigure the SMTP Server setting of an
email client (MUA) to deliver mail to your IP address?

See how things go after making these changes.

-- 
Gary V

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 Please visit http://www.ijs.si/software/amavisd/ regularly
 For administrativa requests please send email to rainer at openantivirus dot 
org

Reply via email to