Question

post fix problem (emails doesn't send or receive)

a message “smtp error connection to server failed” appears when trying to send a message this happened after updating postfix


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
June 5, 2023

Hey @0906610ad3fd40e0b542554a891be3,

What do you see in the logs? The first place you should look at when facing this problem is the Postfix log, which usually can be found in /var/log/maillog, /var/log/mail.log, or /var/log/syslog, depending on your system. Tail the log using tail -f /path/to/log and try sending an email again. See if there’s any useful information in the log output.

Additionally, what SMTP port are you using, is it 25? It’s possible the port is blocked and I would advice using either 587 or 465 depending on your preference.

Anothter thing to check would be your postfix configuration after the update. Look into the Postfix main configuration file /etc/postfix/main.cf. Ensure the smtpd parameters are correctly configured. inet_interfaces = all should allow Postfix to listen on all network interfaces.

Use the mailq command or postqueue -p to view the mail queue. If there are many undelivered mails, it could indicate a problem.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel