[SOLVED] Proxmox Setup for Gmail

geoffsim

Guest
Install the authentication library:
Code:
[COLOR=#000000]apt-get install libsasl2-modules[/COLOR]

Create a password file:

Code:
[COLOR=#000000]vi /etc/postfix/sasl_passwd[/COLOR]
Insert your login details, ex:
Code:
smtp.gmail.com    [EMAIL="yourname@gmail.com"]yourname@gmail.com[/EMAIL]:yourpassword

Create a db of the password file:
Code:
postmap hash:/etc/postfix/sasl_passwd
Protect the text password file (you can delete it if you want):
Code:
chmod 600 /etc/postfix/sasl_passwd

Edit the config file:
Code:
vi /etc/postfix/main.cf
Add/change the following (the certificate works for me, examine the /etc/ssl/certs for others):

Code:
[COLOR=#000000]
relayhost = [smtp.gmail.com]:587[/COLOR]
[COLOR=#000000]smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options =
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/ssl/certs/Equifax_Secure_CA.pem
smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_tls_session_cache
smtp_tls_session_cache_timeout = 3600s
[/COLOR]

Reload the config:
Code:
[COLOR=#000000]postfix reload[/COLOR]

Test:
Code:
echo "testing" | mail -s "test message" name@whereever

QED
 
  • Like
Reactions: BruceX and am0s.x

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!