# For the benefit of emacs users: -*- shell-script -*- # This is the main exim configuration file. # It was originally generated by `eximconfig', part of the exim package # distributed with Debian. # # Changes by Thorsten Gunkel for http://www.tgunkel.de # # < < < You HAVE TO MODIFY this file to fit your local setup > > > # ###################################################################### # MAIN CONFIGURATION SETTINGS # ###################################################################### # Specify the domain you want to be added to all unqualified addresses # here. Unqualified addresses are accepted only from local callers by # default. qualify_domain = server.example.com # Specify your local domains as a colon-separated list here. local_domains = localhost:server.example.com # Allow mail addressed to our hostname, or to our IP address. local_domains_include_host = true local_domains_include_host_literals = true # Domains we relay for; that is domains that aren't considered local but we # accept mail for them. relay_domains = example.com # No local deliveries will ever be run under the uids of these users never_users = root # The setting below causes Exim to do a reverse DNS lookup on all incoming # IP calls, in order to get the true host name. host_lookup = * # The setting below would, if uncommented, cause Exim to check the syntax of # all the headers that are supposed to contain email addresses #headers_check_syntax # Exim contains support for the Realtime Blocking List (RBL) #rbl_domains = rbl.maps.vix.com #rbl_reject_recipients = false #rbl_warn_header = true # The setting below allows your host to be used as a mail relay by only # the hosts in the specified networks. See the section of the manual # entitled "Control of relaying" for more info. host_accept_relay = localhost : 10.0.0.0/16 # If this option is set, then any process that is running as one of the # listed users may pass a message to Exim and specify the sender's # address using the "-f" command line option, without Exim's adding a # "Sender" header. trusted_users = mail:list # If this option is true, the SMTP command VRFY is supported on incoming # SMTP connections; otherwise it is not. smtp_verify = false # Some operating systems use the "gecos" field in the system password file # to hold other information in addition to users' real names. Exim looks up # this field when it is creating "sender" and "from" headers. gecos_pattern = ^([^,:]*) gecos_name = $1 # This sets the maximum number of messages that will be accepted in one # connection. The default is 10, which is probably enough for most purposes, # but is too low on dialup SMTP systems. smtp_accept_queue_per_connection = 100 # Send a mail to the postmaster when a message is frozen. freeze_tell_mailmaster # Inform postmaster about all problems errors_copy = "*@* postmaster" # Hide BCC headers always_bcc # Reduces DNS lookups (vs queue_smtp_domains) queue_remote_domains = * # Received header Text received_header_text = "Received: \ ${if def:sender_rcvhost {from ${sender_rcvhost}\n\t}\ {${if def:sender_ident {from ${sender_ident} }}\ ${if def:sender_helo_name {(helo=${sender_helo_name})\n\t}}}}\ by ${primary_hostname} \ ${if def:received_protocol {with ${received_protocol}}} \ (Exim ${version_number} #${compile_number} (Debian))\n\t\ id ${message_id}\ ${if def:received_for {\n\tfor <$received_for>}}" end ###################################################################### # TRANSPORTS CONFIGURATION # ###################################################################### # ORDER DOES NOT MATTER # # Only one appropriate transport is called for each delivery. # ###################################################################### # Where local mails will be delivered (here /home/user/Maildir/new # (maildir format) local_delivery: driver = appendfile create_directory = true directory_mode = 700 group = mail mode = 0660 mode_fail_narrower = false envelope_to_add = true # file = /var/spool/mail/${local_part} directory = ${home}/Maildir/ maildir_format # This transport is used for handling pipe addresses generated by # alias or .forward files. address_pipe: driver = pipe return_output # This transport is used for handling file addresses generated by alias # or .forward files. address_file: driver = appendfile # This transport is used for handling file addresses generated by alias # or .forward files if the path ends in "/" address_directory: driver = appendfile no_from_hack prefix = "" suffix = "" # This transport is used for handling autoreplies generated by the filtering # option of the forwardfile director. address_reply: driver = autoreply # This transport is used for procmail procmail_pipe: driver = pipe command = "/usr/bin/procmail -d ${local_part}" return_path_add delivery_date_add envelope_to_add check_string = "From " escape_string = ">From " user = $local_part group = mail # This transport is used for delivering messages over SMTP connections. remote_smtp: driver = smtp authenticate_hosts = mail.gmx.net:smarthost.example.com:smtp.web.de:smtp.example.org end ###################################################################### # DIRECTORS CONFIGURATION # # Specifies how local addresses are handled # ###################################################################### # ORDER DOES MATTER # # A local address is passed to each in turn until it is accepted. # ###################################################################### # This allows local delivery to be forced, avoiding alias files and # forwarding. real_local: prefix = real- driver = localuser transport = local_delivery # This director handles aliasing using a traditional /etc/aliases file. system_aliases: driver = aliasfile file_transport = address_file pipe_transport = address_pipe file = /etc/aliases search_type = lsearch user = list # Uncomment the above line if you are running smartlist # This director runs procmail for users who have a .procmailrc file procmail: driver = localuser transport = procmail_pipe require_files = ${local_part}:+${home}:+${home}/.procmailrc:+/usr/bin/procmail no_verify # This director handles forwarding using traditional .forward files. userforward: driver = forwardfile file_transport = address_file pipe_transport = address_pipe reply_transport = address_reply no_verify check_ancestor file = .forward modemask = 002 filter # This director matches local user mailboxes. 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. # Sender wants smarthost? smarthost_tg: condition = ${extract{smart_host}{${lookup{$sender_address}lsearch{/etc/exim/smtp_users}{$value}fail}}} driver = domainlist transport = remote_smtp route_list = "* ${extract{smart_host}{${lookup{$sender_address}lsearch{/etc/exim/smtp_users}{$value}fail}}} bydns_a" # Send all (remaining) mails directly smarthost_directly: driver = domainlist transport = remote_smtp route_list = "* $domain bydns_mx" 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 2 hours 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,2h,1.5; F,4d,8h end ###################################################################### # REWRITE CONFIGURATION # ###################################################################### # Mail to anyuser@anyhost.example.com is sent to anyuser@server.example.com *@*.example.com $1@server.example.com T # shortcuts for local users, search file smtp_users for current email # address and replace it by username@localhost *@* "${extract{user} {${lookup{$0}lsearch{/etc/exim/smtp_users}{$value}fail}} {$value} fail}@localhost" T end ###################################################################### # AUTHENTICATION CONFIGURATION # ###################################################################### cram_md5: driver = cram_md5 public_name = CRAM-MD5 client_name = "${extract{auth_name}{${lookup{$sender_address}lsearch{/etc/exim/smtp_users}{$value}fail}}}" client_secret = "${extract{auth_pass}{${lookup{$sender_address}lsearch{/etc/exim/smtp_users}{$value}fail}}}" plain: driver = plaintext public_name = PLAIN client_send = "${extract{auth_plain}{${lookup{$sender_address}lsearch{/etc/exim/smtp_users}{$value}fail}}}" # End of Exim configuration file