Fehler 550 an Stelle von Fehler 450 gewünscht, nur wie ...

Walter H. walter.h at mathemainzel.info
Di Mär 22 13:05:02 CET 2016


Hallo,

wie kann ich postfix dazu zwingen, gleich einen Fehler 550 zu liefern und
nicht x-fach einen Fehler 450 ...

bei mir liefert fetchmail die Mails an den postfix, und sehr oft
wiederholen sich z.B.

"fetchmail: SMTP error: 450 4.1.8 <jypev at christmas-gift2.cc>: Sender
address rejected: Domain not found"

/etc/postfix/main.cf hat diesen Inhalt (reduziert um die Kommentare

soft_bounce = no
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix

mail_owner = postfix
myhostname = filter.mail
mydomain = mail
inet_interfaces = $myhostname, localhost
inet_protocols = all
mydestination = $myhostname, lx.local, localhost, localhost.localdomain

unknown_local_recipient_reject_code = 550
mynetworks_style = subnet
mynetworks = 192.168.0.0/24, 127.0.0.0/8

relayhost = [storage.mail]:25
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
recipient_delimiter = +

smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
debug_peer_level = 2

debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5

sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
# latest CentOS 6 release
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES


#strict_8bitmime = yes
strict_7bit_headers = yes
#strict_8bitmime_body = yes

smtpd_delay_reject = yes

smtpd_helo_required = yes

smtpd_helo_restrictions = permit_mynetworks, reject_unknown_hostname,
reject_non_fqdn_helo_hostname

smtpd_client_restrictions = permit_mynetworks, reject
smtpd_etrn_restrictions = permit_mynetworks, reject

smtpd_sender_restrictions = check_sender_mx_access
cidr:/etc/postfix/drop.cidr, check_sender_ns_access
cidr:/etc/postfix/drop.cidr, reject_non_fqdn_sender,
reject_unknown_sender_domain

smtpd_recipient_restrictions = permit_mynetworks,
reject_non_fqdn_recipient, reject_unauth_destination,
reject_unknown_recipient_domain, reject_unknown_sender_domain, reject

# smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated,
defer_unauth_destination

smtpd_discard_ehlo_keywords = silent-discard, dsn

smtpd_reject_unlisted_sender = yes
smtpd_reject_unlisted_recipient = yes

smtp_bind_address = 192.168.241.222
smtp_bind_address6 = 2001:15c0:65ff:87d4::4d:4149:4c32

smtp_helo_name = lxwaldivm-005.waldinet.home
smtp_helo_timeout = 45

smtp_host_lookup = native, dns

body_checks = pcre:/etc/postfix/body_chks.pcre
body_checks_size_limit = 1048576
header_checks = regexp:/etc/postfix/hdr_chks.regex,
pcre:/etc/postfix/hdr_chks.pcre
header_checks_size_limit = 131072

message_reject_characters = \0

message_size_limit = 26214400

mime_header_checks = $header_checks
nested_header_checks =

smtp_header_checks = pcre:/etc/postfix/smtp_hdr_chks.pcre

smtp_mime_header_checks = $smtp_header_checks
smtp_nested_header_checks =

unknown_address_reject_code = 554
unknown_client_reject_code = 550
unknown_hostname_reject_code = 554
unverified_recipient_reject_code = 554
unverified_sender_reject_code = 554

content_filter = clamav-scan:[127.0.0.1]:10025

postconf | grep "55" liefert

access_map_reject_code = 554
maps_rbl_reject_code = 554
multi_recipient_bounce_reject_code = 550
reject_code = 554
relay_domains_reject_code = 554
unknown_address_reject_code = 554
unknown_client_reject_code = 550
unknown_hostname_reject_code = 554
unknown_local_recipient_reject_code = 550
unknown_relay_recipient_reject_code = 550
unknown_virtual_alias_reject_code = 550
unknown_virtual_mailbox_reject_code = 550
unverified_recipient_reject_code = 554
unverified_sender_reject_code = 554

postconf | grep "450" liefert

access_map_defer_code = 450
defer_code = 450
plaintext_reject_code = 450
unverified_recipient_defer_code = 450
unverified_sender_defer_code = 450

/etc/postfix/master.cf hat das extra dabei wegen clamav

clamav-scan unix -       -       n       -       16       smtp
   -o smtp_data_done_timeout=1200
   -o smtp_send_xforward_command=yes
   -o disable_dns_lookups=yes
127.0.0.1:10026 inet n       -       n       -       16       smtpd
   -o content_filter=
   -o local_recipient_maps=
   -o
receive_override_options=no_unknown_recipient_checks,no_header_body_checks
   -o relay_recipient_maps=
   -o smtpd_restriction_classes=
   -o smtpd_client_restrictions=
   -o smtpd_helo_restrictions=
   -o smtpd_sender_restrictions=
   -o smtpd_recipient_restrictions=permit_mynetworks,reject
   -o mynetworks_style=host
   -o smtpd_authorized_xforward_hosts=127.0.0.1


es funktioniert alles, ich will nur einen 5xx Fehler statt des 4xx Fehlers
erwzingen;

im fetchmailrc steht folgendes

defaults
  auth password
  envelope "X-Envelope-To:"
  timeout 45
  no keep
  no rewrite
  smtphost filter.mail
  sslproto "TLS1"
  sslcertfile "/etc/pki/tls/certs/ca-bundle.crt"
  ssl
  dropstatus
  limit 26213888

sucht man nach der komischen E-mail adresse im maillog, dann kommt das zum
Vorschein ...

Mar 22 11:39:46 filter postfix/smtpd[16115]: connect from
filter.mail[192.168.0.1]
Mar 22 11:39:49 filter postfix/smtpd[16115]: warning: Unable to look up MX
host for christmas-gift2.cc: Host not found, try again
Mar 22 11:39:53 filter postfix/smtpd[16115]: NOQUEUE: reject: RCPT from
filter.mail[192.168.0.1]: 450 4.1.8 <jypev at christmas-gift2.cc>: Sender
address rejected: Domain not found; from=<jypev at christmas-gift2.cc>
to=<walter+NoReply at filter.mail> proto=ESMTP helo=<filter.mail>
Mar 22 11:39:53 lxwaldivm-005 postfix/smtpd[16115]: disconnect from
filter.mail[192.168.0.1]


wieso ist die Tatsache, daß er den MX Host nicht findet nur ein warning
und kein error?

Danke und Grüße aus Österreich,
Walter



Mehr Informationen über die Mailingliste postfix-users