Add basic docs for Postfix w/ Gmail relay
This commit is contained in:
parent
82c2f5a065
commit
32fa8dc6fe
|
@ -1,5 +1,43 @@
|
|||
|
||||
.. highlight:: sh
|
||||
|
||||
Postfix Setup
|
||||
=============
|
||||
|
||||
TODO
|
||||
The typical scenario for a Rattail server is that it runs Linux and
|
||||
Postfix for the mail service. Here we describe that typical setup.
|
||||
|
||||
|
||||
Basics
|
||||
------
|
||||
|
||||
If you don't already have Postfix installed, do that first::
|
||||
|
||||
sudo apt install postfix
|
||||
|
||||
It's normally a good idea to declare your domain and hostname.
|
||||
Assuming your server is ``myserver.example.com`` then::
|
||||
|
||||
sudo postconf -e 'myhostname=myserver.example.com'
|
||||
sudo postconf -e 'myorigin=example.com'
|
||||
sudo systemctl restart postfix
|
||||
|
||||
|
||||
Gmail Relay
|
||||
-----------
|
||||
|
||||
Make sure Postfix knows to send all mail through Gmail relay::
|
||||
|
||||
sudo postconf -e 'relayhost=smtp-relay.gmail.com:25'
|
||||
sudo systemctl restart postfix
|
||||
|
||||
This however assumes the Gmail relay is also configured to allow mail
|
||||
from your server. The most straightforward way to do this is
|
||||
via IP address authentication.
|
||||
|
||||
See `Google Help`_ for more info, but the gist is that you should
|
||||
choose "Only accept mail from the specified IP addresses" for the
|
||||
relay authentication within Google Admin settings. And then specify
|
||||
the public-facing IP address for your server.
|
||||
|
||||
.. _Google Help: https://support.google.com/a/answer/2956491?hl=en
|
||||
|
|
Loading…
Reference in a new issue