
domainlist extra_local_domains = www.infradead.org : \
    cvs.infradead.org : \
    ftp.infradead.org : \
    linux-mtd.infradead.org : \
    *.linux-mtd.infradead.org

hostlist relay_hosts = <; localhost ; ::1 ;



#majordomo_aliases:
#  driver = aliasfile
## >> Option added by convert4r3
#  file_transport = address_file
## >> Option added by convert4r3
#  pipe_transport = address_pipe
#  file = /var/lib/majordomo/aliases
#  search_type = lsearch
# user = mail

cjd_aliases:
  driver = redirect
  allow_defer
  allow_fail
  data = ${lookup{$local_part}lsearch{/home/cjd/aliases}}
  file_transport = address_file
  pipe_transport = address_pipe
  retry_use_local_part
  user = mail
# >> Option added by convert4r3
# >> Option added by convert4r3


# This director handles forwarding using traditional .forward files.
# If you want it also to allow mail filtering when a forward file
# starts with the string "# Exim filter", uncomment the "filter" option.
# The check_ancestor option means that if the forward file generates an
# address that is an ancestor of the current one, the current one gets
# passed on instead. This covers the case where A is aliased to B and B
# has a .forward file pointing to A.

userforward:
#!!# check_group option removed
#!!# filter renamed allow_filter
  driver = redirect
  allow_filter
  check_ancestor
  check_local_user
  no_expn
  file = $home/.forward
  file_transport = address_file
  initgroups
  modemask = 002
  pipe_transport = address_pipe
  reply_transport = address_reply
  skip_syntax_errors
  syntax_errors_text = "\
    This is an automatically generated message. An error has been \
    found\nin your .forward file. Details of the error are reported \
    below. While\nthis error persists, messages addressed to you will \
    get delivered into\nyour normal mailbox and you will receive a \
    copy of this message for\neach one."
  syntax_errors_to = real-$local_part@$domain
  no_verify

# >> Option added by convert4r3
# >> Option added by convert4r3
# >> Option added by convert4r3

# Modification by Florian Wallner <wallner@speed-link.de> make use of
# procmail as director if a user has a .procmailrc to avoid breaking
# something that worked before.  
                                    
procmail:
  no_verify
  driver = accept
  check_local_user
  require_files = ${local_part}:${home}/.procmailrc
  transport = procmail

# This director matches local user mailboxes.

real_localuser:
#!!# prefix renamed local_part_prefix
  driver = accept
  check_local_user
  local_part_prefix = real-
  transport = local_delivery

localuser:
  driver = accept
  check_local_user
  transport = local_delivery

#virtual:
#  driver = smartuser
#  new_address = imladris.postmaster@mvhi.com


## Added for RM Mailling list
list_managers:
#!!# suffix renamed local_part_suffix
#!!# forbid_filter_run added because forbid_pipe is set
  driver = redirect
  no_check_local_user
  errors_to = Postmaster@$domain
  file = /etc/exim/lists/$domain/${local_part}-managers
  forbid_file
  forbid_filter_run
  forbid_pipe
  local_part_suffix = -request
  retry_use_local_part

#list_multipart:
#      require_files = /etc/exim/lists/$domain/${local_part}-users
#      condition = ${if match {${lc:$header_content-type:}} {multipart/alternative} {yes}}
#      driver = smartuser
#      transport = lists_multipart_complain



list:
#!!# forbid_filter_run added because forbid_pipe is set
  driver = redirect
  no_check_local_user
  errors_to = ${local_part}-request@$domain
  file = /etc/exim/lists/$domain/${local_part}-users
  forbid_file
  forbid_filter_run
  forbid_pipe
  #headers_add = "Reply-To: <${local_part}@slowglass.com>\n"
  #headers_remove = "reply-to:resent-to:resent-reply-to"
  require_files = /etc/exim/lists/$domain/${local_part}-managers
  retry_use_local_part
                                                                    



######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
#                       ORDER DOES NOT MATTER                        #
#     Only one appropriate transport is called for each delivery.    #
######################################################################

# A transport is used only when referenced from a director or a router that
# successfully handles an address.


# This transport is used for delivering messages over SMTP connections.

begin transports

remote_smtp:
  driver = smtp
#  interface = 194.205.184.45
#  hosts_avoid_tls = 195.224.55.225:195.224.55.226
#  fallback_hosts = "mail.insnet.net"

# This transport is used for local delivery to user mailboxes. By default
# it will be run under the uid and gid of the local user, and requires
# the sticky bit to be set on the /var/mail directory. Some systems use
# the alternative approach of running mail deliveries under a particular
# group instead of using the sticky bit. The commented options below show
# how this can be done.

# Modification by Florian Wallner <wallner@speed-link.de> make use of
# procmail as director if a user has a .procmailrc to avoid breaking 
# something that worked before.

procmail:
  driver = pipe
  command = "/usr/bin/procmail -d ${local_part}"
# from_hack
                                               
local_delivery:
  driver = appendfile
  delivery_date_add
  envelope_to_add
  file = /var/spool/mail/${local_part}
  group = mail
  mode = 0660
  return_path_add


# This transport is used for handling pipe addresses generated by alias
# or .forward files. It has a conventional name, since it is not actually
# mentioned elsewhere in this configuration file. (A different name *can*
# be specified via the "address_pipe_transport" option if you really want
# to.) If the pipe generates any standard output, it is returned to the sender
# of the message as a delivery error. Set return_fail_output instead if you
# want this to happen only when the pipe fails to complete normally.

address_pipe:
  driver = pipe
  return_output


# This transport is used for handling file addresses generated by alias
# or .forward files. It has a conventional name, since it is not actually
# mentioned elsewhere in this configuration file.

address_file:
  driver = appendfile
  delivery_date_add
  envelope_to_add
  return_path_add


# This transport is used for handling file addresses generated by alias
# or .forward files if the path ends in "/", which causes it to be treated
# as a directory name rather than a file name. Each message is then delivered
# to a unique file in the directory. If instead you want all such deliveries to
# be in the "maildir" format that is used by some other mail software,
# uncomment the final option below. If this is done, the directory specified
# in the .forward or alias file is the base maildir directory.
#
# Should you want to be able to specify either maildir or non-maildir
# directory-style deliveries, then you must set up yet another transport,
# called address_directory2. This is used if the path ends in "//" so should
# be the one used for maildir, as the double slash suggests another level
# of directory. In the absence of address_directory2, paths ending in //
# are passed to address_directory.

address_directory:
#!!# prefix renamed message_prefix
#!!# suffix renamed message_suffix
#!!# no_from_hack replaced by check_string
  driver = appendfile
  check_string = 
  delivery_date_add
  envelope_to_add
  message_prefix = ""
  message_suffix = ""
  return_path_add
# maildir_format


# This transport is used for handling autoreplies generated by the filtering
# option of the forwardfile director. It has a conventional name, since it
# is not actually mentioned elsewhere in this configuration file.

address_reply:
  driver = autoreply


# Added for rm mailing list
lists_multipart_complain:
  driver = autoreply
  cc = cjd@slowglass.com
  subject = "Content-type: multipart/alternative prohibited on list $local_part"
  text = "You attempted to send a multipart message to $local_part@slowglass.com.\n\
This is probably a result of misconfiguring your mailer to send HTML mail.\n\
Please ask your computer support staff to correct the problem.\n"
  user = exim





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


begin retry

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


# End of Exim 4 configuration
