Tag: Postfix

Postfix Gmail Bounce: This message does not have authentication information or fails to 550-5.7.26 pass authentication checks.

Gmail implements certain security measures to protect their users from spam, which may reject your PHP mails sent via postfix. In this article we will configure a domain SPF record so that Gmail knows to trust our server.

Introduction Some email service providers such as Gmail and Outlook implement security measures to combat spam. This means that if you try to send a PHP mail from your server using postfix, it will most likely be rejected by these email providers if your domain’s DNS isn’t configured correctly. If you want to set up…

Continue reading Postfix Gmail Bounce: This message does not have authentication information or fails to 550-5.7.26 pass authentication checks.

Free Email Forwarding Options with DigitalOcean?

It’s great moving away from shared hosting and migrating all your sites to a cloud hosting solution like DigitalOcean, but what to do about email hosting? Configuring Postfix/Dovecot can be a daunting task and also a complete nightmare to maintain. Recently I’ve started pointing my domains’ MX records to Mailgun and setting up routes and forwards to Gmail from…

Continue reading Free Email Forwarding Options with DigitalOcean?

How to configure Postfix to use an External SMTP Server

In this article we are going to configure Postfix to relay mail through an external SMTP server. This has its advantages if you are having spam issues sending mail directly from your server. Prerequisites You’ll need the address and port of your SMTP server, and the username and password of your email account. Your SMTP…

Continue reading How to configure Postfix to use an External SMTP Server

Can’t send mail to own domain. Postfix: status=bounced (unknown user: “user”)

Having problems sending email to your own domain? You may need to change your postfix configuration.

I was experiencing a problem sending mail to an address at my own domain. I wanted my PHP app to send notification emails to [email protected] but they kept bouncing with “status=bounced (unknown user: “user”)”. Accessing the log: sudo tail /var/log/mail.log -n 200 This will return the last 200 lines of the log. Log output: /var/log/mail.log…

Continue reading Can’t send mail to own domain. Postfix: status=bounced (unknown user: “user”)

How to configure Postfix to use Gmail SMTP on Ubuntu 18.04 / 19.10

In this article we are going to configure Postfix to relay mail through Gmail’s SMTP server on Ubuntu 18.04 / 19.10. If you want to use a SMTP server other than Gmail, please see How to configure Postfix to use an External SMTP Server. Prerequisites If your Gmail account uses 2-Step Verification, you must create…

Continue reading How to configure Postfix to use Gmail SMTP on Ubuntu 18.04 / 19.10

How to get PHP mail() working on Ubuntu 18.04 & 16.04

In this article we are going to install and configure Postfix to allow our applications to use the PHP mail() function. Tested and working on Ubuntu 18.04 & 16.04.

  1. Install Postfix Let’s update the package database first. sudo apt-get update Install mailutils, which will automatically install Postfix. sudo apt install -y mailutils On the first Postfix configuration screen, select OK by pressing TAB and ENTER Select Internet Site and press ENTER. System mail name should be your domain name eg. example.com, press…

Continue reading How to get PHP mail() working on Ubuntu 18.04 & 16.04