Nicolas Kovacs
2018-Jun-25 08:39 UTC
[CentOS] Postfix, system notifications and local servers
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 at 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 at 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 at microlinux.fr T?l. : 04 66 63 10 32
Tony Mountifield
2018-Jun-25 09:29 UTC
[CentOS] Postfix, system notifications and local servers
In article <7919547a-2a23-901f-607e-5aef7300f52a at microlinux.fr>, Nicolas Kovacs <info at microlinux.fr> wrote:> 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 at 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 at microlinux.fr, even if 'hostname --fqdn' returns a "dummy" hostname?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 -- Tony Mountifield Work: tony at softins.co.uk - http://www.softins.co.uk Play: tony at mountifield.org - http://tony.mountifield.org
Gordon Messmer
2018-Jun-28 00:28 UTC
[CentOS] Postfix, system notifications and local servers
On 06/25/2018 01:39 AM, Nicolas Kovacs wrote:> 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 at microlinux.fr, even if 'hostname --fqdn' returns a "dummy" hostname?http://www.postfix.org/BASIC_CONFIGURATION_README.html#myorigin