example of smartlist exim configuration

Top Page
Delete this message
Reply to this message
Author: mark david mcCreary
Date:  
To: exim-users
Subject: example of smartlist exim configuration
fyi

These are notes and configuration files from how I operate Smartlist and Exim. I have cut and pasted various snippets from various sources. Thanks to Philip and everyone else.

I operate 2 Exim binaries and configuration files. This was to work around having the list name be part of the incoming message, and also the name needed to distinguish the list distribution file. I think the new SENDER eliminates the need for having 2 binaries and configuration files.

That said, there are advantages to separating the mail into two spools, queues, etc. Subscription requests can be processed quickly, while mailing list dispersal can go slowly. The configuration file controls the number of queues, parallel runs, etc. Executing exim with the -C operand does not start up Exim with root status, and thus is not of use for running dedicated mailing list machines.


I create a bunch of directories.

mkdir /usr/local/exim
mkdir /usr/local/exim/bin
mkdir /usr/local/exim/bin-dist
mkdir /var/log/exim
mkdir /var/log/exim-dist
mkdir /var/spool/exim
mkdir /var/spool/exim-dist

chown -R exim.exim /usr/local/exim
chown -R exim.exim /usr/local/exim/bin
chown -R exim.exim /usr/local/exim/bin-dist
chown -R exim.exim /var/log/exim
chown -R exim.exim /var/log/exim-dist
chown -R exim.exim /var/spool/exim
chown -R exim.exim /var/spool/exim-dist


chmod g-w /usr/local/exim
chmod g-w /usr/local/exim/bin
chmod g-w /usr/local/exim/bin-dist

I compile 1.651 using this make file

BIN_DIRECTORY=/usr/local/exim/bin
COMPRESS_COMMAND=/bin/gzip
COMPRESS_SUFFIX=gz
CONFIGURE_FILE=/usr/local/exim/configure
DIRECTOR_ALIASFILE=yes
DIRECTOR_FORWARDFILE=yes
DIRECTOR_LOCALUSER=yes
DIRECTOR_SMARTUSER=yes
EXICYCLOG_MAX=10
EXIM_GID=85
EXIM_UID=85
EXIM_MONITOR=eximon.bin
LOG_FILE_PATH=/var/log/exim/exim_%slog
ROUTER_DOMAINLIST=yes
ROUTER_IPLITERAL=yes
ROUTER_LOOKUPHOST=yes
ROUTER_QUERYPROGRAM=yes
SPOOL_DIRECTORY=/var/spool/exim
SPOOL_DIRECTORY_MODE=0750
SPOOL_MODE=0640
TRANSPORT_APPENDFILE=yes
TRANSPORT_AUTOREPLY=yes
TRANSPORT_PIPE=yes
TRANSPORT_SMTP=yes

I repeat the step for the distribution binary. The differences are

BIN_DIRECTORY=/usr/local/exim/bin-dist
CONFIGURE_FILE=/usr/local/exim/configure-dist
LOG_FILE_PATH=/var/log/exim-dist/exim_%slog
SPOOL_DIRECTORY=/var/spool/exim-dist

I move a configure file to /usr/local/exim

######################################################################
#                    MAIN CONFIGURATION SETTINGS                     #
######################################################################
accept_timeout = 60s
always_bcc
delay_warning = 0s
deliver_load_max = 4
freeze_tell_mailmaster
log_ip_options
log_level = 3
log_received_recipients
log_smtp_confirmation
log_subject
#never_users = root
queue_run_max = 5
queue_only
smtp_accept_max = 20
smtp_accept_queue = 10
smtp_accept_reserve = 5
smtp_connect_backlog = 30
trusted_users = "exim:list"
relay_domains_include_local_mx
#relay_match_host_or_sender
preserve_message_logs
ignore_errmsg_errors_after = 24h
#check_spool_space = 10M
#check_spool_inodes = 100
#check_log_space
#check_log_inodes
#collapse_source_routes
relay_domains = "*internet-tools.com"
sender_host_reject_relay = *
#headers_sender_verify_errmsg
log_arguments
end
######################################################################
#                      TRANPORTS CONFIGURATION                       #
######################################################################
local_delivery:
  driver = appendfile;
  file = /var/spool/mail/${local_part}
address_pipe:
  driver = pipe;
  ignore_status,
#  return_output
#  return_fail_output
address_file:
  driver = appendfile
address_reply:
  driver = autoreply
smtp:
  driver = smtp;
end
######################################################################
#                      DIRECTORS CONFIGURATION                       #
######################################################################
system_aliases:
  driver = aliasfile;
  file = /etc/aliases.announce,
  search_type = lsearch,
  user = list
localuser:
  driver = localuser,
  transport = local_delivery;
end
######################################################################
#                      ROUTERS CONFIGURATION                         #
######################################################################
lookuphost:
  driver = lookuphost,
  transport = smtp;
literal:
  driver = ipliteral,
  transport = smtp;
end
######################################################################
#                      RETRY CONFIGURATION                           #
######################################################################
*                      *           F,2h,1h; G,16h,2h,1.5; F,3d,8h
end
######################################################################
#                      REWRITE CONFIGURATION                         #
######################################################################













I move a configure file for the distribution binary to /usr/local/exim

The differences are

######################################################################
#                  Runtime configuration file for Exim               #
######################################################################
#                  Smartlist Dist Method                             #
######################################################################
#                    MAIN CONFIGURATION SETTINGS                     #
######################################################################
accept_timeout = 60s
always_bcc
delay_warning = 0s
deliver_load_max = 4
freeze_tell_mailmaster
log_ip_options
log_level = 3
log_received_recipients
log_smtp_confirmation
log_subject
#never_users = root
queue_run_max = 43
queue_only
remote_max_parallel = 11
smtp_accept_max = 20
smtp_accept_queue = 10
smtp_accept_reserve = 5
smtp_connect_backlog = 30
trusted_users = "exim:announce:discuss"
split_spool_directory
ignore_errmsg_errors
deliver_queue_load_max = 99
queue_run_in_order
relay_domains_include_local_mx
#relay_match_host_or_sender
preserve_message_logs
ignore_errmsg_errors_after = 24h
#check_spool_space = 10M
#check_spool_inodes = 100
#check_log_space
#check_log_inodes
#collapse_source_routes
relay_domains = "*internet-tools"
sender_host_reject_relay = *
#headers_sender_verify_errmsg
log_arguments
end



smtp:
remove_headers = "Resent-To:Resent-Date:Resent-From:Resent-Message-Id",
driver = smtp;
max_rcpt = 1999
end

######################################################################
#                      DIRECTORS CONFIGURATION                       #
######################################################################
smartlist_announce_aliases:
  driver = forwardfile,
  require_files = /home/announce/${local_part}/dist;
  file = /home/announce/${local_part}/dist,
  no_check_local_user,
  forbid_pipe,
  forbid_file,
  modemask = 002,
  skip_syntax_errors,
  syntax_errors_to = listmaster@???


system_aliases:
driver = aliasfile;
file = /etc/aliases.announce,
search_type = lsearch,
user = announce



Modify rc.submit in Smartlist to call new binary that will use configure-dist
     :0 w: dist.lock
     * !alt_sendmail ?? .
     | /usr/local/exim/bin-dist/exim -f $list-request $list



Modify rc.init for smartlist
    uncomment alt_sendmail


Modify the /etc/rc.init file that starts up exim

    echo -n "Starting exim: "
    /usr/local/exim/bin/exim -bd
    /usr/local/exim/bin/exim -q11m
    /usr/local/exim/bin-dist/exim -q9m



Set up an exim alias file that looks like this for each list

list:        |/home/list/.bin/flist list
list-request:    |/home/list/.bin/flist list-request


Tweak the file permissions

chmod 644 /etc/aliases.announce



That should get you pretty close to going. Comment and feedback welcome.

Good luck !

mark



mark david mcCreary
Internet Tools, Inc.            4615 Post Oak Place, Suite 140
mdm@???          Houston, Texas 77027
http://www.internet-tools.com    713.627.9600