Postfix, System Notifications And Local Servers

Home » CentOS » Postfix, System Notifications And Local Servers
CentOS 2 Comments

Hi,

I have CentOS 7 running on half a dozen public servers. For some stuff like automatic updates using yum-cron, I have Postfix installed with a relatively basic configuration. This allows me to send important notifications to my mail address info@microlinux.fr. When there’s a batch of updates, I get one mail per machine, so I can check quickly if everything went OK without having to connect to the server.

Now I’d also like to use this setup on machines that aren’t in a datacenter and facing the Internet. For example, servers that have
“dummy” hostnames like nestor.microlinux.lan or sauvegarde.scholae.lan. Is there a way I can setup Postfix so this machine can send an e-mail to info@microlinux.fr, even if ‘hostname –fqdn’ returns a “dummy” hostname?

Cheers,

Niki

Microlinux – Solutions informatiques durables
7, place de l’église – 30730 Montpezat Site : https://www.microlinux.fr Blog : https://blog.microlinux.fr Mail : info@microlinux.fr Tél. : 04 66 63 10 32

2 thoughts on - Postfix, System Notifications And Local Servers

  • In article <7919547a-2a23-901f-607e-5aef7300f52a@microlinux.fr>, Nicolas Kovacs wrote:

    When you say “[not] facing the Internet”, do those machines actually have access to any other machines that ARE facing the internet? If not, then you have to think “what possible route could an email take from the machine to the email server for microlinux.fr?”

    If they do have access to an internet-connected machine, then you could set up postfix on the source machines to relay all emails via a suitable SMTP mail relay. You do this by setting the “relayhost” option in the config file /etc/postfix/main.cf. There are plenty of examples available via Google.

    You also need to think “What happens if an email from nestor.microlinux.lan bounces for some reason? Where would the bounce go? If the sender address is indeed in the .lan domain, the bounce would be undeliverable, so you might want to investigate sender address masquerading.

    Cheers Tony