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

 

  1. Click Configuration->Listeners.
  2. Select SMTP Listener in the drop down and then click the New Listener button.
  3. Check "Listen for incoming SMTP/Exchange requests"
  4. Leave the SMTP port as 8091
  5. 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.

 
  1. 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/%

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'.

  1. 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

 

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.
 
  1. Run:

    sudo update-exim4.conf.template -r 
  2. 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]
© 2005 - 2024 ProProfs

Found this information useful? Visit mailarchiva.com to learn more about MailArchiva.

-