[Postfixbuch-users] virtual aliases: smtpd_reject_unlisted_recipient greift nicht mehr

Mathias Behrle expi311203 at gmx.de
Mi Okt 17 22:52:49 CEST 2007


Ich drehe mich gerade im Kreis und sehe wahrscheinlich den Baum vor
lauter Wald nicht:

ich habe hier ein Setup mit virtual mailboxes und maildrop laufen, das 
seit Jahr und Tag auch völlig reibungslos funktionierte. Nun kommen seit 
heute massiv Reject-Meldungen rein, weil jemand meine Domain missbraucht. 
Die sind bei mir bisher im catchall-Account gelandet. Nun wollte ich diese 
Mails an nicht existierende User abweisen, indem ich den catchall-Account 
deaktiviert habe (was früher auch funktioniert hat). 
Jetzt kommen sie aber dennoch durch:

postfix/pipe[16143]: B83E21968: to=<Nuno_donret at behrle.dyndns.org>,
relay=maildrop, delay=3.5, delays=0.97/0.03/0/2.5, dsn=2.0.0,
status=sent (delivered via maildrop service)

Ich kann mich nicht erinnern außer postfix Upgrades irgendetwas geändert 
zu haben. Irgendwann vor langer Zeit hab ich mal den pre-cleanup
eingeführt, um die Header unbearbeitet an amavisd-new zu übergeben 
(master.cf s.u.). Auch hier kein Erfolg, wenn ich auf die
Default-Konfiguration zurückwechsle.
Hab hin und her probiert mit myhostname (Domain rausgenommen, die noch in
virtual_alias_domains stand/steht), mydomain, virtual_alias_domains und komm auf
keinen grünen Zweig.

Vielen Dank für jeden Hinweis,
Mathias

postfix  2.3.7-3~bpo.1 auf Debian Sarge

postconf -n:
address_verify_map = btree:/var/spool/postfix/var/lib/verify
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_untrusted_routing = no
append_at_myorigin = yes
append_dot_mydomain = yes
biff = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/lib/postfix
defer_transports = 
delay_warning_time = 8h
header_checks = regexp:/etc/postfix/header_checks_regexp
home_mailbox = Maildir/
local_destination_concurrency_limit = 1
mailbox_command = /usr/bin/maildrop
max_use = 10
mydestination = localhost
mydomain = behrle.dyndns.org
myhostname = majestix
mynetworks = 127.0.0.0/8
myorigin = $mydomain
recipient_canonical_maps = regexp:/etc/postfix/recipient_canonical_regexp
recipient_delimiter = +
sender_canonical_maps = regexp:/etc/postfix/sender_canonical_regexp
setgid_group = postdrop
smtp_enforce_tls = no
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/saslpass
smtp_sasl_security_options = noplaintext
smtp_tls_CAfile = /var/spool/postfix/etc/certs/ca-certificates.pem
smtp_tls_CApath = /var/spool/postfix/etc/certs
smtp_tls_cert_file = $smtpd_tls_cert_file
smtp_tls_enforce_peername = no
smtp_tls_key_file = $smtpd_tls_key_file
smtp_tls_loglevel = 0
smtp_tls_note_starttls_offer = yes
smtp_tls_per_site = hash:/etc/postfix/tls_per_site
smtp_tls_session_cache_timeout = 3600s
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated
smtpd_delay_reject = no
smtpd_error_sleep_time = 3s
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks reject_invalid_hostname
smtpd_recipient_limit = 200
smtpd_recipient_restrictions = reject_non_fqdn_recipient permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_recipient_access hash:/etc/postfix/recipient_access_admin
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = 
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_mynetworks reject_unauth_destination reject_non_fqdn_recipient check_sender_access pgsql:/etc/postfix/sender_access_exceptions_pgsql.cf reject_non_fqdn_sender permit_sasl_authenticated reject_unknown_sender_domain reject_unverified_sender reject_rbl_client        sbl-xbl.spamhaus.org reject_rbl_client        relays.ordb.org reject_rbl_client        list.dsbl.org reject_rhsbl_sender    dsn.rfc-ignorant.org permit
smtpd_tls_CAfile = /etc/ssl/certs/cacert_postfix.pem
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/certs/newcert_postfix.pem
smtpd_tls_key_file = /etc/ssl/private/newreq_postfix.pem
smtpd_tls_loglevel = 0
smtpd_tls_received_header = yes
smtpd_use_tls = yes
strict_rfc821_envelopes = yes
transport_maps = pgsql:/etc/postfix/transport_pgsql.cf
unknown_address_reject_code = 550
unverified_sender_reject_code = 550
virtual_alias_maps = pgsql:/etc/postfix/virtual_pgsql.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail/
virtual_mailbox_domains = pgsql:/etc/postfix/transport_pgsql.cf
virtual_mailbox_maps = pgsql:/etc/postfix/mailboxpath_pgsql.cf
virtual_uid_maps = static:5000

master.cf:
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
## mail received over the network
## don't do any address mappings before entering the content filter, it's done afterwards
smtp      inet  n       -       n       -       -       smtpd
 -o cleanup_service_name=pre-cleanup
 -o receive_override_options=no_address_mappings
# pickup	  fifo	n	-	-	60	1	pickup
## mail received local
pickup    fifo  n       -       n       60      1       pickup
 -o cleanup_service_name=pre-cleanup
# 628	  inet	n	-	-	-	-	qmqpd
# cleanup	  unix	n	-	-	-	0	cleanup

# Make sure e-mails are *not* modified before entering amavisd-new...
# ...but nevertheless do the header checks! (hmm, should be done by default since defined in main.cf..?)
pre-cleanup unix n      -       -       -       0	cleanup
  -o virtual_alias_maps=
 -o canonical_maps=
 -o sender_canonical_maps=
 -o recipient_canonical_maps=
 -o masquerade_domains=
#  -o header_checks=regexp:/etc/postfix/header_checks_regexp

# we don't need to do any checks here already done by pre-cleanup
cleanup	  unix	n	-	-	-	0	cleanup
 -o mime_header_checks=
 -o nested_header_checks=
 -o body_checks=
 -o header_checks=
		      
# 1st instance of MTA => injecting into amavisd-new
smtp-amavis unix -      -       -       -       2	lmtp
 -o smtp_data_done_timeout=1200
 -o lmtp_send_xforward_command=yes
 -o disable_dns_lookups=yes
 -o max_use=20
 
## amavisd-new
   
# 2nd instance of MTA => receiving from amavisd-new
## disable unnecessary tests and lookups in this instance
127.0.0.1:10025 inet n  -       -       -       -	smtpd
 -o content_filter=
 -o local_recipient_maps=
 -o relay_recipient_maps= 
 -o smtpd_restriction_classes=
 -o smtpd_delay_reject=no 
 -o smtpd_client_restrictions=permit_mynetworks,reject
 -o smtpd_helo_restrictions=
 -o smtpd_sender_restrictions=
 -o smtpd_recipient_restrictions=permit_mynetworks,reject
 -o mynetworks_style=host
 -o mynetworks=127.0.0.0/8
 -o strict_rfc821_envelopes=yes
# -o smtpd_error_sleep_time=0
 -o smtpd_soft_error_limit=1001
 -o smtpd_hard_error_limit=1000
 -o smtpd_client_connection_count_limit=0
 -o smtpd_client_connection_rate_limit=0
 -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
 -o smtpd_authorized_xforward_hosts=127.0.0.0/8
	      
qmgr	  fifo	n	-	-	300	1	qmgr
#qmgr	  fifo	n	-	-	300	1	nqmgr
rewrite	  unix	-	-	-	-	-	trivial-rewrite
bounce	  unix	-	-	-	-	0	bounce
defer	  unix	-	-	-	-	0	bounce
flush	  unix	n	-	-	1000?	0	flush
proxymap  unix	-	-	n	-	-	proxymap

# this one delivers to outside:
smtp	  unix	-	-	-	-	-	smtp
# smtp	  unix	-	-	-	-	-	smtp -v
relay	  unix	-	-	-	-	-	smtp
#	-o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix	n	-	-	-	-	showq
error     unix	-	-	-	-	-	error
local	  unix	-	n	n	-	-	local
virtual	  unix	-	n	n	-	-	virtual
lmtp	  unix	-	-	n	-	-	lmtp
trace	  unix	-	-	-	-	0	bounce
verify	  unix	-	-	-	-	1	verify
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache
discard   unix  -       -       -       -       -       discard

#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
# in order to be able to read auth socket from courier-authdaemon, permissions have to be set
# accordingly resp. maildrop should be run as user courier/daemon...
# maildrop  unix  -       n       n       -       -       pipe
#  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}

## this is working!! (vmail user owns and delivers all mailfolders)
maildrop  unix  -       n       n       -       -       pipe
 flags=DRhu user=vmail:vmail argv=/usr/bin/maildrop -d vmail ${user}@${nexthop} ${recipient} ${user} ${nexthop} ${sender}

## maildrop 1.8 looks up the "user" in courier-authdaemon, the first parameter of -d is looked up (attention to userrealm!!)
## postfix looks up maildrop user in PAM, must be local available
## this user also must have read access to the courier-authdaemon socket
# maildrop  unix  -       n       n       -       -       pipe -v
#  flags=DRhu user=vmail:vmail argv=/usr/local/bin/maildrop -w 90 -d ${user}@majestix.${nexthop} ${recipient} ${user} ${nexthop} ${sender}

# flags=DRhu user=daemon:daemon argv=/usr/local/bin/maildrop -w 90 -d ${user}@${nexthop} ${recipient} ${user} ${nexthop} ${sender}
# flags=DRhu user=${user}:${nexthop} argv=/usr/local/bin/maildrop -w 90 -d ${user}@${nexthop} ${recipient} ${user} ${nexthop} ${sender}


# The Cyrus deliver program has changed incompatibly, multiple times.
cyrus	  unix	-	n	n	-	-	pipe
  flags=R user=cyrus argv=/usr/sbin/cyrdeliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
#cyrus     unix  -       n       n       -       -       pipe
#  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
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 -d -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}

# only used by postfix-tls
#tlsmgr	  fifo	-	-	n	300	1	tlsmgr
#smtps	  inet	n	-	n	-	-	smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#587	  inet	n	-	n	-	-	smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes

	      
# mail2hylafax
faxout	unix	-	n	n	-	1	pipe flags= user=faxout argv=/usr/bin/faxmail -d -n ${user}

# mailman
mailman unix    -       n       n       -       -       pipe flags=FR user=list argv=/var/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}




Mehr Informationen über die Mailingliste Postfixbuch-users