Configuring an Exim mail server to send email messages
This section describes the process of configuring the basic settings of Exim Mail Transfer Agent (MTA) version 4. You can use this mail server on a Server machine with Astra Linux Special Edition installed to send email messages through the email connector and to send reports by email.
To configure the mail server and enable the Exim service to start automatically:
Open the operating system console.
Install the exim4 package. To do so, enter the following command:
sudo apt install exim4
Open the Exim configuration window. To do so, enter the following command:
sudo dpkg-reconfigure exim4-config
On the mail configuration menu, select send mail via smarthost; receive via SMTP or fetchmail.
At the next step, specify the sender name in System mail name field: for example, "serverkics".
At the next step, keep the default "127.0.0.1" value in IP-addresses to listen on for incoming SMTP connections.
At the next step, keep the default value in Other destinations to accept mail for.
At the next step, leave Machines to relay mail for blank.
At the next step, specify the IP address or network name of the SMTP server on your corporate network: for example, "mail.example.com".
At the next step, you can enable rewriting of outgoing mail headers if needed.
At the next step, in Keep number of DNS-queries minimal (Dial-on-Demand), select No.
At the next step, on the menu for selecting a local mail delivery method, select mbox format in /var/mail/.
In the final step, decline to split the configuration into separate files (place the configuration settings into a single file).
After closing the configuration window, open the exim4.conf.template file. To do so, enter the following command:
sudo mcedit /etc/exim4/exim4.conf.template
Scroll to the bottom of the remote_smtp or remote_smtp_smarthost settings section, and add the following line:
message_linelength_limit = 10000000
Save and close the template file.
Activate the Exim service, and set it to start automatically. To do so, enter the following commands:
sudo systemctl enable exim4.service
sudo systemctl start exim4.service
Grant the required permissions to access /var/mail/. To do so, enter the following command: