Servers are made to send email notifications to administrators, and you need to receive them. Don’t believe me?
- Linux sends emails to root when a crontab has an output.
- Linux notifies you updates (apticron)
- SQL Server reports error and job status
- Your DRAC or other management system is dying to talk to you about it’s hardware problems
- A bunch or your apps is eager to send you reports
The problem is that all products are different and it’s very time consuming to make a proper configuration on each system.
Even worst, doing so makes changing any parameter a big task, imagine the email password of the dedicated email expiring…
Let’s makes things easier for you, you deserve it
Let’s fix this once and for all because, let’s face it, you have a lot more to do.
Let’s setup an Exim4 relay to ease the configuration of all your systems.
In which cases it’s a good idea:
- Your servers are in a private network
- You have a management network
In which cases it’s NOT a good idea:
- Your servers are out in the open
Why? Well, we are setting up a relay and for compatibility and simplicity there is no encryption (Yes, some applications won’t support sending emails over SSL!). Is it that bad? Not really as long it’s an isolated network you trust!
The biggest risk would be if you were sending critical information such as password using that relay. I consider an application like that should have a dedicated email account/configuration so I’m not too worried about that.
But that’s not all, if your SMTP relay is out in the internet, it will be pray to spammers unless very strictly protected by a firewall.
I recommend you get a dedicated system for this task. The reason is that you don’t want to have it to go down because some app needed a server restart.
The amount of processing power required is really low, even a RaspberryPi is up to the task!
apt-get install exim4
Considering a relay for the corporate email domain my-domain.com, SMTP address smtp.my-domain.com and with a local domain (AD?) of my-domain.local:
Here you want to make sure you are using SSL!
Edit such as:
- smtp.my-domain.com is the address of the smtp server
- [email protected] is the email account used to send the emails
- my_password is the email account password
Now a reload of the configuration is required:
The configuration with sendmail:
sendmail -v email@example.com