📜 ⬆️ ⬇️

Raise the mail server to send mail using Gmail

In order not to load your hardware with a full-fledged mail server, you can use Gmail.

The manual concerns only exim4 (it is possible and suitable for previous versions).

You need to edit the configuration files /etc/exim4/update-exim4.conf and /etc/exim4/passwd.client

/etc/exim4/update-exim4.conf:
dc_eximconfig_configtype = 'smarthost'
dc_other_hostnames = ''
dc_local_interfaces = '127.0.0.1'
dc_readhost = 'localhost'
dc_relay_domains = ''
dc_minimaldns = 'false'
dc_relay_nets = ''
dc_smarthost = 'smtp.gmail.com'
CFILEMODE = '644'
dc_use_split_config = 'false'
dc_hide_mailname = 'true'
dc_mailname_in_oh = 'true'
dc_localdelivery = 'mail_spool'

')
/etc/exim4/passwd.client:
gmail-smtp.l.google.com:user@example.com:pass
* .google.com: user@example.com: pass
smtp.gmail.com:user@example.com:pass


Run the update-exim4.conf command to update the settings, and restart Exim.
Now all mail sent from the current machine using sendmail will be redirected to Google's SMTP server.

Source: https://habr.com/ru/post/56354/


All Articles