[Bug 1549388] Re: In some rare cases Postfix connect to a wrong MX server
http://linorg.usp.br/postfix/release/official/postfix-2.11-patch01.gz is the upstream patch for 2.11.1, and this appears to be the chunk for the fix: --- a/postfix/src/smtp/smtp.h +++ b/postfix/src/smtp/smtp.h @@ -195,7 +195,7 @@ typedef struct SMTP_STATE { STR((state)->iterator->request_nexthop)[0] = 0; \ } -#define HAVE_NEXTHOP_STATE(state) (STR((state)->iterator->request_nexthop) != 0) +#define HAVE_NEXTHOP_STATE(state) (STR((state)->iterator->request_nexthop)[0] != 0) /* diff --git a/postfix/src/smtp/smtp_connect.c b/postfix/src/smtp/smtp_connect.c index ff278c1f..2e7fc87c 100644 --- a/postfix/src/smtp/smtp_connect.c +++ b/postfix/src/smtp/smtp_connect.c @@ -666,6 +666,7 @@ static int smtp_reuse_session(SMTP_STATE *state, DNS_RR **addr_list, #endif SMTP_ITER_SAVE_DEST(state->iterator); if (*addr_list && SMTP_RCPT_LEFT(state) > 0 + && HAVE_NEXTHOP_STATE(state) && (session = smtp_reuse_nexthop(state, SMTP_KEY_MASK_SCACHE_DEST_LABEL)) != 0) { session_count = 1; smtp_update_addr_list(addr_list, STR(iter->addr), session_count); Completely untested. It's probably better to go with 2.11.1 directly, or even the last 2.11.x on the series. -- You received this bug notification because you are a member of Ubuntu Server, which is subscribed to the bug report. https://bugs.launchpad.net/bugs/1549388 Title: In some rare cases Postfix connect to a wrong MX server To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1549388/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
Re: [Bug 1549388] Re: In some rare cases Postfix connect to a wrong MX server
On Friday, March 11, 2016 06:24:52 PM you wrote: > Thanks Msd and Scott for helping with this. > > I presume this is fixed in Xenial, so have marked the bug as Fix > Released but created a task to track this for 14.04. That's correct. Trusty is the only release affected. Scott K -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to the bug report. https://bugs.launchpad.net/bugs/1549388 Title: In some rare cases Postfix connect to a wrong MX server To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1549388/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1549388] Re: In some rare cases Postfix connect to a wrong MX server
Thanks Msd and Scott for helping with this. I presume this is fixed in Xenial, so have marked the bug as Fix Released but created a task to track this for 14.04. ** Also affects: postfix (Ubuntu Trusty) Importance: Undecided Status: New ** Changed in: postfix (Ubuntu Trusty) Status: New => Triaged ** Changed in: postfix (Ubuntu Trusty) Importance: Undecided => High ** Changed in: postfix (Ubuntu) Status: Incomplete => Fix Released -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to postfix in Ubuntu. https://bugs.launchpad.net/bugs/1549388 Title: In some rare cases Postfix connect to a wrong MX server To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1549388/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1549388] Re: In some rare cases Postfix connect to a wrong MX server
Hi, I have contacted the postfix-users mailing list. This is a known and corrected bug as you can see here : http://article.gmane.org/gmane.mail.postfix.user/254717 http://www.postfix.org/announcements/postfix-2.11.1.html But it seems it isn't the case on Ubuntu 14.04 LTS. Can it be corrected ? Thank you for your help ! -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to postfix in Ubuntu. https://bugs.launchpad.net/bugs/1549388 Title: In some rare cases Postfix connect to a wrong MX server To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1549388/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
Re: [Bug 1549388] Re: In some rare cases Postfix connect to a wrong MX server
I would recommend that you write to the postfix-users mailing list about this as I suspect upstream knowledge will be needed to sort it. When you subscribe you will get a welcome message that, among other things, gives you specifics about what information to provide. Read it carefully and provide the information to the list. Don't assume they'll come here and read the bug. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to postfix in Ubuntu. https://bugs.launchpad.net/bugs/1549388 Title: In some rare cases Postfix connect to a wrong MX server To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1549388/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1549388] Re: In some rare cases Postfix connect to a wrong MX server
Hi, Thank you for your help. I have some news about this bug. I changed the Postfix config to activate debug log. And I have caught some errors "wrong MX error". Complete debug logs are attached. Here an example with all debug logs. We can see just after a Gmail transaction, the Postfix process tries to deliver a mail for yyyacrennesuser...@ac-rennes.fr. And the DNS reply give the good MX answer : Mar 1 09:35:50 ns302430 postfix/smtp[1581]: begin ac-rennes.fr address list Mar 1 09:35:50 ns302430 postfix/smtp[1581]: pref 20 host mxsrv2.ac-rennes.fr/195.221.67.38 Mar 1 09:35:50 ns302430 postfix/smtp[1581]: pref 20 host mxsrv1.ac-rennes.fr/195.221.67.29 Mar 1 09:35:50 ns302430 postfix/smtp[1581]: end ac-rennes.fr address list But, we can see just after that scache give a Gmail connexion !!! Mar 1 09:35:50 ns302430 postfix/smtp[1581]: private/scache: wanted attribute: property Mar 1 09:35:50 ns302430 postfix/smtp[1581]: input attribute name: property Mar 1 09:35:50 ns302430 postfix/smtp[1581]: input attribute value: gmail.com?gmail-smtp-in.l.google.com?64.233.167.27?4096 Mar 1 09:35:50 ns302430 postfix/smtp[1581]: scache_clnt_find_dest: dest=smtp?*? dest_prop=gmail.com?gmail-smtp-in.l.google.com?64.233.167.27?4096 endp_prop=0?31?1456821449 fd=16 Mar 1 09:35:50 ns302430 postfix/smtp[1581]: smtp_session_activate: dest=gmail.com host=gmail-smtp-in.l.google.com addr=64.233.167.27 port=25 features=0x101f, ttl=99, reuse=1 And the process try to deliver the mail to a wrong MX server... Mar 1 09:35:50 ns302430 postfix/smtp[1581]: > gmail-smtp-in.l.google.com[64.233.167.27]:25: RSET Mar 1 09:35:50 ns302430 postfix/smtp[1581]: > gmail-smtp-in.l.google.com[64.233.167.27]:25: MAIL FROM:SIZE=27032 Mar 1 09:35:50 ns302430 postfix/smtp[1581]: 0D5F218551A: to= , relay=gmail-smtp- in.l.google.com[64.233.167.27]:25, conn_use=2, delay=582, delays=0.11/581/0.01/0.09, dsn=5.1.1, status=bounced (host gmail-smtp- in.l.google.com[64.233.167.27] said: 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1 https://support.google.com/mail/answer/6596 x64si24468451wmx.5 - gsmtp (in reply to RCPT TO command)) Note : 1. This bug is rare : most of the time Postfix deliver emails correctly 2. Each time the bug occurs, it's when before there were a TLS error with Gmail and the connection is "scached" (private/scache) / reuse=1 / conn_use=2 3. I have all the debug logs you want and other examples of this bug for yesterday Can this help ? ** Attachment added: "debug_log.txt" https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1549388/+attachment/4585498/+files/debug_log.txt -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to postfix in Ubuntu. https://bugs.launchpad.net/bugs/1549388 Title: In some rare cases Postfix connect to a wrong MX server To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1549388/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
Re: [Bug 1549388] Re: In some rare cases Postfix connect to a wrong MX server
I'm not sure what to tell you then as based on the original information in the bug, postfix thinks it is supposed to relay that domain. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to postfix in Ubuntu. https://bugs.launchpad.net/bugs/1549388 Title: In some rare cases Postfix connect to a wrong MX server To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1549388/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1549388] Re: In some rare cases Postfix connect to a wrong MX server
Hi, I dont' have any relay map file. Here is my postfix directory. # tree /etc/postfix/ /etc/postfix/ |-- db | |-- block_recipient | `-- block_recipient.db |-- dynamicmaps.cf |-- main.cf |-- main.cf.20151023.120708.bak |-- master.cf |-- master.cf.20151023.120708.bak |-- post-install |-- postfix-files |-- postfix-script |-- sasl | `-- smtpd.conf |-- ssl | |-- cacert.pem | |-- cakey.pem | |-- smtpd.crt | `-- smtpd.key |-- transport |-- transport.db |-- virtual |-- virtual-regexp |-- virtual-regexp.db `-- virtual.db # cat /etc/postfix/db/block_recipient XXX@domain1 REJECT YYY@domain2 REJECT ... About /etc/postfix/virtual and /etc/postfix/virtual-regexp : no rule in @yahoo, no rule in @gmail, no rule with "generic" (hotmail, aol, ...) domains. About /etc/postfix/db/block_recipient : Only emails or domains with REJECT Thanks ! -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to postfix in Ubuntu. https://bugs.launchpad.net/bugs/1549388 Title: In some rare cases Postfix connect to a wrong MX server To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1549388/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
Re: [Bug 1549388] Re: In some rare cases Postfix connect to a wrong MX server
On Thursday, February 25, 2016 08:55:40 AM you wrote: > Hi, > > Here is the output of "postconf -n | grep relay" : > > relayhost = > > Thank you for your help ! Do you have any relay map files in /etc/postfix/? If you don't know, please provide a list of the files present in that directory. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to postfix in Ubuntu. https://bugs.launchpad.net/bugs/1549388 Title: In some rare cases Postfix connect to a wrong MX server To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1549388/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1549388] Re: In some rare cases Postfix connect to a wrong MX server
Hi, Here is the output of "postconf -n | grep relay" : relayhost = Thank you for your help ! -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to postfix in Ubuntu. https://bugs.launchpad.net/bugs/1549388 Title: In some rare cases Postfix connect to a wrong MX server To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1549388/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1549388] Re: In some rare cases Postfix connect to a wrong MX server
** Changed in: postfix (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to postfix in Ubuntu. https://bugs.launchpad.net/bugs/1549388 Title: In some rare cases Postfix connect to a wrong MX server To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1549388/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs