Hello,
This is how I have configured PandoraFMS to work with gmail (on Ubuntu):
Modify Pandora config file.
You can do this by executing the command:
sudo nano /etc/pandora/pandora_server.conf
Setup the mail settings:
Because we have installed a local SMTP server, we only need to set up the connection to this mail server:
# mta_address: External Mailer (MTA) IP Address to be used by Pandora FMS internal email capabilities
mta_address localhost
# mta_port: MTA port (default 25)
#mta_port
# mta_user MTA User (if needed for auth, FQD or simple user, depending on your server)
#mta_user
# mta_pass MTA Pass (if needed for auth)
#mta_pass
# mta_auth MTA Auth system (if needed, support: LOGIN, PLAIN, CRAM-MD5, DIGEST-MD)
#mta_auth
# mta_from Email address that sends the mail, by default is pandora@localhost
# probably you need to change it to avoid problems with your antispam
mta_from Network Monitor Administrator <
noreply@xxx.xxx>
Configure local mailserver EXIM4
http://wiki.debian.org/GmailAndExim4Apply a filter, so the mails come from
noreply@xxx.xxxCreate a file by executing the command:
sudo nano /etc/exim4/filter_reply_to
with the following content:
# Exim filter
# Rewrite my reply to for any mail sent to
xxx.xxx@gmail.comif
$header_from: contains "Network Monitor Administrator"
then
headers remove "Reply-To"
headers add "Reply-To:
noreply@xxx.xxx"
headers add "From:
noreply@xxx.xxx"
endif
# Forward any mail sent to root
if
$header_to: contains "root"
then
headers remove "Reply-To"
headers add "Reply-To:
noreply@xxx.xxx"
headers remove "To"
headers add "To:
xxx@xxx.com"
deliver "
yourmailadress@xxx.com"
endif
Adjust also the exim4 config file:
sudo nano /etc/exim4/exim4.conf.template
Add here the line
system_filter = /etc/exim4/filter_reply_to
And restart now the mail service:
sudo service exim4 restart
If you have problems with sending mails, you can check the logs:
sudo tail /var/log/mail.log
Greetings,
Geert