spacer.png, 0 kB
            Need Help? CLICK HERE

   Jason Meers hackerwatch banner
Exim - E-Mail - Mail Servers - Anti-Virus - Anti-Spam - SMTP - POP3 - IMAP - Linux - Unix - BSD - DNS - MX Records                  Jason Meers 2007

spacer.png, 0 kB
Home arrow Examples arrow Another Simple Exim Configuration File
Another Simple Exim Configuration File PDF Print

Here we use two additional files to store a list of local domains that we will accept messages for and a list of IP addresses that we will accept messages from. This is still avery simple configuration that does not have any specific sections to guard against spam and virues, however a complete full-blown configuration example would often be overewhelming for a new user. This config is made up of three seperate files:

/etc/exim/exim.conf

/etc/exim/exim-accept-mail-for-this-list-of-local-domains.txt

/etc/exim/exim-accept-mail-from-this-list-of-ip-addresses.tx

 

 

 

# start of /etc/exim/exim.conf

######################################################################
#                       EXIM CONFIGURATION                           #
######################################################################
domainlist local_domains = /etc/exim/exim-accept-mail-for-this-list-of-local-domains.txt

hostlist relay_from_hosts = /etc/exim/exim-accept-mail-from-this-list-of-ip-addresses.txt

acl_smtp_rcpt   =       acl_check_rcpt

######################################################################
#                       ACL CONFIGURATION                            #
######################################################################
begin acl

acl_check_rcpt:
 
  accept  domains       = +local_domains
          endpass
          verify        = recipient

  accept  hosts         = +relay_from_hosts

  deny    message       = relay not permitted

######################################################################
#                      ROUTERS CONFIGURATION                         #
######################################################################
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

localuser:
  driver = accept
  check_local_user
  transport = local_delivery
  cannot_route_message = Unknown user

######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
begin transports

remote_smtp:
  driver = smtp

local_delivery:
  driver = appendfile
  file = /var/mail/$local_part
  delivery_date_add
  envelope_to_add
  return_path_add
  group = mail
  mode = 0660

######################################################################
#                      RETRY CONFIGURATION                           #
######################################################################
begin retry

# Address or Domain    Error       Retries
# -----------------    -----       -------

*                      *           F,2h,15m; G,16h,1h,1.5; F,4d,6h

# end of /etc/exim/exim.conf

 

 

 

 

 

# start of /etc/exim/exim-accept-mail-for-this-list-of-local-domains.txt

example.com

*.example.com.com 

# endt of /etc/exim/exim-accept-mail-for-this-list-of-local-domains.txt

 

 

 

 

 

# start of /etc/exim/exim-accept-mail-from-this-list-of-ip-addresses.txt

127.0.0.1

10.0.0.0/8

192.168.0.0/16

# end of /etc/exim/exim-accept-mail-from-this-list-of-ip-addresses.txt

 

 

 

 

 

 
< Prev   Next >
spacer.png, 0 kB
spacer.png, 0 kB
spacer.png, 0 kB