Hi I have an issue with bounced mail it does not happen all the time but at the same time is very frequent. Most of the time if I send an email to an address that does not exist then i get a bounce back into failues@domain however there seem to be instances when I get this error below
Sep 30 13:38:53 postfix/smtp[62566]: DB8E6D6F9EA: to=, relay=none, delay=0, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for domain loops back to myself)
I seem to get this when I get an immediate bounce i.e the server im trying to connect to immediately blocks the email because it nows that the address does not exist. If the email goes out and is returned later this seems to work fine.
Does anyone have any ideas why I would get this "mail for domain loops back to myself" error message.
Obviously it is me trying to send the email back to myself as my server received a block when trying to send a mail then it tries to send the mail back to the ReplyTo header which in this case is itself but shouldn't it be able to handle this?
........
NOTE: ive had to remove any '.com' from this post as I can only post 1 url
Thanks for the 2 answers already however we are still having the same issue. so below I'm trying to provide some more detailed information.
Both the examples below try to send to a non-existent address. RealTSP bounce from another postfix instance works. Yahoo's bounce doesn't work. We are expecting a "non-delivery notification" to be delivered to , because the Return-Path in both cases is an equivalent VERP address. Note if we don't use VERP, ie "Return-Path: " then yahoo works also.
Log entries
realtsp.....working! ==================== Oct 6 16:46:08 milford postfix/smtpd[58480]: 5027DD6E971: client=takapuna.realtsp[89.187.108.20], sasl_method=LOGIN, sasl_username=***** Oct 6 16:46:08 milford postfix/cleanup[58482]: 5027DD6E971: message-id= Oct 6 16:46:08 milford postfix/qmgr[57929]: 5027DD6E971: from=, size=9468, nrcpt=1 (queue active) Oct 6 16:46:08 milford postfix/smtp[57936]: 5027DD6E971: to=, relay=milford.realtsp[89.187.108.21]:25, delay=0.64, delays=0.63/0/0/0.01, dsn=5.1.1, status\ =bounced (host milford.realtsp[89.187.108.21] said: 550 5.1.1 : Recipient address rejected: User unknown in virtual mailbox table (in reply to RCPT TO comm\ and)) Oct 6 16:46:08 milford postfix/bounce[58483]: 5027DD6E971: sender non-delivery notification: EA68FD6EAB7 Oct 6 16:46:08 milford postfix/qmgr[57929]: 5027DD6E971: removed Oct 6 16:46:08 milford postfix/cleanup[58482]: EA68FD6EAB7: message-id= Oct 6 16:46:08 milford postfix/qmgr[57929]: EA68FD6EAB7: from=, size=11600, nrcpt=1 (queue active) Oct 6 16:46:09 milford postfix/lmtp[58484]: EA68FD6EAB7: to=, relay=smtp.news.t1ps[/var/imap/socket/lmtp], delay=0.76, delays=0/0.0\ 1/0/0.75, dsn=2.1.5, status=sent (250 2.1.5 Ok) Oct 6 16:46:09 milford postfix/qmgr[57929]: EA68FD6EAB7: removed yahoo...not working! ======================== Oct 6 16:42:01 milford postfix/smtpd[57732]: 33EBBD6EE87: client=takapuna.realtsp[89.187.108.20], sasl_method=LOGIN, sasl_username=**** Oct 6 16:42:01 milford postfix/cleanup[57735]: 33EBBD6EE87: message-id= Oct 6 16:42:01 milford postfix/qmgr[57598]: 33EBBD6EE87: from=, size=9480, nrcpt=1 (queue active) Oct 6 16:42:10 milford postfix/smtp[57636]: 33EBBD6EE87: to=, relay=e.mx.mail.yahoo[206.190.53.191]:25, delay=9.4, delays=0.02/0/6.5/2.9, dsn=5.0.0, s\ tatus=bounced (host e.mx.mail.yahoo[206.190.53.191] said: 554 delivery error: dd This user doesn't have a yahoo account (nkaderibigbe@yahoo) [0] - mta164.mail.re2.yaho\ o (in reply to end of DATA command)) Oct 6 16:42:10 milford postfix/bounce[57756]: 33EBBD6EE87: sender non-delivery notification: A083ED6EA01 Oct 6 16:42:10 milford postfix/qmgr[57598]: 33EBBD6EE87: removed Oct 6 16:42:10 milford postfix/cleanup[57735]: A083ED6EA01: message-id= Oct 6 16:42:10 milford postfix/qmgr[57598]: A083ED6EA01: from=, size=11696, nrcpt=1 (queue active) Oct 6 16:42:10 milford postfix/smtp[57631]: A083ED6EA01: to=, relay=none, delay=0.01, delays=0.01/0/0/0, dsn=5.4.6, status=bounced \ (mail for news.t1ps loops back to myself) Oct 6 16:42:10 milford postfix/qmgr[57598]: A083ED6EA01: removed
main.cf
soft_bounce = no
queue_directory = /var/spool/postfix_rsh
command_directory = /usr/local/sbin
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/postfix_rsh
mail_owner = postfix
myhostname = smtp.news.t1ps
inet_interfaces = 89.187.108.81
local_recipient_maps = $virtual_mailbox_maps
unknown_local_recipient_reject_code = 550
mynetworks_style = host
relay_domains = $mydestination
recipient_delimiter = +
mailbox_transport = lmtp:unix:/var/imap/socket/lmtp
header_checks = regexp:/usr/local/etc/postfix_rsh/header_checks
debug_peer_level = 10
debug_peer_list = yahoo
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/local/sbin/sendmail
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
setgid_group = maildrop
html_directory = no
manpage_directory = /usr/local/man
sample_directory = /usr/local/etc/postfix_rsh
readme_directory = no
masquerade_domains = $mydomain
message_size_limit = 51200000
virtual_transport = lmtp:unix:/var/imap/socket/lmtp
virtual_mailbox_domains = news.t1ps, domain2, domain3.co.uk, domain4
virtual_alias_maps = hash:/usr/local/etc/postfix_rsh/virtual
virtual_mailbox_maps = hash:/usr/local/etc/postfix_rsh/virtual_mailbox_maps
transport_maps = regexp:/usr/local/etc/postfix_rsh/transport
broken_sasl_auth_clients = no
smtp_bind_address = 89.187.108.81
smtpd_sasl_auth_enable = yes
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_helo_restrictions = reject_invalid_hostname
smtpd_require_helo = yes
slow_destination_concurrency_limit = 15
slow_destination_recipient_limit = 5
syslog_facility = local1
/usr/local/etc/postfix_rsh/virtual_mailbox_maps
failures@news.t1ps dummy
master.cf
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - 500 smtp
slow unix - - n - 100 smtp
-o smtp_connect_timeout=5
relay unix - - n - 100 smtp
-o fallback_relay=
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
26 inet n - n - - smtpd
-o content_filter=
smtp inet n - n - - smtpd
-o content_filter=spamchk:dummy
spamchk unix - n n - 10 pipe
flags=Rq user=spamd argv=/usr/local/bin/spamchk_rsh -f ${sender} --
${recipient}
proxywrite unix - - n - 1 proxymap