If Exim is not currently installed, download and uncompress the tar
file. Make sure to edit the Local/Makefile and declare your Spool directory
and all your needed options.
Open the /usr/exim/configure file.
If the main configuration section:
Change the variable declarations to match your system as described
on the file. Make sure that you add your domains to /etc/localdomains
At the bottom of the main configuration section, add the following.
# Change your webserver username
trusted_users = nobody
ATMAIL_HOME = /usr/local/atmail/
ATMAIL_SAVEEMAIL = /www/atmail3/saveemail.pl
ATMAIL_UID = nobody
ATMAIL_GID = nobody
# Optional - If using the SQL database backend for @Mail. Your
Exim binary must be
# compiled with mySQL support ( libmysqlclient )
hide mysql_servers = localhost/databaesname/username/password
The above line is only required if you are using the SQL version of
@Mail. Exim supports mySQL to query the @Mail user-database before delivering
a message. The mysql_servers line requires the hostname of the mySQL
server, database name, username and password (the password must be set
in mySQL, Exim does not accept a blank password) To use mySQL support
Exim must be compiled with libmysqlclient (See the Exim
website for more information)
Exim 3.X Configuration:
Follow the above steps to configure @Mail with Exim 3.X
At the top of the Exim configuration file define the following definition:
local_domains = lsearch;/path/to/atmaildir/atmail-domains
This configures Exim to recognize which domain-names to relay email
for. The atmail-domains file is used to load
the domain-names used for @Mail ( Use the @Mail Webadmin to add new
domain-names )
In the Transports configuration section, add the following:
atmail:
driver = pipe
command = ATMAIL_SAVEEMAIL ${lc:$local_part}@$domain
current_directory = ATMAIL_HOME
home_directory = ATMAIL_HOME
user = ATMAIL_UID
group = ATMAIL_GID
return_output = true
At the top of the Directors section ( or below the system_aliases
definition if exists), add the following for the flat-file version of
@Mail:
all:
driver = smartuser
transport = atmail
Or for the mySQL support in @Mail:
all:
driver = smartuser
condition = ${lookup mysql{select Account from Users where Account='$local_part@$domain'}}
transport = atmail
If you are running the @Mail POP3 server and want to use the POP before
SMTP method to add accepted relay domains to your allowed hosts, add
the following line to your Exim configuration. See the POP3
section of the docs for more information on running the @Mail POP3
Server
host_accept_relay = localhost : hostname : 127.0.0.1 : net-lsearch;/usr/exim/relay-access
Exim 4.X Configuration:
At the top of the Exim configuration file define the following definition:
domainlist local_domains = lsearch;/path/to/atmaildir/atmail-domains
This configures Exim to recognize which domain-names to relay email
for. The atmail-domains file is used to load
the domain-names used for @Mail ( Use the @Mail Webadmin to add new
domain-names )
In the Transports configuration section, add the following:
atmail:
driver = pipe
command = ATMAIL_SAVEEMAIL ${lc:$local_part}@$domain
current_directory = ATMAIL_HOME
home_directory = ATMAIL_HOME
user = ATMAIL_UID
group = ATMAIL_GID
return_output = true
At the top of the Routers section ( or below the routers system_aliases
definition if exists), add the following for the flat-file version of
@Mail:
atmail:
driver = accept
transport = atmail
Or for the mySQL support in @Mail:
atmail:
driver = accept
condition = ${lookup mysql{select Account from Users where Account='$local_part@$domain'}}
transport = atmail
If you are running the @Mail POP3 server and want to use the POP before
SMTP method to add accepted relay domains to your allowed hosts, add
the following line to your Exim configuration. See the POP3
section of the docs for more information on running the @Mail POP3
Server
hostlist relay_from_hosts = 127.0.0.1 : net-lsearch;/usr/exim/relay-access
Verify the configure file.
root# /usr/exim/bin/exim -C /usr/exim/configure -bV
You should receive similar to:
Exim version 3.32 #4 built 27-Feb-2002 07:38:43
Copyright (c) University of Cambridge 2001
If you recieve any errors, check your syntax in the configure file.
root# killall -HUP exim
or, if exim is not running:
root# /usr/exim/bin/exim -d2 -bd -q30m
Next open the @Mail Webadmin via your webserver and and set the option
Mail Configuraiton -> SMTP server = localhost . This is required
to send emails from the Web-interface of @Mail. Messages will be relayed
locally via the SMTP server.
If you have problems configuring Exim and @Mail view the log file for
debugging information:
root# tail -f /var/spool/exim/log/mainlog ( or /var/log/exim/*
, depending on your O/S)