What is causing this mail forwarding loop bounce?
I'm using Google's Postini replacement as a spam filter before mail gets to my smtp server. I currently have a problem where most emails that get spam trapped by Google disappear when I attempt to have them delivered. Google gives me the ability to reattempt delivery and I have a repeatable case where one example spam always gets bounced by my Postfix, and one always comes through fine. Here are my smtpd logs from a case where I tried to deliver the 2 spam emails seconds apart; the first one failed and the second one worked: http://pastebin.com/XUYR4ZDe Here's another attempt to deliver the same problematic email, this time with -v verbosity added to just about everything in /etc/postfix/master.cf: http://pastebin.com/ENkgTXz6 AFAICT, everything seems to go normally but then I get: send attr reason = mail forwarding loop for se...@sendu.me.uk and it eventually bounces. My postconf -n: postconf -n address_verify_relayhost = alias_database = hash:/etc/mail/aliases alias_maps = mysql:/etc/postfix/mysql-aliases.cf broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = //usr/lib64/postfix data_directory = /var/lib/postfix debug_peer_level = 1 default_destination_concurrency_limit = 2 home_mailbox = .maildir/ html_directory = /usr/share/doc/postfix-2.5.5/html inet_interfaces = all local_destination_concurrency_limit = 2 local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname local_transport = local mail_owner = postfix mailq_path = /usr/bin/mailq manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mydomain = sendu.me.uk myhostname = 64x2.sendu.me.uk mynetworks_style = host myorigin = $mydomain newaliases_path = /usr/bin/newaliases queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.5.5/readme relayhost = outbound.mailhop.org relocated_maps = mysql:/etc/postfix/mysql-relocated.cf sample_directory = /etc/postfix sendmail_path = /usr/sbin/sendmail setgid_group = postdrop smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = smtp_tls_CAfile = /etc/ssl/private/sub.class1.server.ca.pem smtp_tls_CApath = /etc/ssl/certs smtp_tls_cert_file = /etc/ssl/private/sendu.me.uk.crt smtp_tls_key_file = /etc/ssl/private/sendu.me.uk.decrypted.key smtp_tls_loglevel = 0 smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_tls_session_cache smtp_tls_session_cache_timeout = 3600s smtp_use_tls = yes smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, check_client_access cidr:/etc/postfix/allowed_clients.cidr, reject smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = smtpd_sasl_security_options = noanonymous smtpd_tls_CAfile = /etc/ssl/private/sub.class1.server.ca.pem smtpd_tls_CApath = /etc/ssl/certs smtpd_tls_ask_ccert = yes smtpd_tls_auth_only = yes smtpd_tls_cert_file = /etc/ssl/private/sendu.me.uk.crt smtpd_tls_key_file = /etc/ssl/private/sendu.me.uk.decrypted.key smtpd_tls_loglevel = 0 smtpd_tls_received_header = yes smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_tls_session_cache smtpd_tls_session_cache_timeout = 3600s smtpd_use_tls = yes tls_random_source = dev:/dev/urandom unknown_local_recipient_reject_code = 550 virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf virtual_gid_maps = static:$vmail-gid virtual_mailbox_base = / virtual_mailbox_domains = mail.sendu.me.uk senduphotography.com bala.me.uk virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf virtual_minimum_uid = 1000 virtual_transport = virtual virtual_uid_maps = static:$vmail-uid I'm running Postfix 2.8.4 Any help greatly appreciated. -- View this message in context: http://postfix.1071664.n5.nabble.com/What-is-causing-this-mail-forwarding-loop-bounce-tp62199.html Sent from the Postfix Users mailing list archive at Nabble.com.
Re: What is causing this mail forwarding loop bounce?
Here's another delivery attempt, this time with all verbose logging turned off: http://pastebin.com/TtyDXKBX It bounces; I don't know why. Is there any way to find out? -- View this message in context: http://postfix.1071664.n5.nabble.com/What-is-causing-this-mail-forwarding-loop-bounce-tp62199p62229.html Sent from the Postfix Users mailing list archive at Nabble.com.
Re: What is causing this mail forwarding loop bounce?
> You mail is bounced because it contains a Delivered-To: header > with the address of the recipient. > > Postfix adds this header upon delivery. The above error normally > means that you have an email fordwading loop. > > Wietse Yes, I already understood that I have a mail forwarding loop according to the error - see the subject line. My question is what is causing it, and how do I solve it? Why didn't the other email suffer the same problem? Here are the logs for the successful delivery of a message from Google quarantine: Oct 15 15:25:21 64x2 postfix/smtpd[9455]: sql auxprop plugin using mysql engine Oct 15 15:25:21 64x2 postfix/smtpd[9455]: connect from mail-qe0-f77.google.com[209.85.128.77] Oct 15 15:25:22 64x2 postfix/smtpd[9455]: 6D2783381FE: client=mail-qe0-f77.google.com[209.85.128.77] Oct 15 15:25:22 64x2 postfix/cleanup[9422]: 6D2783381FE: message-id=<725921480.7881521381574873880.JavaMail.root@ip-10-204-86-63.ec2.internal> Oct 15 15:25:22 64x2 postfix/qmgr[21535]: 6D2783381FE: from=, size=6950, nrcpt=1 (queue active) Oct 15 15:25:22 64x2 postfix/local[9456]: 6D2783381FE: to=, relay=local, delay=0.36, delays=0.33/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to maildir) Oct 15 15:25:22 64x2 postfix/qmgr[21535]: 6D2783381FE: removed Oct 15 15:25:22 64x2 postfix/smtpd[9455]: disconnect from mail-qe0-f77.google.com[209.85.128.77] What might be special about the problematic email? -- View this message in context: http://postfix.1071664.n5.nabble.com/What-is-causing-this-mail-forwarding-loop-bounce-tp62199p62231.html Sent from the Postfix Users mailing list archive at Nabble.com.
Re: What is causing this mail forwarding loop bounce?
On 17 Oct 2013, at 12:34, Wietse Venema [via Postfix] [Masked] wrote: > > Preview: sendu: > > You mail is bounced because it contains a Delivere > Safely received through a Masked Email. IF THIS IS SPAM, CLICK HERE TO BLOCK > THIS MASKED EMAIL. > > sendu: > > > > You mail is bounced because it contains a Delivered-To: header > > > with the address of the recipient. > > > > > > Postfix adds this header upon delivery. The above error normally > > > means that you have an email fordwading loop. > > > > > > Wietse > > > > Yes, I already understood that I have a mail forwarding loop > > according to the error - see the subject line. My question is what > > is causing it, and how do I solve it? Why didn't the other email > > suffer the same problem? > > Does the Delivered-To: header already exist in the message? If that > is the case, you have been forwarding mail back and forth between > Postfix and some other server. That is a mail delivery loop. Well not back and forth between my Postfix server. But in any case, the messages in Google's quarantine do indeed already have the Delivered-To header prior to delivery. Their suggestion to me was that I turn off the D flag to avoid this problem. How do I turn off the D flag? -- View this message in context: http://postfix.1071664.n5.nabble.com/What-is-causing-this-mail-forwarding-loop-bounce-tp62199p62342.html Sent from the Postfix Users mailing list archive at Nabble.com.
Re: What is causing this mail forwarding loop bounce?
On 18 Oct 2013, at 18:18, "/dev/rob0 [via Postfix] [Masked]" wrote: > > > How do I turn off the D flag? > > What is this "D flag"? Perhaps you need to go back to the one who > made the suggestion to you. It was a tech support person quoting the man page for pipe. > I would suggest that you start over with non-verbose logs (and > perhaps mail headers) which illustrate the problem, and current > "postconf -n" output. Please read the thread; these have already been supplied. -- View this message in context: http://postfix.1071664.n5.nabble.com/What-is-causing-this-mail-forwarding-loop-bounce-tp62199p62353.html Sent from the Postfix Users mailing list archive at Nabble.com.
Re: What is causing this mail forwarding loop bounce?
On 18 Oct 2013, at 18:29, "Wietse Venema [via Postfix] [Masked]" wrote: > > > At this point I don't care about absolute correctness. I just want > > to receive my email. > > > > How do I disable the D flag? > > The D flag exists only in the pipe(8) daemon and ADDS delivered-to > headers. That does not appear to be your problem. "The D flag also enforces loop detection" is why the person from Google suggested disabling it. How else can I disable loop detection? (And how do I know if I'm using the pipe daemon and it really is or is not the problem?) > The fix is not to use the same domain name in Postfix and Google. > Using the same domain name just causes no end of pain when you > forward mail. Google's service is supposed to just be a filter for email sent to me; how can I have different domain names in them? Can I just lie to Postfix about what my domain is, but still have it deliver mail correctly? -- View this message in context: http://postfix.1071664.n5.nabble.com/What-is-causing-this-mail-forwarding-loop-bounce-tp62199p62354.html Sent from the Postfix Users mailing list archive at Nabble.com.