--- layout: page title: Installing MTA --- # Installing the MTA
Alaveteli sends and receives email. You'll need to set up your Mail Transfer Agent (MTA) to handle this properly. We've got examples here for both postfix and exim4, two of the most popular MTAs.
## How Alaveteli handles email ### Request mail When someone makes a Freedom of Information request to an authority through Alaveteli, the application sends an email containing the request to the authority. The email's `reply-to` address is a special one so that any replies to it can be automatically directed back to Alaveteli, and so that Alaveteli can tell which request the reply needs to be shown with. This requires some configuration of the MTA on the server that is running Alaveteli, so that it will pipe all emails to these special addresses to Alaveteli to handle, via its `script/mailin` script. The special addresses are of the form:INCOMING_EMAIL_PREFIX
to foi+
in config/general.yml
Pipe all incoming mail where the `To:` address starts with `foi+` to the `alaveteli` pipe (`/var/www/alaveteli/script/mailin`, as specified in `/etc/postfix/master.cf` at the start of this section):
cat > /etc/postfix/transports <config/general.yml
:
user-support@example.com
user-support@example.com
team@example.com
untrusted_set_sender
option in /etc/exim4/conf.d/main/02_exim4-config_options
. By default, untrusted users in exim are only allowed to set an empty envelope sender address, to declare that a message should never generate any bounces. untrusted_set_sender
can be set to a list of address patterns, meaning that untrusted users are allowed to set envelope sender addresses that match any of the patterns in the list. If a pattern list is specified, you will need also to add ALAVETELI_USER
to the MAIN_TRUSTED_USERS
list in order to allow them to set the return path on outgoing mail. This option is also in /etc/exim4/conf.d/main/02_exim4-config_options
in a split config. Look for the line that begins with MAIN_TRUSTED_USERS
- something like:
MAIN_TRUSTED_USERS = uucp
and add the alaveteli user:
MAIN_TRUSTED_USERS = uucp : alaveteli
If untrusted_set_sender
is set to *
, that means that untrusted users can set envelope sender addresses without restriction, so there's no need to add ALAVETELI_USER
to the MAIN_TRUSTED_USERS
list.
config/general.yml
:
user-support@example.com
user-support@example.com
team@example.com