0

I installed Postfix on Ubuntu 18.04 lts and try to send mail with the PHP mail function. What I get in the mail.log follows. Can anyone see a problem in the log output?

Jan 27 16:27:23 dv7 postfix/pickup[16608]: 42333FA29A3: uid=33 from=<www-data>
Jan 27 16:27:23 dv7 postfix/cleanup[16653]: 42333FA29A3: message-id=<20200127232723.42333FA29A3@dv7>
Jan 27 16:27:23 dv7 postfix/qmgr[16187]: 42333FA29A3: from=<www-data@dv7.com>, size=476, nrcpt=1 (queue active)
Jan 27 16:27:54 dv7 postfix/smtp[16655]: connect to mx5.mail.icloud.com[17.172.34.69]:25: Connection timed out
Jan 27 16:28:24 dv7 postfix/smtp[16655]: connect to mx1.mail.icloud.com[17.172.34.9]:25: Connection timed out
Jan 27 16:28:54 dv7 postfix/smtp[16655]: connect to mx6.mail.icloud.com[17.172.34.70]:25: Connection timed out
AnFi
  • 902
  • @K7AAY i already did that ;) – Thomas Ward Jan 28 '20 at 00:01
  • Are you on a residential connection and trying to use that to send mail? Most Residential ISPs block outgoing SMTP server traffic or most other receiving servers blacklist connections from residential IPs. – Thomas Ward Jan 28 '20 at 00:02
  • I thought ISPs only block port 25 not all SMTP. – E. Porter Jan 28 '20 at 00:27
  • 1
    Well, your mail server is trying to communicate outbound on port 25 to another SMTP server, that's on port 25, so... ;) – Thomas Ward Jan 28 '20 at 00:28
  • Could you tell that from the mail.log ? – E. Porter Jan 28 '20 at 00:45
  • OH, the port is right after ip address in the mail.log listing. isn't it? – E. Porter Jan 28 '20 at 00:48
  • Yep, that's where it's connecting to. hostname[ipaddress]:port is how those messages are structured to say for the timeouts. – Thomas Ward Jan 28 '20 at 01:00
  • Thanks. I'll have to look into changing the smtp port, probably to 587. – E. Porter Jan 28 '20 at 02:06
  • Yeah, that will break email delivery to other mail servers. That is by spec supposed to be over port 25 when delivering to other domains' mail servers (and mail servers talking to other mail servers) – Thomas Ward Jan 28 '20 at 02:07
  • Then, if the ISP blocks 25 but it is needed to to deliver to other servers how does Postfix work to send mail that goes through the ISP? – E. Porter Jan 28 '20 at 02:24
  • It is entirely dependent on the ISP. But if you're on a residential ISP most servers won't even accept messages form you (blacklists) – Thomas Ward Jan 28 '20 at 02:29
  • chances are your ISP if they let you send email out it has to be sent via their SMTP servers. if they dont provide details on configuring that you need a VPS or server in the cloud configured to let your postfix send to it on a different port and then relay your message fro. there. However that's got it's own headaches. – Thomas Ward Jan 28 '20 at 05:53

0 Answers0