###################################################################### # MAIN CONFIGURATION SETTINGS # ###################################################################### hide mysql_servers = localhost/maildb/mail/secret # primary_hostname = domainlist local_domains = @ : ${lookup mysql {SELECT userid FROM domains \ WHERE userid="${quote_mysql:${domain}}" }} domainlist relay_to_domains = hostlist relay_from_hosts = 127.0.0.1 # domainlist relay_to_domains = *.myco.com : my.friend.org # hostlist relay_from_hosts = 127.0.0.1 : 192.168.0.0/16 acl_smtp_rcpt = acl_check_rcpt # qualify_domain = # qualify_recipient = # allow_domain_literals 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. If you feel this is too # expensive, you can specify the networks for which a lookup is done, or # remove the setting entirely. host_lookup = * rfc1413_hosts = * rfc1413_query_timeout = 30s ignore_bounce_errors_after = 2d timeout_frozen_after = 7d # freeze_tell = postmaster #################################################################### # ACL CONFIGURATION # # Specifies access control lists for incoming SMTP mail # ###################################################################### begin acl acl_check_rcpt: accept hosts = : deny local_parts = ^.*[@%!/|] : ^\\. accept local_parts = postmaster domains = +local_domains require verify = sender accept domains = +local_domains endpass message = unknown user verify = recipient accept domains = +relay_to_domains endpass message = unrouteable address verify = recipient accept hosts = +relay_from_hosts accept authenticated = * deny message = relay not permitted ###################################################################### # ROUTERS CONFIGURATION # # Specifies how addresses are handled # ###################################################################### # THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT! # # An address is passed to each router in turn until it is accepted. # ###################################################################### begin routers dnslookup: driver = dnslookup domains = ! +local_domains transport = remote_smtp ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 no_more # The remaining routers handle addresses in the local domain(s). system_aliases: driver = redirect allow_fail allow_defer data = ${lookup{$local_part}lsearch{/etc/aliases}} file_transport = address_file pipe_transport = address_pipe condition = ${if eq {$domain}{$primary_hostname} {yes}{no} } #userforward: # driver = redirect # check_local_user # file = $home/.forward # no_verify # no_expn # check_ancestor ## allow_filter # file_transport = address_file # directory_transport = address_directory # reply_transport = address_reply localuser: driver = accept check_local_user transport = local_delivery condition = ${if eq {$domain}{$primary_hostname} {yes}{no} } #virtual_userforward: # driver = redirect # router_home_directory = ${lookup mysql{ SELECT home FROM users \ # WHERE id='${quote_mysql:${local_part}@${domain}}' }} # file = ${lookup mysql{ SELECT home FROM users \ # WHERE id='${quote_mysql:${local_part}@${domain}}' }}/.forward # no_verify # no_expn # forbid_filter_existstest # forbid_filter_lookup # check_ancestor # allow_filter # directory_transport = address_directory # reply_transport = address_reply # user = mail virtual_user: driver = redirect allow_fail allow_defer data = ${lookup mysql{ SELECT maildir FROM users \ WHERE id='${quote_mysql:${local_part}@${domain}}' }} directory_transport = address_directory ###################################################################### # TRANSPORTS CONFIGURATION # ###################################################################### # ORDER DOES NOT MATTER # # Only one appropriate transport is called for each delivery. # ###################################################################### begin transports remote_smtp: driver = smtp local_delivery: driver = appendfile file = /var/mail/$local_part delivery_date_add envelope_to_add return_path_add address_pipe: driver = pipe return_output address_file: driver = appendfile delivery_date_add envelope_to_add return_path_add address_directory: driver = appendfile maildir_format delivery_date_add envelope_to_add return_path_add address_reply: driver = autoreply ###################################################################### # RETRY CONFIGURATION # ###################################################################### begin retry # 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 6 hours until 4 days have passed since the first # failed delivery. # Domain Error Retries # ------ ----- ------- * * F,2h,15m; G,16h,1h,1.5; F,4d,6h ###################################################################### # REWRITE CONFIGURATION # ###################################################################### # There are no rewriting specifications in this default configuration file. begin rewrite ###################################################################### # AUTHENTICATION CONFIGURATION # ###################################################################### begin authenticators cram: driver = cram_md5 public_name = CRAM-MD5 server_secret = ${lookup mysql{SELECT clear FROM users WHERE id='${quote_mysql:$1}'}{$value}fail} server_set_id = $1 #plain: # driver = plaintext # public_name = PLAIN # server_condition = \ # ${if crypteq{$2}{${lookup mysql{SELECT crypt FROM users WHERE id='${quote_mysql:$1}'}{$value}fail}} {yes}{no}} # server_set_id = $1 # End of Exim configuration file