<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hallo,</div>

<div>ich versuche mit diesen Einstellungen auf Postfix (Debian/stable) mit AMaVisd-new/Spamassassin SPAMs und Viren herauszufiltern.</div>

<div>/etc/postfix/main.cf:</div>

<div>alias_database = hash:/etc/aliases<br/>
alias_maps = hash:/etc/aliases<br/>
append_dot_mydomain = no<br/>
biff = no<br/>
bounce_queue_lifetime = 1h<br/>
broken_sasl_auth_clients = yes<br/>
compatibility_level = 2<br/>
disable_vrfy_command = yes<br/>
greylist = permit_dnswl_client list.dnswl.org, check_policy_service inet:127.0.0.1:10023<br/>
html_directory = /usr/share/doc/postfix/html<br/>
inet_interfaces = all<br/>
inet_protocols = all<br/>
mailbox_size_limit = 0<br/>
maximal_backoff_time = 15m<br/>
maximal_queue_lifetime = 1h<br/>
message_size_limit = 52428800<br/>
milter_default_action = accept<br/>
milter_protocol = 6<br/>
minimal_backoff_time = 300s<br/>
mydestination = mx.domain.tld, localhost.domain.tld, localhost, 192.168.1.1/32 192.168.1.4/32 192.168.1.5/32<br/>
myhostname = mx.domain.tld<br/>
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128<br/>
myorigin = /etc/mailname<br/>
non_smtpd_milters = inet:localhost:12248<br/>
plaintext_reject_code = 550<br/>
postscreen_access_list = permit_mynetworks, cidr:/etc/postfix/postscreen_access.cidr<br/>
postscreen_bare_newline_enable = no<br/>
postscreen_blacklist_action = drop<br/>
postscreen_cache_cleanup_interval = 24h<br/>
postscreen_cache_map = proxy:btree:$data_directory/postscreen_cache<br/>
postscreen_dnsbl_action = drop<br/>
postscreen_dnsbl_sites = b.barracudacentral.org=127.0.0.2*7 dnsbl.inps.de=127.0.0.2*7 bl.mailspike.net=127.0.0.2*5 bl.mailspike.net=127.0.0.[10;11;12]*4 dnsbl.sorbs.net=127.0.0.10*8 dnsbl.sorbs.net=127.0.0.5*6 dnsbl.sorbs.net=127.0.0.7*3 dnsbl.sorbs.net=127.0.0.8*2 dnsbl.sorbs.net=127.0.0.6*2 dnsbl.sorbs.net=127.0.0.9*2 zen.spamhaus.org=127.0.0.[10;11]*8 zen.spamhaus.org=127.0.0.[4..7]*6 zen.spamhaus.org=127.0.0.3*4 zen.spamhaus.org=127.0.0.2*3 hostkarma.junkemailfilter.com=127.0.0.2*3 hostkarma.junkemailfilter.com=127.0.0.4*1 hostkarma.junkemailfilter.com=127.0.1.2*1 wl.mailspike.net=127.0.0.[18;19;20]*-2 hostkarma.junkemailfilter.com=127.0.0.1*-2<br/>
postscreen_dnsbl_threshold = 8<br/>
postscreen_dnsbl_ttl = 5m<br/>
postscreen_greet_action = enforce<br/>
postscreen_greet_banner = $smtpd_banner<br/>
postscreen_greet_ttl = 2d<br/>
postscreen_greet_wait = 3s<br/>
postscreen_non_smtp_command_enable = no<br/>
postscreen_pipelining_enable = no<br/>
proxy_read_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_sender_acl.cf, proxy:mysql:/etc/postfix/sql/mysql_tls_enforce_out_policy.cf, proxy:mysql:/etc/postfix/sql/mysql_tls_enforce_in_policy.cf, $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps<br/>
queue_run_delay = 300s<br/>
readme_directory = /usr/share/doc/postfix<br/>
recipient_delimiter = +<br/>
relay_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_mxdomain_maps.cf<br/>
relay_recipient_maps = proxy:mysql:/etc/postfix/sql/mysql_relay_recipient_maps.cf<br/>
relayhost =<br/>
sender_dependent_default_transport_maps = proxy:mysql:/etc/postfix/sql/mysql_tls_enforce_out_policy.cf<br/>
smtp_dns_support_level = dnssec<br/>
smtp_header_checks = pcre:/etc/postfix/submission_header_cleanup<br/>
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt<br/>
smtp_tls_loglevel = 1<br/>
smtp_tls_security_level = dane<br/>
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache<br/>
smtpd_banner = $myhostname<br/>
smtpd_client_restrictions = permit_mynetworks check_client_access hash:/etc/postfix/without_ptr reject_unknown_client_hostname<br/>
smtpd_data_restrictions = reject_unauth_pipelining, permit<br/>
smtpd_delay_reject = yes<br/>
smtpd_error_sleep_time = 10s<br/>
smtpd_hard_error_limit = ${stress?1}${stress:5}<br/>
smtpd_helo_required = yes<br/>
smtpd_milters = inet:localhost:12248<br/>
smtpd_proxy_filter = 127.0.0.1:10024<br/>
smtpd_proxy_timeout = 600s<br/>
smtpd_recipient_restrictions = check_recipient_access proxy:mysql:/etc/postfix/sql/mysql_tls_enforce_in_policy.cf, permit_sasl_authenticated, permit_mynetworks, reject_invalid_helo_hostname, reject_unknown_reverse_client_hostname, reject_unauth_destination<br/>
smtpd_restriction_classes = greylist<br/>
smtpd_sasl_auth_enable = yes<br/>
smtpd_sasl_authenticated_header = yes<br/>
smtpd_sasl_path = private/auth_dovecot<br/>
smtpd_sasl_type = dovecot<br/>
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_sender_acl.cf<br/>
smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch, permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated, reject_unlisted_sender, reject_unknown_sender_domain, check_sender_access hash:/etc/postfix/sender_access<br/>
smtpd_soft_error_limit = 3<br/>
smtpd_tls_auth_only = yes<br/>
smtpd_tls_cert_file = /etc/ssl/mail/mail.crt<br/>
smtpd_tls_ciphers = high<br/>
smtpd_tls_dh1024_param_file = /etc/ssl/mail/dhparams.pem<br/>
smtpd_tls_eecdh_grade = strong<br/>
smtpd_tls_exclude_ciphers = ECDHE-RSA-RC4-SHA, RC4, aNULL<br/>
smtpd_tls_key_file = /etc/ssl/mail/mail.key<br/>
smtpd_tls_loglevel = 1<br/>
smtpd_tls_mandatory_ciphers = high<br/>
smtpd_tls_mandatory_exclude_ciphers = ECDHE-RSA-RC4-SHA, RC4, aNULL<br/>
smtpd_tls_mandatory_protocols = !SSLv3<br/>
smtpd_tls_protocols = !SSLv3<br/>
smtpd_tls_security_level = may<br/>
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache<br/>
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<br/>
tls_preempt_cipherlist = yes<br/>
tls_ssl_options = NO_COMPRESSION<br/>
virtual_alias_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_spamalias_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf<br/>
virtual_gid_maps = static:5000<br/>
virtual_mailbox_base = /var/vmail/<br/>
virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf<br/>
virtual_mailbox_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf<br/>
virtual_minimum_uid = 104<br/>
virtual_transport = lmtp:unix:private/dovecot-lmtp<br/>
virtual_uid_maps = static:5000</div>

<div> </div>

<div>/etc/postfix/master.cf:</div>

<div>
<div>smtp       inet  n       -       n       -       1       postscreen</div>

<div>smtpd      pass  -       -       n       -       -       smtpd<br/>
  -o smtpd_helo_restrictions=permit_mynetworks,reject_non_fqdn_helo_hostname<br/>
  -o smtpd_proxy_filter=127.0.0.1:10024<br/>
  -o content_filter=<br/>
  -o smtpd_proxy_options=speed_adjust</div>

<div>smtps    inet  n       -       n       -       -       smtpd<br/>
  -o smtpd_tls_wrappermode=yes<br/>
  -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject<br/>
  -o smtpd_proxy_filter=127.0.0.1:10024<br/>
  -o content_filter=<br/>
  -o smtpd_client_connection_count_limit=10<br/>
  -o smtpd_proxy_options=speed_adjust</div>

<div>submission inet n       -       -       -       -       smtpd<br/>
  -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject<br/>
  -o smtpd_client_connection_count_limit=10<br/>
  -o smtpd_proxy_options=speed_adjust<br/>
  -o smtpd_enforce_tls=yes<br/>
  -o smtpd_tls_security_level=encrypt<br/>
  -o tls_preempt_cipherlist=yes<br/>
  -o cleanup_service_name=submission-header-cleanup</div>

<div>tlsproxy  unix  -       -       n       -       0       tlsproxy<br/>
dnsblog   unix  -       -       n       -       0       dnsblog<br/>
pickup    fifo  n       -       -       60      1       pickup<br/>
cleanup   unix  n       -       -       -       0       cleanup<br/>
qmgr      fifo  n       -       n       300     1       qmgr<br/>
tlsmgr    unix  -       -       -       1000?   1       tlsmgr<br/>
rewrite   unix  -       -       -       -       -       trivial-rewrite<br/>
bounce    unix  -       -       -       -       0       bounce<br/>
defer     unix  -       -       -       -       0       bounce<br/>
trace     unix  -       -       -       -       0       bounce<br/>
verify    unix  -       -       -       -       1       verify<br/>
flush     unix  n       -       -       1000?   0       flush<br/>
proxymap  unix  -       -       n       -       -       proxymap<br/>
proxywrite unix -       -       n       -       1       proxymap<br/>
smtp      unix  -       -       -       -       -       smtp<br/>
smtp_enforced_tls      unix  -       -       -       -       -       smtp<br/>
  -o smtp_delivery_status_filter=pcre:/etc/postfix/smtp_dsn_filter.pcre<br/>
  -o smtp_tls_security_level=encrypt<br/>
relay     unix  -       -       -       -       -       smtp<br/>
showq     unix  n       -       -       -       -       showq<br/>
error     unix  -       -       -       -       -       error<br/>
retry     unix  -       -       -       -       -       error<br/>
discard   unix  -       -       -       -       -       discard<br/>
local     unix  -       n       n       -       -       local<br/>
virtual   unix  -       n       n       -       -       virtual<br/>
lmtp      unix  -       -       -       -       -       lmtp<br/>
anvil     unix  -       -       -       -       1       anvil<br/>
scache    unix  -       -       -       -       1       scache<br/>
maildrop  unix  -       n       n       -       -       pipe<br/>
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}<br/>
uucp      unix  -       n       n       -       -       pipe<br/>
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)<br/>
ifmail    unix  -       n       n       -       -       pipe<br/>
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)<br/>
bsmtp     unix  -       n       n       -       -       pipe<br/>
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient<br/>
scalemail-backend unix  -       n       n       -       2       pipe<br/>
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}<br/>
mailman   unix  -       n       n       -       -       pipe<br/>
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py<br/>
  ${nexthop} ${user}<br/>
127.0.0.1:10025 inet n - n - - smtpd<br/>
  -o content_filter=<br/>
  -o smtpd_proxy_filter=<br/>
  -o smtpd_authorized_xforward_hosts=127.0.0.0/8<br/>
  -o smtpd_client_restrictions=<br/>
  -o smtpd_helo_restrictions=<br/>
  -o smtpd_sender_restrictions=<br/>
  -o smtpd_recipient_restrictions=permit_mynetworks,reject<br/>
  -o smtpd_data_restrictions=<br/>
  -o mynetworks=127.0.0.0/8<br/>
  -o receive_override_options=no_unknown_recipient_checks</div>

<div>submission-header-cleanup unix n - n    -       0       cleanup<br/>
  -o header_checks=pcre:/etc/postfix/submission_header_cleanup</div>

<div> </div>

<div>
<div>/etc/amavis/conf.d/15-content_filter_mode:<br/>
use strict;<br/>
@bypass_virus_checks_maps = (<br/>
   %bypass_virus_checks, @bypass_virus_checks_acl, $bypass_virus_checks_re);</div>

<div>@bypass_spam_checks_maps = (<br/>
   %bypass_spam_checks, @bypass_spam_checks_acl, $bypass_spam_checks_re);</div>

<div>1;</div>
</div>

<div> </div>

<div>/etc/amavis/conf.d/20-debian_defaults:</div>

<div>
<div>$sa_spam_subject_tag = '***SPAM*** ';<br/>
$sa_tag_level_deflt  = -999; <br/>
$sa_tag2_level_deflt = 3.501;<br/>
$sa_kill_level_deflt = 6.31;<br/>
$sa_dsn_cutoff_level = 10;  </div>

<div>$sa_mail_body_size_limit = 200*1024;<br/>
$sa_local_tests_only = 0;  </div>

<div> </div>

<div>$final_virus_destiny      = D_REJECT;</div>

<div>
<div>$final_banned_destiny     = D_REJECT;</div>

<div>$final_spam_destiny       = D_REJECT;</div>
</div>

<div>#$final_bad_header_destiny = D_PASS;</div>

<div> </div>

<div> </div>

<div>Erstens werden immer noch eingehende SPAM-Mails nur mit "X-Virus-Scanned:" getaggt, es finden keine weiteren Header-tags statt, obwohl "$sa_spam_subject_tag" auf "-999" sitzt. Zweitens wird eine Mail von diesem GMX-Acount mit beliebigen Subject-Text und diesem Text "losd+ssdkodkc" sofort als SPAM erkannt und getaggt:</div>

<div>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">X-Spam-Flag: YES</p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">X-Spam-Score: 4.89</p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">X-Spam-Level: ****</p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">X-Spam-Status: Yes, score=4.89 tagged_above=-999 required=3.501</p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">tests=[BODY_SINGLE_WORD=2.499, FREEMAIL_FROM=0.001,</p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">HTML_MESSAGE=0.001, MIME_HTML_ONLY=1.105, PYZOR_CHECK=1.985,</p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001,</p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">TVD_SPACE_RATIO=0.001] autolearn=no autolearn_force=no</p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Ist irgendetwas in meiner Postfix-Konfiguration falsch geraten oder mache ich bei Amavis etwas falsch?<br/>
<br/>
Ich freue mich, wenn ihr mir hier weiterhelfen könnt.<br/>
<br/>
Mit freundlichen Grüßen</p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Florian</p>
</div>

<div> </div>
</div>
</div></div></body></html>