<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Ich kriege irgendwie meine spamfilter-Mimik unter Ubuntu 16.04
nicht zum Laufen.<br>
Es kommt mir vor, als bekomme es gar keine Mail zu Gesicht.</p>
<p>Hier sind mal meine <br>
</p>
<p>main.cf und master.cf:</p>
<p><font face="Courier New, Courier, monospace" size="-2">myhostname
= mail.mydomain.org<br>
mydomain = mydomain.org<br>
myorigin = $mydomain<br>
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)<br>
biff = no<br>
<br>
append_dot_mydomain = no<br>
<br>
readme_directory = no<br>
<br>
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128<br>
mydestination = local, localhost.localdomain, localhost<br>
<br>
mailbox_size_limit = 51200000<br>
message_size_limit = 51200000<br>
recipient_delimiter =<br>
inet_interfaces = all<br>
inet_protocols = all<br>
<br>
##### TLS parameters ######<br>
smtpd_tls_cert_file=/etc/postfix/ssl/mail.mydomain.org.crt<br>
smtpd_tls_key_file=/etc/postfix/ssl/mail.mydomain.org.key<br>
smtpd_use_tls=yes<br>
smtpd_tls_auth_only=yes<br>
smtpd_tls_session_cache_database =
btree:${data_directory}/smtpd_scache<br>
smtp_tls_session_cache_database =
btree:${data_directory}/smtp_scache<br>
<br>
<br>
###### SASL Auth ######<br>
smtpd_sasl_type = dovecot<br>
smtpd_sasl_path = private/auth<br>
smtpd_sasl_auth_enable = yes<br>
<br>
smtpd_restriction_classes =<br>
internal<br>
<br>
internal =<br>
permit_mynetworks,<br>
permit_sasl_authenticated,<br>
reject<br>
<br>
###### Use Dovecot LMTP Service to deliver Mails to Dovecot
######<br>
##virtual_transport = spamass-dovecot<br>
virtual_transport = lmtp:unix:private/dovecot-lmtp<br>
##### Only allow mail transport if client is authenticated or in
own network (PHP Scripts, ...) ######<br>
##### allow mail sending if Client is authenticated or in own
network (PHP scripts, ...) , block spam servers ######<br>
##### smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_unauth_destination<br>
<br>
smtpd_recipient_restrictions = <br>
permit_mynetworks,<br>
permit_sasl_authenticated,<br>
check_client_access hash:/etc/postfix/access,<br>
check_sender_access hash:/etc/postfix/sender_access,<br>
reject_unauth_destination,<br>
reject_rbl_client zen.spamhaus.org,<br>
reject_rbl_client cbl.abuseat.org,<br>
reject_rbl_client sbl.spamhaus.org,<br>
reject_rbl_client dul.dnsbl.sorbs.net,<br>
permit<br>
#++ CPK 2017-02-21 <br>
disable_vrfy_command = yes<br>
smtdp_delay_reject = yes<br>
smtpd_helo_required = yes<br>
smtpd_helo_restrictions = permit_mynetworks,<br>
reject_non_fqdn_hostname,<br>
reject_invalid_hostname,<br>
permit<br>
smtpd_error_sleep_time = 1s<br>
smtpd_soft_error_limit = 10<br>
smtpd_hard_error_limit = 20<br>
###### MySQL Connection ######<br>
<br>
virtual_alias_maps = mysql:/etc/postfix/virtual/mysql-aliases.cf<br>
virtual_mailbox_maps = mysql:/etc/postfix/virtual/mysql-maps.cf<br>
virtual_mailbox_domains =
mysql:/etc/postfix/virtual/mysql-domains.cf<br>
local_recipient_maps = $virtual_mailbox_maps<br>
<br>
content_filter=smtp-amavis:[127.0.0.1]:10024<br>
compatibility_level = 2<br>
<br>
smtpd_client_restrictions = <br>
reject_rbl_client sbl.spamhaus.org,<br>
check_client_access hash:/etc/postfix/blacklist<br>
smtpd_sender_restrictions = hash:/etc/postfix/access<br>
</font>----------------------------------------------------------------------------</p>
<p>master.cf:</p>
<p><font face="Courier New, Courier, monospace" size="-2">#<br>
# Postfix master process configuration file. For details on the
format<br>
# of the file, see the master(5) manual page (command: "man 5
master").<br>
#<br>
# Do not forget to execute "postfix reload" after editing this
file.<br>
#<br>
#
==========================================================================<br>
# service type private unpriv chroot wakeup maxproc command
+ args<br>
# (yes) (yes) (yes) (never) (100)<br>
#
==========================================================================<br>
smtp inet n - n - - smtpd -o
content_filter=<br>
<br>
smtp-amavis unix - - y - 2 smtp<br>
-o smtp_data_done_timeout=1200<br>
-o smtp_send_xforward_command=yes<br>
-o disable_dns_lookups=yes<br>
-o max_use=20<br>
-o smtp_tls_security_level=none<br>
<br>
<br>
127.0.0.1:10025 inet n - y - - smtpd<br>
-o content_filter=<br>
-o local_recipient_maps=<br>
-o relay_recipient_maps=<br>
-o smtpd_restriction_classes=<br>
-o smtpd_delay_reject=no<br>
-o smtpd_client_restrictions=permit_mynetworks,reject<br>
-o smtpd_helo_restrictions=<br>
-o smtpd_sender_restrictions=<br>
-o smtpd_recipient_restrictions=permit_mynetworks,reject<br>
-o smtpd_data_restrictions=reject_unauth_pipelining<br>
-o smtpd_end_of_data_restrictions=<br>
-o mynetworks=127.0.0.0/8<br>
-o smtpd_error_sleep_time=0<br>
-o smtpd_soft_error_limit=1001<br>
-o smtpd_hard_error_limit=1000<br>
-o smtpd_client_connection_count_limit=0<br>
-o smtpd_client_connection_rate_limit=0<br>
-o
receive_override_options=no_header_body_checks,no_unknown_recipient_checks<br>
-o smtpd_tls_security_level=none<br>
587 inet n - n - - smtpd<br>
<br>
<br>
#smtps inet n - - - - smtpd<br>
# -o smtpd_tls_wrappermode=yes<br>
# -o smtpd_sasl_auth_enable=yes<br>
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject<br>
# -o milter_macro_daemon_name=ORIGINATING<br>
#628 inet n - - - - qmqpd<br>
submission inet n - y - - smtpd
-v<br>
-o syslog_name=postfix/submission<br>
-o smtpd_tls_security_level=encrypt<br>
-o smtpd_sasl_type=dovecot<br>
-o smtpd_sasl_path=private/auth<br>
-o smtpd_sasl_security_options=noanonymous<br>
-o smtpd_sasl_auth_enable=yes<br>
-o
smtpd_client_restrictions=permit_sasl_authenticated,reject<br>
pickup fifo n - y 60 1 pickup<br>
-o content_filter=<br>
-o receive_override_options=no_header_body_checks<br>
cleanup unix n - y - 0 cleanup<br>
qmgr fifo n - n 300 1 qmgr<br>
#qmgr fifo n - - 300 1 oqmgr<br>
tlsmgr unix - - y 1000? 1 tlsmgr<br>
rewrite unix - - y - -
trivial-rewrite<br>
bounce unix - - y - 0 bounce<br>
defer unix - - y - 0 bounce<br>
trace unix - - y - 0 bounce<br>
verify unix - - y - 1 verify<br>
flush unix n - y 1000? 0 flush<br>
proxymap unix - - n - - proxymap<br>
proxywrite unix - - n - 1 proxymap<br>
# When relaying mail as backup MX, disable fallback_relay to
avoid MX loops<br>
smtp unix - - y - - smtp<br>
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5<br>
relay unix - - y - - smtp<br>
-o smtp_fallback_relay=<br>
showq unix n - y - - showq<br>
error unix - - y - - error<br>
retry unix - - y - - error<br>
discard unix - - y - - discard<br>
local unix - n n - - local<br>
virtual unix - n n - - virtual<br>
lmtp unix - - n - - lmtp<br>
anvil unix - - y - 1 anvil<br>
#<br>
#
====================================================================<br>
# Interfaces to non-Postfix software. Be sure to examine the
manual<br>
# pages of the non-Postfix software to find out what options it
wants.<br>
#<br>
# Many of the following services use the Postfix pipe(8)
delivery<br>
# agent. See the pipe(8) man page for information about
${recipient}<br>
# and other message envelope options.<br>
#
====================================================================<br>
#<br>
# maildrop. See the Postfix MAILDROP_README file for details.<br>
# Also specify in main.cf:
maildrop_destination_recipient_limit=1<br>
#<br>
scache unix - - y - 1 scache<br>
maildrop unix - n n - - pipe<br>
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}<br>
#<br>
#
====================================================================<br>
#<br>
# Recent Cyrus versions can use the existing "lmtp" master.cf
entry.<br>
#<br>
# Specify in cyrus.conf:<br>
# lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4<br>
#<br>
# Specify in main.cf one or more of the following:<br>
# mailbox_transport = lmtp:inet:localhost<br>
# virtual_transport = lmtp:inet:localhost<br>
#<br>
#
====================================================================<br>
#<br>
# Cyrus 2.1.5 (Amos Gouaux)<br>
# Also specify in main.cf: cyrus_destination_recipient_limit=1<br>
#<br>
cyrus unix - n n - - pipe<br>
user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m
${extension} ${user}<br>
#<br>
#
====================================================================<br>
# Old example of delivery via Cyrus.<br>
#<br>
#old-cyrus unix - n n - - pipe<br>
# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension}
${user}<br>
#<br>
#
====================================================================<br>
#<br>
# See the Postfix UUCP_README file for configuration details.<br>
#<br>
uucp unix - n n - - pipe<br>
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender -
$nexthop!rmail ($recipient)<br>
#<br>
# Other external delivery methods.<br>
#<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>
<br>
# ----- CPK<br>
##spamass-dovecot unix - n n - - pipe<br>
## flags=DRhu user=vmail:vmail argv=/usr/bin/spamc -u spamd -e
/usr/lib/dovecot<br>
spamass-dovecot unix - n n - - pipe<br>
user=spamd argv=/usr/bin/spamc -f -e<br>
/usr/sbin/sendmail -oi -f ${sender} ${recipient}<br>
<br>
#=========================================================================<br>
# service type private unpriv chroot wakeup maxproc command
+ args<br>
# (yes) (yes) (yes) (never) (100)<br>
#
==========================================================================<br>
<br>
</font>Wenn ich den virtual_transport spamass-dovecot einschalte,
bekomme ich "too many hops" vom Server, wenn ich von außen eine
Email zustellen will.</p>
<p>Mein host hat den Namen mail.mydomain.org. IN meine /etc/hosts
steht zwar auch noch (Ubuntu Eigenheit?)</p>
<p>127.0.1.1 mail.mydomain.org</p>
<p>aber wenn ich den Host auflöse</p>
<p># host mail.mydomain.org</p>
<p>bekomme ich die IP, über die er im Netz von außen zu sehen ist</p>
<p><br>
</p>
<p>Hilfe willkommen,</p>
<p><br>
</p>
<p>Grüße</p>
<p>Christoph</p>
<p><br>
</p>
</body>
</html>