Hello,

I hvae a question about dealing with locally generated email (non
delivery notifications) with an empty sender address.

I am running postfix 3.8.5 on my 'dialup' box. It is used to deliver
my email by smtp via a relay host. I submit outgoing email with a user
settable envelope address (I do no sender address rewriting for
outgoing email).

But if there are bounces because the email is rejected by the relay,
(a typo in the domain of the recipient address, for example...) things
get weird. See the log snipplet below.

Apparently, postfix creates a non delivery notification for the
rejected email. This has an empty sender address, and actually it
should be go back to me, in my local mailbox and not send to any node
outside.

But postfix offers this non delivery notification to the relay, which
rejects it, this time for having a empty sender address.

Now, postfix seems to discard the email silently, at least I didn't
find it anywhere.

I think postfix should deliver such emails only local, not to a relay
host, even if the recipient address is a vaild, routable email
address. But I didn't find out how to configure such a rule.
BTW., aliases for root/postmaster/MAILER-DAEMON are set up,

Any hint is welcome.

Thanks in advance,

N.

P.S.:
Just for being complete: I've set up sender dependent relaying. Email
with a from adress "@lewonze.de" is send via variomedia.de, the rest
is sent via gmx.de.  For straightforward cases, this works well. I
don't think that this plays a role here.

In short, my setting in main.cf look like this:

  # grep -v "#\|^$" main.cf
  compatibility_level = 3.7
  queue_directory = /var/spool/postfix
  command_directory = /usr/sbin
  daemon_directory = /usr/libexec/postfix
  data_directory = /var/lib/postfix
  mail_owner = postfix
  unknown_local_recipient_reject_code = 550
  alias_maps = hash:/etc/postfix/aliases
  alias_database = $alias_maps
  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
  newaliases_path = /usr/bin/newaliases
  mailq_path = /usr/bin/mailq
  setgid_group = postdrop
  html_directory = no
  manpage_directory = /usr/share/man
  sample_directory = /etc/postfix
  readme_directory = no
  meta_directory = /etc/postfix
  shlib_directory = /usr/lib64/postfix/${mail_version}
  mail_spool_directory = /var/mail
  smtp_sasl_security_options = noplaintext, noanonymous
  smtp_sasl_tls_security_options = noanonymous
  smtp_sender_dependent_authentication = yes
  sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
  smtp_sasl_auth_enable = yes
  smtp_tls_security_level = encrypt
  smtp_sasl_tls_security_options = noanonymous
  relayhost = mail.gmx.de
  smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
  defer_transports = smtp
  home_mailbox = Mail/inbox
  mailbox_size_limit = 163840000
  message_size_limit = 81920000


Here is the log snipplet:

  Jun 23 22:50:02 schubert postfix/pickup[7287]: 60970354BC3: uid=1000
  from=<x...@lewonze.de>
  Jun 23 22:50:02 schubert postfix/cleanup[7776]: 60970354BC3:
  message-id=<cfa208a9-4332-1e4c-9b36-36fd852a0...@gmx.de>
  Jun 23 22:50:02 schubert postfix/qmgr[26673]: 60970354BC3:
  from=<x...@lewonze.de>, size=471, nrcpt=1 (queue active)
  Jun 23 22:50:02 schubert postfix/error[7782]: 60970354BC3:
  to=<someth...@lewonzelewonze.de>, relay=none, delay=0.01, delays=0.01/0/0/0,
  dsn=4.3.2, status=deferred (deferred transport)
  Jun 23 22:50:11 schubert postfix/qmgr[26673]: 60970354BC3:
  from=<x...@lewonze.de>, size=471, nrcpt=1 (queue active)
  Jun 23 22:50:12 schubert postfix/smtp[7836]: 60970354BC3:
  to=<someth...@lewonzelewonze.de>,
  relay=smtp.variomedia.de[2a00:1c38:1:1:511c:e01c::]:25, delay=9.8,
  delays=9.1/0.04/0.64/0.08, dsn=5.0.0, status=bounced (host
  smtp.variomedia.de[2a00:1c38:1:1:511c:e01c::] said: 550 Unrouteable address
  (in reply to RCPT TO command))
  Jun 23 22:50:12 schubert postfix/cleanup[7776]: 3DBEA354BC8:
  message-id=<20240623205012.3DBEA354BC8@schubert.localdomain>
  Jun 23 22:50:12 schubert postfix/bounce[7837]: 60970354BC3: sender
  non-delivery notification: 3DBEA354BC8
  Jun 23 22:50:12 schubert postfix/qmgr[26673]: 3DBEA354BC8: from=<>, size=2533,
  nrcpt=1 (queue active)
  Jun 23 22:50:12 schubert postfix/qmgr[26673]: 60970354BC3: removed
  Jun 23 22:50:12 schubert postfix/error[7782]: 3DBEA354BC8:
  to=<x...@lewonze.de>, relay=none, delay=0, delays=0/0/0/0, dsn=4.3.2,
  status=deferred (deferred transport)
  Jun 23 22:50:27 schubert postfix/qmgr[26673]: 3DBEA354BC8: from=<>, size=2533,
  nrcpt=1 (queue active)
  Jun 23 22:50:27 schubert postfix/smtp[7836]: 3DBEA354BC8:
  to=<x...@lewonze.de>, relay=mail.gmx.de[212.227.17.168]:25, delay=16,
  delays=15/0/0.76/0.05, dsn=5.0.0, status=bounced (host
  mail.gmx.de[212.227.17.168] said: 550-Requested action not taken: mailbox
  unavailable 550 Sender address is not allowed. (in reply to MAIL FROM
  command))
  Jun 23 22:50:27 schubert postfix/qmgr[26673]: 3DBEA354BC8: removed


_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to