What is the best way to send emails from linux system?

Posted by merpkz@reddit | linuxadmin | View on Reddit | 24 comments

I have configured my homelab internal network with a centralized email server running postfix / dovecot / snappymail combination with virtual mailboxes taken from postgres DB. What I want to achieve is that all other linux servers on my network relays their local destined mails to this centralized box, so that I can read in web interface in the morning that there have been sudoers reported incidents somewhere or some weird cronjob output something on other system. As I understand all I need to do is install MTA, like postfix or sendmail or maybe exim? and create local aliases on that system that emails for root@localhost are actually sent to $me@$internal.domain on my centralized email server. Is it possible to achieve this without installing MTA on every single linux system and just configure them to relay directly to centralized server?