Software used:
- FreeBSD 4.0-STABLE
- qmail 1.03
- openldap 2.0.7
- exim 3.22
- Cyrus 1.6.22
- pam_ldap 107
After using qmail for almost a year, I decided to switch to exim for a few reasons:
- Support. Debian uses exim as its default mailer, so I figured I could find plenty of people who used it. In fact, I originally thought about switching back to sendmail, but I've played with that enough that I knew things would be too easy with it.
- LDAP integration. I want to move away from passwd-based authentication systems to LDAP since it seems that I could offer graded accounts using LDAP to set privs.
- Perl Integration. This is the real selling point for me. I love perl and the more places I can stick it, the better.
Compiling exim
Easy. The
$ cd /usr/ports/mail/exim
$ make WITH_LDAP=yes WITH_PAM=yes WITH_TLS=yes \
WITH_PERL=yes LDAP_LIB_TYPE=OPENLDAP2
$ sudo make install
I did comment out the start line in the rc.d script for now till
I get it running.
Compiling Cyrus
Again, easy. Just
$ cd /usr/ports/security/cyrus-sasl; make; sudo make install $ cd /usr/ports/mail/cyrus; make; sudo make installIt prompted me for what sort of authentication I wanted to use, and of course I said "OpenLDAP".
Integrating Exim with Cyrus
Since exim's config is in /usr/local/etc/exim and qmail's
configuration resides in /var/qmail, I coubsp;setting (not used in this configuration).
system_aliases:
driver = aliasfile
file = /usr/local/etc/exim/aliases
search_type = lsearch
file_transport = address_file
pipe_transport = address_pipe
user = root
## Directors section [this deals with local addresses]
##
## First 2 directors rewrite list-owner or owner-list to list-admin
## This is only done if the list exists.
## List existence checks are done by seeing if the file
## MAILMAN_HOME/lists//config.db
## exists.
list_owner_director:
driver = smartuser
domains = lists.everybody.org
require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
suffix = "-owner"
new_address = "${lc:$local_part}-admin@${domain}"
owner_list_director:
driver = smartuser
domains = lists.everybody.org
require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
prefix = "owner-"
new_address = "${lc:$local_part}-admin@${domain}"
##
## Next 3 directors direct admin, request and list mail to the appropriate
## transport. List existence is checked as above.
list_admin_director:
driver = smartuser
domains = lists.everybody.org
suffix = -admin
require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
transport = list_admin_transport
list_request_director:
driver = smartuser
domains = lists.everybody.org
suffix = -request
require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
transport = list_request_transport
list_director:
driver = smartuser
domains = lists.everybody.org
require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
transport = list_transport
## End of directors fragment
# Handle forward files
userforward:
driver = forwardfile
file = .forward
no_verify
no_expn
check_ancestor
# filter
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
# Do the local delivery with procmail
procmail:
driver = localuser
transport = procmail_pipe
# Conventional local delivery
localuser:
driver = localuser
transport = local_delivery
end
######################################################################
# ROUTERS CONFIGURATION #
# Specifies how remote addresses are handled #
######################################################################
# ORDER DOES MATTER #
# A remote address is passed to each in turn until it is accepted. #
######################################################################
# Remote addresses are those with a domain that does not match any item
# in the "local_domains" setting above.
# This router routes to remote hosts over SMTP using a DNS lookup with
# default options.
lookuphost:
driver = lookuphost
transport = remote_smtp
# This router routes to remote hosts over SMTP by explicit IP address,
# given as a "domain literal" in the form [nnn.nnn.nnn.nnn]. The RFCs
# require this facility, which is why it is enabled by default in Exim.
# If you want to lock it out, set forbid_domain_literals in the main
# configuration section above.
literal:
driver = ipliteral
transport = remote_smtp
end
######################################################################
# RETRY CONFIGURATION #
######################################################################
# This single retry rule applies to all domains and all errors. It specifies
# retries every 15 minutes for 2 hours, then increasing retry intervals,
# starting at 1 hour and increasing each time by a factor of 1.5, up to 16
# hours, then retries every 8 hours until 4 days have passed since the first
# failed delivery.
# Domain Error Retries
# ------ ----- -------
* * F,2h,15m; G,16h,1h,1.5; F,4d,8h
end
######################################################################
# REWRITE CONFIGURATION #
######################################################################
# There are no rewriting specifications in this default configuration file.
# End of Exim configuration file