Score:0

status=bounced (mail forwarding loop for postmaster@localhost) when receiving an email with postfix

cn flag

I use postfix with the following /etc/postfix/main.cf:

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
readme_directory = no
compatibility_level = 2
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_security_level=may
smtp_tls_CApath=/etc/ssl/certs
smtp_tls_security_level=may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = leibnizproject.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
#myorigin = leibnizproject.com
myorigin = localhost
#mydestination = leibnizproject.com, 197t.l.hostens.cloud, localhost.l.hostens.cloud, localhost
mydestination = localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
inet_interfaces = all
inet_protocols = all
virtual_alias_domains = $myhostname
virtual_alias_maps = hash:/etc/postfix/virtual

When trying to send an email to webmaster@leibnizproject.com from myPersonalEmail I get in /var/log/mail.log:

Feb  2 16:46:01 leibnizproject postfix/qmgr[35735]: DC70314073C: from=<myPersonalEmail>, size=6508, nrcpt=1 (queue active)
Feb  2 16:46:01 leibnizproject postfix/cleanup[35745]: 01DA114073E: message-id=<398816530.4876742.1675349159274@mail.yahoo.com>
Feb  2 16:46:01 leibnizproject postfix/qmgr[35735]: 01DA114073E: from=<myPersonalEmail>, size=6643, nrcpt=1 (queue active)
Feb  2 16:46:01 leibnizproject postfix/local[35756]: DC70314073C: to=<postmaster@localhost>, orig_to=<webmaster@leibnizproject.com>, relay=local, delay=0.15, delays=0.15/0.01/0/0, dsn=2.0.0, status=sent (forwarded as 01DA114073E)
Feb  2 16:46:01 leibnizproject postfix/qmgr[35735]: DC70314073C: removed
Feb  2 16:46:01 leibnizproject postfix/local[35756]: 01DA114073E: to=<postmaster@localhost>, orig_to=<webmaster@leibnizproject.com>, relay=local, delay=0.01, delays=0/0/0/0.01, dsn=5.4.6, status=bounced (mail forwarding loop for postmaster@localhost)
Feb  2 16:46:01 leibnizproject postfix/cleanup[35745]: 03F9A14073F: message-id=<20230202144601.03F9A14073F@leibnizproject.com>
Feb  2 16:46:01 leibnizproject postfix/qmgr[35735]: 03F9A14073F: from=<>, size=8633, nrcpt=1 (queue active)
Feb  2 16:46:01 leibnizproject postfix/bounce[35758]: 01DA114073E: sender non-delivery notification: 03F9A14073F
Feb  2 16:46:01 leibnizproject postfix/qmgr[35735]: 01DA114073E: removed
Feb  2 16:46:01 leibnizproject postfix/smtpd[35741]: disconnect from sonic309-24.consmr.mail.ir2.yahoo.com[77.238.179.82] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7

Here is the content of /etc/postfix/virtual:

webmaster@leibnizproject.com postmaster

I've tried to modify some parameters in main.cf but the problem remains. I don't understand why the line from=<>, size=8633, nrcpt=1 (queue active) is in the log. Was a mail tried to be sent without sender?

Andomar avatar
jo flag
Your `virtual` file maps `webmaster@leibnizproject.com` to `postmaster@localhost`. And you see in the log that this mapping is applied. Where do you specify that `postmaster@localhost` exists?
Zlotz avatar
cn flag
I thought postmaster was the name imposed by postfix. Sorry, it's my first mail server setting up.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.