mail loops back to myself

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

mail loops back to myself

Oliver Schonrock
We have a situation where postfix will not deliver a "delivery status
notification" (DSN) when a remote server recjects the message postfix is trying
to send.

Instead Postfix reports that "mail for news.t1ps.com loops back to myself"
eventhough postfix is the final destination for the Return-Path address. It
should deliver the DSN to a local cyrus instance via lmtp.

The problem only occurs when we use a VERP style address for the return path.

We have been on this problem for a week and searched far and wide with no
success so far. So I have provided quite a bit of detail here below.

Any help is much appreciated.

Oliver


Failure Case
------------
This happens when yahoo/hotmail/aol/etc rejects the original mail with
554 delivery error: This user doesn't have a yahoo.com account
([hidden email]).. in reply to end of DATA command

and postfix says:
to=<failures+nkaderibigbe=[hidden email]>, relay=none, delay=0.01,
delays=0.01/0/0/0, dsn=5.4.6, status=bounced (mail for news.t1ps.com loops
back to myself)

Success Case
------------
We have tested the same situation when sending to another postifix instance
(happens to be on the same physical machine as the first postfix instance).
Again we are sending to a non-existent address and the second postfix instance
responds with

550 5.1.1 <[hidden email]>: Recipient address rejected: User unknown in
virtual mailbox table (in reply to RCPT TO command)

In this case postfix delivers the DSN as expected via lmtp to the local cyrus
instance:
to=<failures+nobody=[hidden email]>,
relay=smtp.news.t1ps.com[/var/imap/socket/lmtp], delay=0.76,
delays=0/0.01/0/0.75, dsn=2.1.5, status=sent (250 2.1.5 Ok)

Verp
----
NOTE: The failure case only happens when we are using a VERP style address in
Return-Path
The Return-Path for each case is:
Success case: failures+nobody=[hidden email]
Failure case: failures+nkaderibigbe=[hidden email]

Note if we don't use VERP, ie "Return-Path: <[hidden email]>" then
yahoo works also.

Full maillog extracts, main.cf and master.cf included below.


realtsp.....working!
====================
Oct  6 16:46:08 milford postfix/smtpd[58480]: 5027DD6E971:
client=takapuna.realtsp.com[89.187.108.20], sasl_method=LOGIN,
sasl_username=*****
Oct  6 16:46:08 milford postfix/cleanup[58482]: 5027DD6E971: message-
id=<[hidden email]>
Oct  6 16:46:08 milford postfix/qmgr[57929]: 5027DD6E971:
from=<failures+nobody=[hidden email]>, size=9468, nrcpt=1 (queue
active)
Oct  6 16:46:08 milford postfix/smtp[57936]: 5027DD6E971:
to=<[hidden email]>, relay=milford.realtsp.com[89.187.108.21]:25,
delay=0.64, delays=0.63/0/0/0.01, dsn=5.1.1, status=bounced (host
milford.realtsp.com[89.187.108.21] said: 550 5.1.1 <[hidden email]>:
Recipient address rejected: User unknown in virtual mailbox table (in reply to
RCPT TO command))
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=<[hidden email]>
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=<failures+nobody=[hidden email]>,
relay=smtp.news.t1ps.com[/var/imap/socket/lmtp], delay=0.76,
delays=0/0.01/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.com...not working!
========================
Oct  6 16:42:01 milford postfix/smtpd[57732]: 33EBBD6EE87:
client=takapuna.realtsp.com[89.187.108.20], sasl_method=LOGIN,
sasl_username=****
Oct  6 16:42:01 milford postfix/cleanup[57735]: 33EBBD6EE87: message-
id=<[hidden email]>
Oct  6 16:42:01 milford postfix/qmgr[57598]: 33EBBD6EE87:
from=<failures+nkaderibigbe=[hidden email]>, size=9480, nrcpt=1
(queue active)
Oct  6 16:42:10 milford postfix/smtp[57636]: 33EBBD6EE87:
to=<[hidden email]>, relay=e.mx.mail.yahoo.com[206.190.53.191]:25,
delay=9.4, delays=0.02/0/6.5/2.9, dsn=5.0.0, status=bounced (host
e.mx.mail.yahoo.com[206.190.53.191] said: 554 delivery error: dd This user
doesn't have a yahoo.com account ([hidden email]) [0] -
mta164.mail.re2.yahoo.com (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=<[hidden email]>
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=<failures+nkaderibigbe=[hidden email]>, relay=none, delay=0.01,
delays=0.01/0/0/0, dsn=5.4.6, status=bounced (mail for news.t1ps.com 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.com
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
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.com, domain2.com, domain3.co.uk,
domain4.com
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
===============================================
[hidden email] 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

Reply | Threaded
Open this post in threaded view
|

Re: mail loops back to myself

Wietse Venema
Oliver Schonrock:
> to=<failures+nkaderibigbe=[hidden email]>, relay=none, delay=0.01,
> delays=0.01/0/0/0, dsn=5.4.6, status=bounced (mail for news.t1ps.com loops
> back to myself)

Your problem is almost certainly in this file:
transport_maps       = regexp:/usr/local/etc/postfix_rsh/transport

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: mail loops back to myself

Oliver Schonrock
On Thursday 08 Oct 2009 12:54:48 Wietse Venema wrote:
> Oliver Schonrock:
> > to=<failures+nkaderibigbe=[hidden email]>, relay=none,
> > delay=0.01, delays=0.01/0/0/0, dsn=5.4.6, status=bounced (mail for
> > news.t1ps.com loops back to myself)
>
> Your problem is almost certainly in this file:
> transport_maps       = regexp:/usr/local/etc/postfix_rsh/transport

Brilliant! Got it in one!

Our Transport regex's were matching the VERP addresses.
Once we tightened them it works as expected.

Many thanks Wietse