Re: MAIL FROM problem after upgrade
Noel Jones njo...@megan.vbhcs.org writes: It might be helpful if you shared the logs of mail entering postfix when you run your test command. As basic as possible: $ cat test.msg To: jo...@sppn.nl test message $ /usr/sbin/sendmail -v -t test.msg While figuring this out I ran severeal tests and it occurred to me that it was rather strange for sendmail to pass the message to postfix using SMTP. Further investigation revealed the real cause of my problems: for some reasons /usr/sbin/sendmail had not been replaced by its postfix variant. With the following (relevant) entries in main,cf: myorigin = $mydomain #masquerade_domains = $mydomain This is what happens when I pass the message to the sendmail variant: postfix/smtpd[1331]: connect from localhost.localdomain[127.0.0.1] postfix/smtpd[1331]: BC22AC53F7: client=localhost.localdomain[127.0.0.1] postfix/cleanup[1333]: BC22AC53F7: message-id=201007140925.o6e9povn001...@phoenix.squirrel.nl postfix/qmgr[4845]: BC22AC53F7: from=j...@phoenix.squirrel.nl, size=509, nrcpt=1 (queue active) sendmail[1329]: o6E9POvn001329: to=jo...@sppn.nl, ctladdr=jv (501/501), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30032, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as BC22AC53F7) postfix/smtpd[1331]: disconnect from localhost.localdomain[127.0.0.1] postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 220 smtp-vbr12.xs4all.nl ESMTP Sendmail 8.13.8/8.13.8; Wed, 14 Jul 2010 11:25:25 +0200 (CEST) postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: EHLO phoenix.squirrel.nl postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-smtp-vbr12.xs4all.nl Hello sioban.squirrel.nl [80.101.24.220], pleased to meet you postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-ENHANCEDSTATUSCODES postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-PIPELINING postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-8BITMIME postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-SIZE 31457280 postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-DSN postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-AUTH LOGIN PLAIN postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-STARTTLS postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-DELIVERBY postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250 HELP postfix/smtp[1334]: server features: 0x901f size 31457280 postfix/smtp[1334]: Using ESMTP PIPELINING, TCP send buffer size is 4096 postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: MAIL FROM:j...@phoenix.squirrel.nl SIZE=509 postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: RCPT TO:jo...@sppn.nl ORCPT=rfc822;jo...@sppn.nl postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: DATA postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250 2.1.0 j...@phoenix.squirrel.nl... Sender ok postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250 2.1.5 jo...@sppn.nl... Recipient ok postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 354 Enter mail, end with . on a line by itself postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: . postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: QUIT postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250 2.0.0 smtp-vbr12.xs4all.nl accepted message o6E9PPBt095223 postfix/smtp[1334]: BC22AC53F7: to=jo...@sppn.nl, relay=smtp.xs4all.nl[194.109.6.51]:25, delay=0.37, delays=0.1/0.02/0.11/0.14, dsn=2.0.0, status=sent (250 2.0.0 smtp-vbr12.xs4all.nl accepted message o6E9PPBt095223) This is the postfix variant: postfix/pickup[31556]: 94A56C53F6: uid=501 from=jv postfix/cleanup[1333]: 94A56C53F6: message-id=20100714092541.94a56c5...@phoenix.squirrel.nl postfix/qmgr[4845]: 94A56C53F6: from=j...@squirrel.nl, size=297, nrcpt=1 (queue active) postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 220 smtp-vbr2.xs4all.nl ESMTP Sendmail 8.13.8/8.13.8; Wed, 14 Jul 2010 11:25:41 +0200 (CEST) postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: EHLO phoenix.squirrel.nl postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-smtp-vbr2.xs4all.nl Hello sioban.squirrel.nl [80.101.24.220], pleased to meet you postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-ENHANCEDSTATUSCODES postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-PIPELINING postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-8BITMIME postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-SIZE 31457280 postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-DSN postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-AUTH LOGIN PLAIN postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-STARTTLS postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250-DELIVERBY postfix/smtp[1334]: smtp.xs4all.nl[194.109.6.51]:25: 250 HELP postfix/smtp[1334]: server features: 0x901f size 31457280 postfix/smtp[1334]: Using ESMTP PIPELINING, TCP send buffer size is 4096 postfix/smtp[1334]:
Re: MAIL FROM problem after upgrade
On 7/14/2010 5:01 AM, Johan Vromans wrote: Noel Jonesnjo...@megan.vbhcs.org writes: It might be helpful if you shared the logs of mail entering postfix when you run your test command. As basic as possible: $ cat test.msg To: jo...@sppn.nl test message $ /usr/sbin/sendmail -v -t test.msg While figuring this out I ran severeal tests and it occurred to me that it was rather strange for sendmail to pass the message to postfix using SMTP. Further investigation revealed the real cause of my problems: for some reasons /usr/sbin/sendmail had not been replaced by its postfix variant. With the following (relevant) entries in main,cf: myorigin = $mydomain #masquerade_domains = $mydomain This is what happens when I pass the message to the sendmail variant: postfix/smtpd[1331]: connect from localhost.localdomain[127.0.0.1] postfix/smtpd[1331]: BC22AC53F7: client=localhost.localdomain[127.0.0.1] postfix/cleanup[1333]: BC22AC53F7: message-id=201007140925.o6e9povn001...@phoenix.squirrel.nl postfix/qmgr[4845]: BC22AC53F7: from=j...@phoenix.squirrel.nl, size=509, nrcpt=1 (queue active) I suspected as much; sendmail has already added the offending hostname. Uninstalling sendmail will fix this and possibly other problems. You could fix this in postfix with the masquerade_domains parameter, but the proper fix is to remove sendmail. ... In the sendmail case postfix considers this a relay so it doesn't fiddle with the addresses. No, postfix doesn't fiddle with it because it already has a domain name. Postfix doesn't alter FQDN addresses unless you've specified some rewriting as detailed in http://www.postfix.org/ADDRESS_REWRITING_README.html -- Noel Jones
Re: MAIL FROM problem after upgrade
On Tue, Jul 13, 2010 at 09:36:48AM +0200, Johan Vromans wrote: Hi, I've been running postfix as my MTA for many years. Recently I upgraded my main server and now I cannot send mail anymore. The system is running Fedora 13, with postfix 2.7.0 (postfix-2.7.0-1.fc13.i686). My previous version of postfix was 2.5. I have a LAN with local DNS that is connected via ADSL to the internet. As far as the outside world concerns there's only a single host connected. The output of 'postconf -n' is attached at the end of this message. The problem: although I have configured mydomain = squirrel.nl myorigin = squirrel.nl MAIL FROM:j...@phoenix.squirrel.nl SIZE=694 Postfix only uses myorigin to qualify *bare* email addresses. If the application that submits the mail into Postfix (via SMTP or sendmail(1)) already specified a domain name, Postfix is not going to change that by default. http://www.postfix.org/ADDRESS_REWRITING_README.html http://www.postfix.org/postconf.5.html#myorigin http://www.postfix.org/postconf.5.html#canonical_maps http://www.postfix.org/postconf.5.html#smtp_generic_maps You can also use masquerade_domains, but my personal view is that this mechanism (like other wild-card rewrites) is a legacy that plays poorly with recipient validation, and is difficult to use correctly on an integrated gateway that handles mail to and from the Internet. -- Viktor.
Re: MAIL FROM problem after upgrade
On Tue, Jul 13, 2010 at 05:47:12PM +0200, Johan Vromans wrote: The question remains: was this a deliberate change in 2.6 or 2.7? I double checked and verified that postfix 2.5 generates the 'right' domain names in the MAIL FROM, even without masquerade_domains being set. Postfix address rewriting did not change between these releases. In fact, $myorigin processing has only changed once since 1.0, when local vs. remote rewriting contexts were introduced in Postfix 2.2 http://www.postfix.org/postconf.5.html#local_header_rewrite_clients You clearly also changed the application that injects email into Postfix. -- Viktor.
Re: MAIL FROM problem after upgrade
Victor Duchovni victor.ducho...@morganstanley.com writes: Postfix address rewriting did not change between these releases. That's what I thought, too. You clearly also changed the application that injects email into Postfix. Possibly, though unlikely. This is my favourite test command: date | mail -s xxx h...@somewhere.com and then watch the maillog for the SMTP chat. mail (/bin/mail) is part of the mailx package, version 12.4 in both the old and the new system. mail directly injects it into postfix using local SMTP. Anyway, my main problem is solved. Thanks again. -- Johan
Re: MAIL FROM problem after upgrade
Johan Vromans: double checked and verified that postfix 2.5 generates the 'right' domain names in the MAIL FROM, even without masquerade_domains being set. Again, Postfix does not change the MAIL FROM domain unless you configure it otherwise. Wietse
Re: MAIL FROM problem after upgrade
On 7/13/2010 11:13 AM, Johan Vromans wrote: Victor Duchovnivictor.ducho...@morganstanley.com writes: Postfix address rewriting did not change between these releases. That's what I thought, too. You clearly also changed the application that injects email into Postfix. Possibly, though unlikely. This is my favourite test command: date | mail -s xxx h...@somewhere.com and then watch the maillog for the SMTP chat. It might be helpful if you shared the logs of mail entering postfix when you run your test command. -- Noel Jones
Re: MAIL FROM problem after upgrade
Johan Vromans put forth on 7/13/2010 2:36 AM: The problem: although I have configured mydomain = squirrel.nl myorigin = squirrel.nl postfix stil uses the real, local hostname in the SMTP envelope: What do you want the SMTP host name to be? squirrel.nl ? johan.squirrel.nl ? /etc/postfix/main.cf myhostname = squirrel.nl or myhostname = johan.squirrel.nl Maybe I'm missing something, but AFAIK this should permanently fix your problem. Your scenario is exactly why the myhostname option exists: for when you desire an SMTP hostname different from the local machine hostname+domain. This is the correct way to fix your problem AFAIK. As to why the behavior changed with Fedora 13/Postfix 2.7 I don't know. You'll likely have to comb your Fedora and Postfix configs with fine teeth to find the answer. Or as Noel suggests, post logging of the transactions so we can see exactly what's happening. -- Stan