[SOLVED] Proxmox Setup for Gmail

G

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
 
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
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
After 9 years, your post saved me some har work ;)
 
So, when you do all there custom modifications to proxmox, how do you backup the proxmox system itself?
I see alot of confident replies that you just reinstall, as there are not many modifications that you should do to proxmox itself, but all these tweaks results in that you start creating scripts or notes, which are not optimal for perople that do not sit at their computer 24/7. You just want to backup the proxmox system to the backup server and then just restore it after a crash. Is that not possible?
 
So, when you do all there custom modifications to proxmox, how do you backup the proxmox system itself?
I see alot of confident replies that you just reinstall, as there are not many modifications that you should do to proxmox itself, but all these tweaks results in that you start creating scripts or notes, which are not optimal for perople that do not sit at their computer 24/7. You just want to backup the proxmox system to the backup server and then just restore it after a crash. Is that not possible?
I have backups of everything running on PVE in order to be able to restore those things quickly without too much troubles:
- PBS is running as LXC and is backed up directly by PVE on an NFS share
- all the other LXCs and VMs are backed up via PBS on a SATA disk

You could also backup the root partition of PVE by booting via some iso one every n days/weeks and then dumping partition via DD but I can’t do it and I prefer to have a nightly backup of /etc /opt and /root/scripts (where I have some stuff) on an external NFS share in order to have all the needed info in case of disaster recovery, where I would reinstall and reconfigure PVE. Furthermore I have documented the customization on a file.

Unfortunately there is no quick way I think to backup PVE itself, there’s no export/import config that can be used to reconfigure from scratch PVE.

Maybe there’s someone more expert that can have a better answer BTW
 
  • Like
Reactions: joggs and _gabriel

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 yours easily in our online shop.

Buy now!