Skip to content. | Skip to navigation

Personal tools
Log in
Sections
You are here: Home Members tuos Blog Simple mailing list with Exim4 in 1 minute

Simple mailing list with Exim4 in 1 minute

How to establish a dead-simple archiving mailing list with Exim4 in 5 short steps.
  1. Create a directory where Exim4 archives your mailing list:

    mkdir /var/exim4lists
    chown Debian-exim:Debian-exim /var/exim4lists # Check uid and gid of your Exim4-process.
    
  2. Define delivery addresses for your mailing:

    cat >>/etc/aliases <<EOF
    mylist: /var/exim4lists/mylist, bob, alice
    EOF
    
  3. Write a simple filter file, which adds Reply-to: mylist@example.com -header:

    cat >/etc/exim4/filter <<EOF
    # Exim filter
    
    if first_delivery and $header_to: is "mylist@example.com" then
        if $header_Reply-to: is not "" then
            # Save the original Reply-to -address.
            headers add "X-Original-Reply-to: $header_Reply-to:"
        endif
        headers remove "Reply-to"
        headers add "Reply-to: mylist@example.com\n" # Reply to the list by default.
    endif
    EOF
    
  4. Tell Exim4 where the filter can be found and allow Exim4 to write to files by inserting the following lines into the main configuration settings in /etc/exim4/exim4.conf.template:

    system_filter = /etc/exim4/filter
    SYSTEM_ALIASES_FILE_TRANSPORT = address_file
    
  5. Update the configuration of your running Exim4-process(es):

    invoke-rc.d exim4 restart
    

Comments (0)