SpamAssassin schweigt sich aus

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SpamAssassin schweigt sich aus

Sebastian Schieke
Hallo Allerseits,

in unserem Mailrelay-Setup haben wir SpamAssassin über Amavis eingebunden. Allerdings kommt es mir so vor, als ob SpamAssassin nicht (vollständig?) arbeitet. In der Amavis-Konfiguration ist eingestellt, dass Mails in jedem Fall mit entsprechenden Headern versehnen werden:

$sa_tag_level_deflt  = -1000;

Wenn ich es richtig interpretiere, sollten dann aber alle Mails, die es durch das Relay schaffen, entsprechende Header in der Art:

===================8<--------------------------------

X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:

===================8<--------------------------------

aufweisen, oder verstehe ich das falsch?

Woran lässt sich feststellen, dass SpamAssassin tatsächlich funktioniert?

Anbei noch das main/master cf bundle:

main.cf

===================8<--------------------------------

address_verify_map = btree:/var/spool/postfix/data/verify
alias_maps = hash:/etc/aliases
bounce_queue_lifetime = 3d
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_protocols = ipv4
maximal_queue_lifetime = 3d
message_size_limit = 20971520
mydestination = mail.mydomain.com, localhost
myhostname = mail.mydomain.com
mynetworks = 127.0.0.0/8
relay_domains = hash:/etc/postfix/relay_domains
smtp_tls_exclude_ciphers = RC4, aNULL
smtp_tls_security_level = may
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/access_recipient_rfc, check_client_access cidr:/etc/postfix/access_client, check_helo_access hash:/etc/postfix/access_helo, check_sender_access hash:/etc/postfix/access_sender, check_recipient_access hash:/etc/postfix/access_recipient, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_invalid_hostname, permit_sasl_authenticated, permit_mynetworks, check_client_access hash:/etc/postfix/policyd_weight_client_whitelist check_policy_service inet:127.0.0.1:12525, check_policy_service inet:127.0.0.1:10023, reject_unverified_recipient, permit_mx_backup, reject_unauth_destination, permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_CAfile = /etc/myssl/bundle2.pem
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/myssl/hans-bredow-institut_de.pem
smtpd_tls_exclude_ciphers = RC4, aNULL
smtpd_tls_key_file = /etc/myssl/hans-bredow-institut_de.key
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_security_level = may
tls_high_cipherlist = EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
transport_maps = hash:/etc/postfix/transport, hash:/etc/postfix/relay_domains
unverified_recipient_reject_code = 577

===================8<--------------------------------

master.cf
smtp      inet  n       -       n       -       -       smtpd
        -o smtpd_proxy_filter=localhost:10024
pickup    unix  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
relay     unix  -       -       -       -       -       smtp
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
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=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix  -       n       n       -       2       pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}

spf-policy   unix -     n       n       -       -       spawn user=nobody argv=/usr/bin/perl /usr/sbin/postfix-policyd-spf-perl

localhost:10025     inet    n     -     n       -       -       smtpd
        -o content_filter=
        -o smtpd_proxy_filter=
        -o smtpd_authorized_xforward_hosts=127.0.0.0/8
        -o smtpd_client_restrictions=
        -o smtpd_helo_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o smtpd_data_restrictions=
        -o mynetworks=127.0.0.0/8
        -o receive_override_options=no_unknown_recipient_checks

===================8<--------------------------------

lG
Sebastian
Reply | Threaded
Open this post in threaded view
|

AW: SpamAssassin schweigt sich aus

Hoyer-Reuther, Christian
Hallo Sebastian,

ja, so sollte das eigentlich funktionieren.

Siehst Du denn im Log solche Zeilen:

Oct  9 15:13:33 mail amavis[626]: (00626-03) calling SA parse (0), SA vers 3.4.0, 3.004000, data as STRING_REF, recips_ind [0], user: "amavis"
Oct  9 15:13:34 mail amavis[626]: (00626-03) spam_scan: score=-1.9 autolearn=ham autolearn_force=no tests=[BAYES_00=-1.9,HEADER_FROM_DIFFERENT_DOMAINS=0.001,RCVD_IN_DNSWL_NONE=-0.0001,RP_MATCHES_RCVD=-0.001] recips=0

Eventuell musst Du dafür den Amavis-Loglevel etwas hochsetzen:

$log_level                 = 3;

Viele Grüße.

Christian

-----Ursprüngliche Nachricht-----
Von: Postfixbuch-users [mailto:[hidden email]] Im Auftrag von Sebastian Schieke
Gesendet: Dienstag, 10. Oktober 2017 17:20
An: [hidden email]
Betreff: SpamAssassin schweigt sich aus

Hallo Allerseits,

in unserem Mailrelay-Setup haben wir SpamAssassin über Amavis eingebunden. Allerdings kommt es mir so vor, als ob SpamAssassin nicht (vollständig?) arbeitet. In der Amavis-Konfiguration ist eingestellt, dass Mails in jedem Fall mit entsprechenden Headern versehnen werden:

$sa_tag_level_deflt  = -1000;

Wenn ich es richtig interpretiere, sollten dann aber alle Mails, die es durch das Relay schaffen, entsprechende Header in der Art:

===================8<--------------------------------

X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:

===================8<--------------------------------

aufweisen, oder verstehe ich das falsch?

Woran lässt sich feststellen, dass SpamAssassin tatsächlich funktioniert?
Reply | Threaded
Open this post in threaded view
|

Re: AW: SpamAssassin schweigt sich aus

Sebastian Schieke
Moin Christian,

ja die Zeilen sehe ich im Log. Habe inzwischen entdeckt, dass es an fehlenden @local_domains_acl Einträgen in der in der Amavis Konfiguration lag.

Danke und Grüße
Sebastian