This document assumes that you already have postfix up and running, pointing to an MX record, and
that you are ready to add the Sympa configuration into your existing configuration.
If you want to test an outgoing message in postfix, from the command line, enter:
mail -s “testing” youraddress@domain.net .
(The '.' on a blank line by itself ends the message and completes sending it)
Summary of steps for configuration:
1. main.cf, 2. master.cf, 3. sympa_aliases, 4. transport_regexp,
5. sympa.conf MTA, 6. postfix restart
1. Edit /etc/postfix/main.cf: define your aliases and regexp files. You may choose to put the aliases
file in sympa's etc folder as in this example. It is helpful to have a separate sympa aliases file
because the sympa user does not usually have permissions to modify your main postfix aliases file.
alias_maps = hash:/etc/aliases,hash:/home/sympa/etc/sympa_aliases relay_domains = $mydestination, lists.mydomain.tld sympa_destination_recipient_limit = 1 sympabounce_destination_recipient_limit = 1 # virtual_alias_maps = regexp:/home/sympa/etc/virtual.regexp recipient_delimiter = + transport_maps = regexp:/home/sympa/etc/transport_regexp
Note: virtual_alias_maps is needed only if you need to translate one list/servername to another
servername, such as using a relay server, which also requires the option relayhost=[servername].
See footnote ([1.]) at bottom.
2. /etc/postfix/master.cf: all of these are on separate lines
sympa unix - n n - - pipe
flags=R user=sympa argv=/home/sympa/bin/queue ${recipient}
sympabounce unix - n n - - pipe
flags=R user=sympa argv=/home/sympa/bin/bouncequeue ${recipient}
3. /home/sympa/etc/sympa_aliases: do a postalias on this file.
sympa: "| /home/sympa/bin/queue sympa@servername.edu" listmaster: "| /home/sympa/bin/queue listmaster@servername.edu" bounce+*: "| /home/sympa/bin/bouncequeue sympa@servername.edu" abuse-feedback-report: "| /home/sympa/bin/bouncequeue sympa@servername.edu" sympa-request: postmaster@servername.edu sympa-owner: postmaster@servername.edu # And for each list, lines will be added like these: #------------------------------ sympa_list1: list alias created 19 Jan 2008 sympa_list1: "| /home/sympa/bin/queue sympa_list1@servername.edu" sympa_list1-request: "| /home/sympa/bin/queue sympa_list1-request@servername.edu" sympa_list1-editor: "| /home/sympa/bin/queue sympa_list1-editor@servername.edu" #sympa_list1-subscribe: "| /home/sympa/bin/queue sympa_list1-subscribe@servername.edu" sympa_list1-unsubscribe: "| /home/sympa/bin/queue sympa_list1-unsubscribe@servername.edu" sympa_list1-owner: "| /home/sympa/bin/bouncequeue sympa_list1@servername.edu"
4. /home/sympa/etc/transport_regexp
/^.*-owner\@lists\.mydomain\.tld$/ sympabounce: /^.*\@lists\.mydomain\.tld$/ sympa:
5. sympa.conf:
# Path to the MTA (sendmail, postfix, exim, or qmail) # (On some systems this is called '/usr/sbin/sendmail.postfix') sendmail /usr/sbin/sendmail
After these are set up, run:
sudo postalias /home/sympa/etc/sympa_aliases sudo postmap /home/sympa/etc/transport_regexp
If you used a virtual.regexp:
sudo postmap /home/sympa/etc/virtual.regexp
And finally:
sudo postfix restart # or service postfix restart
Restart the sympa processes:
sudo /etc/init.d/sympa restart
[1.] Example of using the optional virtual.regexp to translate one address to another server.
The '.*' means it will match anything and forward it using the $1 variable.”
# Translate anything with these suffixes to sympa-<suffix> /^(.*)-(request|editor|owner|subscribe|unsubscribe)@servername.edu/ sympa-$2+$1 # Forward anything starting with sympa on this mail server to go to <whatever>@sympa on the separate sympa server /^(sympa.*)@mailservername.edu/ $1@sympaserver.edu /^(testlist.*)@mailservername.edu/ $1@sympaserver.edu /^(testadmin.*)@mailservername.edu/ $1@sympaserver.edu
Context: Postfix on a Sympa server + Postfix MTA that receives messages from Sympa for local subscribers on a different host.
Issue : delivery of messages is delayed if postfix is not tuned.
The problem :
This problem seems to be caused by the following parameter in postfix master.cf (postfix is configured in stress mode by default :
smtp inet n - n - - smtpd -o stress=yes
In that configuration the smtpd_hard_error_limit parameter (from master.cf) which is the max count of invalid address in an incoming SMTP session is often set to 1
"smtpd_hard_error_limit = ${stress?1}${stress:20}"
A possible solution is to set this value to an higher value :
"smtpd_hard_error_limit = ${stress?5}${stress:20}"
For more postfix related information, also see:
Using sympa_virtual with Postfix instead of regexp_aliases