Tuesday, January 7, 2014

Adding a SMTP Server Host in Proxmox VE

Purpose:

With the basic installation of Proxmox VE the smtp server is not configured.
When making backups for example no log will be send.

By configuring the smtp server in Proxmox VE, mail will be send.




Used Software:

Proxmox VE 3.1


Installation:


Open Proxmox VE shell.

type : nano /etc/postfix/main.cf

Add after relayhost the smtp server of your liking.

For example:

relayhost = smtp.example.com (using ip address of smtp server is always better)

Press CTRL+X to Exit
Then press Y to save
The press ENTER.


When you don't have a dns server running which can resolve your smtp server then you have to edit the hosts file. 
Add your smtp server name and IP address to it:


type :  nano /etc/hosts

Now you see some IPv4 address and IPv6 addresses, something looking like this:

127.0.0.1  localhost.localdomain localhost
10.0.0.10  proxmox.company.local pvelocalhost

# The following lines are desirable for IPv6 capable hosts

::1           ip6-localhost ip6-loopback
fe00::0     ip6-localnet
and some more lines .....

When you add your smtp server it should look like:


127.0.0.1  localhost.localdomain localhost
10.0.0.10  proxmox.company.local pvelocalhost
10.0.0.5    smtp.example.com

# The following lines are desirable for IPv6 capable hosts

::1           ip6-localhost ip6-loopback
fe00::0     ip6-localnet
and some more lines .....


Press CTRL+X to Exit
Then press Y to save
The press ENTER.

Now backup logs will be send to your e-mail address which you used during installation.

Thanks goes to Computer Dude Sven for the tip!












2 comments:

Computer Dude Sven said...

Be sure to also add the mailhost -->/etc/hosts example: if your relay server is 192.168.0.1 add the following line: 192.168.0.1 mailhost

V.Kamphuis said...

Thanks for the tip!