[postfix-users] amavisd-new fügt keine Header ein
Hallo,
Bei mir läuft Postfix in Kombination mit Amavis. Letzterer scheint Spam zwar zu erkennen, fügt aber keine Header in die EMail ein, egal wie ich ihn konfiguriere. Dass er Spam erkennt, schliesse ich aus den Einträgen in /var/log/mail.log, welche beim GTUBE Test
amavis[14297]: (14297-04) Passed SPAM
und bei normaler Mail
amavis[14296]: (14296-05) Passed CLEAN
lauten. Was mache ich falsch?
Hier mein Setup:
Debian Squeeze mit postfix 2.7.1-1 und amavisd-new 2.6.4-3
root@mailserver:~# ls /etc/amavis/conf.d/ 01-debian 05-node_id 15-content_filter_mode 25-amavis_helpers 50-user 05-domain_id 15-av_scanners 20-debian_defaults 30-template_localization
root@mailserver:~# cat /etc/amavis/conf.d/50-user use strict;
# # Place your configuration directives here. They will override those in # earlier files. # # See /usr/share/doc/amavisd-new/ for documentation and examples of # the directives you can use in this file #
$sa_spam_subject_tag = '***SPAM*** '; $sa_tag_level_deflt = 0; # add spam info headers if at, or above that level $sa_tag2_level_deflt = 6.31; # add 'spam detected' headers at that level $sa_kill_level_deflt = 6.31; # triggers spam evasive actions $sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent
#$final_virus_destiny = D_DISCARD; # (data not lost, see virus quarantine) #$final_banned_destiny = D_BOUNCE; # D_REJECT when front-end MTA $final_spam_destiny = D_PASS;
#------------ Do not modify anything below this line ------------- 1; # ensure a defined return
Gruss, Reto
Hallo Reto,
bitte poste noch alle Deine lokalen Änderungen an der postfix Konfiguration, die Du mit dem Kommando "postconf -n" angezeigt bekommst.
Grüße, Florian
Hallo Florian,
bitte poste noch alle Deine lokalen Änderungen an der postfix Konfiguration, die Du mit dem Kommando "postconf -n" angezeigt bekommst.
root@mailserver:# postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no config_directory = /etc/postfix content_filter = smtp-amavis:[127.0.0.1]:10024 inet_interfaces = all mailbox_size_limit = 0 mydestination = mailserver, localhost, mailserver.example.org, localhost.example.org myhostname = mailserver.example.org mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname readme_directory = no receive_override_options = no_address_mappings recipient_delimiter = + relay_domains = relayhost = [smtp.hispeed.ch] smtp_sasl_auth_enable = yes smtp_sasl_mechanism_filter = plain, login smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd_hispeed_smtp smtp_sasl_security_options = noanonymous smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtp_use_tls = yes smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes soft_bounce = yes virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf virtual_mailbox_domains = mysql:/etc/postfix/ mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_transport = dovecot
Gruss, Reto
On Behalf Of Reto Stalder
Hallo,
Bei mir läuft Postfix in Kombination mit Amavis. Letzterer scheint Spam zwar zu erkennen, fügt aber keine Header in die EMail ein, egal wie ich ihn konfiguriere. Dass er Spam erkennt, schliesse ich aus den Einträgen in /var/log/mail.log, welche beim GTUBE Test
amavis[14297]: (14297-04) Passed SPAM
und bei normaler Mail
amavis[14296]: (14296-05) Passed CLEAN
lauten. Was mache ich falsch?
Wenn ich das richtig im Kopf habe werden bei eigenen Mails keine Spamheader eingefügt.
Was steht denn in @mynetworks = im Amavis drin und woher kamen die testmails?
Und hast du das nachfolgende auch beachtet?
# You can modify this file to re-enable SPAM checking through spamassassin # and to re-enable antivirus checking.
# # Default antivirus checking mode # Please note, that anti-virus checking is DISABLED by # default. # If You wish to enable it, please uncomment the following lines:
#@bypass_virus_checks_maps = ( # %bypass_virus_checks, @bypass_virus_checks_acl, $bypass_virus_checks_re);
# # Default SPAM checking mode # Please note, that anti-spam checking is DISABLED by # default. # If You wish to enable it, please uncomment the following lines:
#@bypass_spam_checks_maps = ( # %bypass_spam_checks, @bypass_spam_checks_acl, $bypass_spam_checks_re);
Mit freundlichen Grüßen
Drießen
Wenn ich das richtig im Kopf habe werden bei eigenen Mails keine Spamheader eingefügt.
Was steht denn in @mynetworks = im Amavis drin und woher kamen die testmails?
Die Testmails habe ich einerseits auf dem Mailserver selbst mit sendmail -i versandt, andererseits aber auch von extern (gmail Webaccess). Beide Varianten verhalten sich identisch.
@mynetworks ist für Amavis nirgends gesetzt (grep mynetworks /etc/amavis/conf.d/* ergibt ein leeres Resultat). In der Postfix Konfiguration /etc/postfix/main.cf ist sie allerdings gesetzt:
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
Und hast du das nachfolgende auch beachtet?
# You can modify this file to re-enable SPAM checking through spamassassin # and to re-enable antivirus checking.
# # Default antivirus checking mode # Please note, that anti-virus checking is DISABLED by # default. # If You wish to enable it, please uncomment the following lines:
#@bypass_virus_checks_maps = ( # %bypass_virus_checks, @bypass_virus_checks_acl, $bypass_virus_checks_re);
# # Default SPAM checking mode # Please note, that anti-spam checking is DISABLED by # default. # If You wish to enable it, please uncomment the following lines:
#@bypass_spam_checks_maps = ( # %bypass_spam_checks, @bypass_spam_checks_acl, $bypass_spam_checks_re);
Ja, die beiden Blöcke habe ich einkommentiert.
Reto
* Reto Stalder rstalder@gmail.com:
Bei mir läuft Postfix in Kombination mit Amavis. Letzterer scheint Spam zwar zu erkennen, fügt aber keine Header in die EMail ein, egal wie ich ihn konfiguriere.
"No spam-related headers inserted? Here are some reasons: [..]"
Stefan
* Reto Stalder rstalder@gmail.com:
Bei mir läuft Postfix in Kombination mit Amavis. Letzterer scheint Spam zwar zu erkennen, fügt aber keine Header in die EMail ein, egal wie ich ihn konfiguriere. Dass er Spam erkennt, schliesse ich aus den Einträgen in /var/log/mail.log, welche beim GTUBE Test
amavis[14297]: (14297-04) Passed SPAM
und bei normaler Mail
amavis[14296]: (14296-05) Passed CLEAN
lauten. Was mache ich falsch?
Sehr wahrscheinlich weiß amavis nicht was outgoing und incoming, also die Senderichtung, ist. Das kriegst Du in den Griff indem Du @mynetworks (sender, outgoing) und @local_domains_maps (empfänger, incoming) entsprechend konfigurierst.
Wenn Du auch über den submission-Port (587) versendest, setze das Flag "originating", damit amavis weiß Mails über diesen Port sind auch sender, outgoing.
p@rick
Der Abschnitt aus http://www.amavis.org/#faq, auf welchen ich von Stefan und Driessen hingewiesen wurde, hat das Problem gelöst.
In /etc/amavis/conf.d/05-domain_id steht:
chomp($mydomain = `head -n 1 /etc/mailname`); @local_domains_acl = ( ".$mydomain" );
Dies ergab für $mydomain einen Wert von mailserver.example.org anstatt nur example.org. Ich habe den Wert nun in /etc/amavis/conf.d/50-user überschrieben:
$mydomain = "example.org"; @local_domains_acl = ( ".$mydomain" );
Nun werden die Header auch eingefügt. Danke für die Hilfe!
Reto
participants (5)
-
Driessen
-
Florian Streibelt
-
Patrick Ben Koetter
-
Reto Stalder
-
Stefan Förster