FIXME /etc/exim4.conf
Exim is normally configured with the file
/etc/exim/exim.conf. All examples on this page refer to this file.
Additionally I have created a file
/etc/exim/smtp_users. In this file each line lists an email-address with some informations about this address:
userx@example.com: user=usera smart_host=mail.example.com auth_name=u113 auth_pass=secret
- A user called usera has somewhere the email-address userx@example.com.
- Mails to userx@example.com are no longer delivered to this address but directly to the local user usera.
- Mails from userx@example.com are delivered over the smarthost mail.example.com with the user-name u113 and the password secret (cram_md5 encrypted).
userx@example.com: smart_host=mail.example.com auth_name=u113 auth_pass=secret
- Now mails to userx@example.com are really delivered to this address.
userx@example.com: user=usera smart_host=mail.example.com auth_plain=^u113^secret
- Now we don't use cram_md5 to encrypt the password but send the it plain-text.
userx@example.com: user=usera
- Here we don't use a smarthost but deliver the mails directly to the destination mailserver.
Please note that all names and addresses in the examples are fictitious and any similarity to actual names or addresses is unintentional.
12-10-2005 02.11
Beside the options concerning the smarthosts there are several other options you might be interested in:
-
###
# MAIN CONFIGURATION SETTINGS
###
-
Only accept mails where all headers's syntax is error-free. (beware: OE and Bcc recipients):
FIXME (gibts nicht mehr?)
headers_check_syntax
-
Only accept SMTP connections from localhost. This might suffice if you receive your mails with POP3:
hostlist relay_from_hosts = 127.0.0.1 : ::::1
...
begin acl
...
accept hosts = +relay_from_hosts
-
Additionally accept mails from 10.0.* addresses:
hostlist relay_from_hosts = 127.0.0.1 : ::::1 : 10.0.0.0/16
...
begin acl
...
accept hosts = +relay_from_hosts
-
Allow some trusted users to change their sender-address:
trusted_users = mail:user1:user2
-
Always send a copy of error-message-mails to the postmaster:
freeze_tell_mailmaster
errors_copy = "*@* postmaster"
-
If you don't use this option some mailing-list software might reveal all Bcc recipients:
FIXME (gibts nicht mehr?)
always_bcc
-
Store mail that have to be sent to remote hosts and sent them only if requested to do so.
#queue_smtp_domains = ! +local_domains
queue_domains = ! +local_domains
-
###
# TRANSPORTS CONFIGURATION
###
-
Deliver mails to /home/user/Maildir/ instead of /var/spool/mail/user:
FIXME: Nachsehen was mit den Optionen ist die es bei Neu nicht gibt
local_delivery:
driver = appendfile
create_directory = true
directory_mode = 700
group = mail
mode = 0660
mode_fail_narrower = false
envelope_to_add = true
#file = /var/spool/mail/${local_part}
directory = ${home}/Maildir/
maildir_format
Neu:
transport = maildir_home
...
maildir_home:
debug_print = "T: maildir_home for $local_part@$domain"
driver = appendfile
directory = $home/Maildir
delivery_date_add
envelope_to_add
return_path_add
maildir_format
mode = 0600
mode_fail_narrower = false
-
###
# REWRITE CONFIGURATION
###
-
Rewrite address abc@example.com to address def@example.net:
abc@example.com def@example.net FLAG
You can select with FLAG which headers will be rewritten:
E All envelope, F all envelope From, T all envelope To, b Bcc:, c Cc:, f From:, h all headers, r Reply-To:, s Sender:, t To:
12-10-2005 02.11
An example for each file mentioned here:
The file permissions must allow
exim to read the files. Otherwise
smtp_users should be protected from other users. Depending on your configuration it might look like this:
-rw-r----- 1 root mail ... smtp_users
06-08-2005 13.09