Exim
Exim is a message transfer agent (MTA) developed at the University of Cambridge for use on Unix systems connected to the Internet. The below instructions outline how to configure Exim such that it will forward mail traffic to MailArchiva for archival.
MailArchiva Configuration
- Click Configuration->Listeners.
- Select SMTP Listener in the drop down and then click the New Listener button.
- Check "Listen for incoming SMTP/Exchange requests"
- Leave the SMTP port as 8091
- Click Save
To test whether MailArchiva's smtp server is actually listening on port 8091, drop to the command prompt and telnet to port 8091.
Exim Configuration
The below steps apply to Exim using a split configuration.
- Create a new router file /etc/exim4/conf.d/router/150_exim4-config_mailarchiva_route
# router/150_exim4-config_mailarchiva_route
#################################
# route to mailarchiva archiving service
mailarchiva_route:
debug_print = "R: mailarchiva_route for $domain"
driver = manualroute
transport = remote_smtp_mailarchiva
route_list = * localhost
self = send
unseen
no_verify/%
#################################
# route to mailarchiva archiving service
mailarchiva_route:
debug_print = "R: mailarchiva_route for $domain"
driver = manualroute
transport = remote_smtp_mailarchiva
route_list = * localhost
self = send
unseen
no_verify/%
Above steps assume MailArchiva is run on the same server as Exim.
To change the server, change the 'route_list = * localhost' to 'route_list = * YOUR.SERVER.NAME'. Also remove 'self = send' and 'allow_localhost'.
To change the server, change the 'route_list = * localhost' to 'route_list = * YOUR.SERVER.NAME'. Also remove 'self = send' and 'allow_localhost'.
- Create the new transport: /etc/exim4/conf.d/transport/30_exim4-config_remote_smtp_mailarchiva
### transport/30_exim4-config_remote_smtp_mailarchiva
#################################
# Change port number for mailarchiva (should be called
# from mailarchiva_route
remote_smtp_mailarchiva:
debug_print = "T: remote_smtp_mailarchiva for $local_part@$domain"
driver = smtp
port = 8091
allow_localhost
#################################
# Change port number for mailarchiva (should be called
# from mailarchiva_route
remote_smtp_mailarchiva:
debug_print = "T: remote_smtp_mailarchiva for $local_part@$domain"
driver = smtp
port = 8091
allow_localhost
Above assumes MailArchiva is using the default SMTP port of 8091. If MailArchiva's SMTP server is listening on a different port, change 'port = 8091' to match the correct port.
-
Run:
sudo update-exim4.conf.template -r -
Restart exim
sudo /etc/init.d/exim4 restart
Test
Type the following to test:
exim4 -bt local@email.address
The following output should be received if the test is successful:
R: mailarchiva_route for mailarchiva.localdomain
R: lowuid_aliases for user@mailarchiva.localdomain (UID 1000)
R: system_aliases for user@mailarchiva.localdomain
R: userforward for user@mailarchiva.localdomain
R: procmail for user@mailarchiva.localdomain
R: maildrop for user@mailarchiva.localdomain
R: local_user for user@mailarchiva.localdomain
user@mailarchiva.localdomain
<-- user@mailarchiva.localdomain
router = local_user, transport = mail_spool
user@mailarchiva.localdomain
<-- user@mailarchiva.localdomain
router = mailarchiva_route, transport = remote_smtp_mailarchiva
host localhost [127.0.0.1]
R: lowuid_aliases for user@mailarchiva.localdomain (UID 1000)
R: system_aliases for user@mailarchiva.localdomain
R: userforward for user@mailarchiva.localdomain
R: procmail for user@mailarchiva.localdomain
R: maildrop for user@mailarchiva.localdomain
R: local_user for user@mailarchiva.localdomain
user@mailarchiva.localdomain
<-- user@mailarchiva.localdomain
router = local_user, transport = mail_spool
user@mailarchiva.localdomain
<-- user@mailarchiva.localdomain
router = mailarchiva_route, transport = remote_smtp_mailarchiva
host localhost [127.0.0.1]
© 2005 - 2024 ProProfs
Found this information useful? Visit mailarchiva.com to learn more about MailArchiva.