Skip to main content

msmtp and Google's SMTP Relay Service

• Tagged Server-side, Guide, and Debugging

If you’re using msmtp to send email through Google’s SMTP Relay Service, you might get this error: “the server sent an empty reply”.

To fix, try setting a domain in your /etc/msmtprc file. For example, if you’ve configured SMTP Relay to allow email from your server’s IP with TLS and no authentication, and your Google Workspace domain is awmb.uk, your /etc/msmtp file might look like:

defaults
auth        off
tls         on
logfile     /var/log/msmtp
domain      awmb.uk
from        [email protected]

account     default
host        smtp-relay.gmail.com
port        587

Next post: SSH as one user, get a terminal as another

Previous post: Recursively set all file and folder permissions