Skip to Content.
Sympa Menu

Configure mail server: Exim4

Requirements

Virtual domain setting

Initial setting

Steps in this section may be done once at the first time.

  1. If path of sendmail executable file is differ from the default value of sendmail parameter, /usr/sbin/sendmail, define it in sympa.conf. For example:

    sendmail /usr/local/sbin/sendmail
    
  2. Add the following to Sympa configuration file sympa.conf

    sendmail_aliases $SENDMAIL_ALIASES
    aliases_program none
    
  3. Create the list_aliases.tt2 template file in $SYSCONFDIR directory with following content:

    #--- [% list.name %]@[% list.domain %]: list map created at [% date %]
    [% list.name %]@[% list.domain %]: "| $LIBEXECDIR/queue [% list.name %]@[% list.domain %]"
    [% list.name %]-request@[% list.domain %]: "| $LIBEXECDIR/queue [% list.name %]-request@[% list.domain %]"
    [% list.name %]-editor@[% list.domain %]: "| $LIBEXECDIR/queue [% list.name %]-editor@[% list.domain %]"
    [% list.name %]-subscribe@[% list.domain %]: "|  $LIBEXECDIR/queue [% list.name %]-subscribe@[%list.domain %]"
    [% list.name %]-unsubscribe@[% list.domain %]: "|  $LIBEXECDIR/queue [% list.name %]-unsubscribe@[% list.domain %]"
    [% list.name %][% return_path_suffix %]@[% list.domain %]: "|  $LIBEXECDIR/bouncequeue [% list.name %]@[% list.domain %]"
    

Exim4 configuration

Exim4 Architecture configuration

Exim4 may work with a single monolithic configuration template file or with several splitted files according to your installation choice. Filling the bad the configuration have no effect.

If you choose single monolithic way, you have to edit the /etc/exim4/exim4.conf.template and put the router configuration part after "begin router" message and before "begin otherThing ". You can put it typically next to the "system_aliases" section. The transport configuration should take place after "begin transport", typically next to the "address_directory" section.

However, if you choose to split Exim4 configuration template in several file, you have to create a new router file under router directory, for instance /etc/exim4/conf.d/router/401_exim4-config_sympa_aliases, and a new transport file under transport directory like /etc/exim4/conf.d/transport/401_exim4-config_sympa_transport

Router part

Is it unnecessary to filling /etc/aliases with Sympa address like sympa: "| $LIBEXECDIR/queue sympa as theses aliases will be managed into exim configuration file.

  1. Routing the Sympa common aliases This describe the Sympa routing aliases. Transport part will be defined after.

    # in "begin router"
    
    # Sympa generic aliases for sympa, sympa-request, sympa-owner, listmaster
    sympa_queue_aliases:
      debug_print = "R: sympa queue aliases for $local_part@$domain"
      driver = accept
      domains = mail.example.org
      local_parts = sympa : sympa-request : sympa-owner : sympa-owner : listmaster
      transport = sympa_queue_transport
      no_more
    
    # Sympa generic aliases for "bounce" and "abuse-feedback-report"
    sympa_bouncequeue_aliases:
      debug_print = "R: sympa bouncequeue aliases for $local_part@$domain"
      driver = accept
      domains = mail.example.org
      local_parts = bounce : abuse-feedback-report
      transport = sympa_bounce_queue_transport
      no_more
    
  2. Routing mailing list Tell to Exim4 to use the Sympa mailing list file.

    # Sympa list aliases
    sympa_aliases:
      debug_print = "R: sympa_aliases for $local_part@$domain"
      driver = redirect
      allow_fail
      allow_defer
      require_files = "+$SENDMAIL_ALIASES"
      data = ${lookup{$local_part@$domain}lsearch{$SENDMAIL_ALIASES}}
      user = sympa
      group = sympa
      file_transport = address_file
      pipe_transport = address_pipe
      no_more
    

Transport part

Tell to Exim4 the definition of Sympa command. Should be added in transport section.

# begin transports

# Sympa transport for queue program
sympa_queue_transport:
  driver = pipe
  command = /usr/lib/sympa/bin/queue ${local_part_data}@${domain_data}
  user = sympa
  group = sympa
  return_fail_output
  return_path_add

# Sympa transport for bouncequeue program
sympa_bounce_queue_transport:
  driver = pipe
  command = /usr/lib/sympa/bin/bouncequeue ${local_part_data}@${domain_data}
  user = sympa
  group = sympa
  return_fail_output
  return_path_add

System steps

  1. Run update-exim4 program to regenerate the Exim4 configuration

    update-exim4.conf
    
  2. Restart sympa and exim4 service

    /etc/init.d/sympa restart
    /etc/init.d/exim4 restart
    
  3. Test the routing plan

    exim4 -bt list@mail.example.org
    
Top of Page