exim4:enable_smtp-auth
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
exim4:enable_smtp-auth [2016/11/07 11:07] – peter | exim4:enable_smtp-auth [2020/07/15 09:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 38: | Line 38: | ||
Email Address []: | Email Address []: | ||
</ | </ | ||
+ | |||
+ | This will create an **exim.key** and **exim.crt** file in /etc/exim. | ||
===== Enable the basic SMTP-Auth in the Exim config file ===== | ===== Enable the basic SMTP-Auth in the Exim config file ===== | ||
- | Uncomment the following lines. | + | Uncomment the following lines. TODO dont do this but do the next step on sasl. |
<file bash / | <file bash / | ||
Line 55: | Line 57: | ||
# | # | ||
</ | </ | ||
+ | |||
+ | and | ||
+ | |||
+ | <file bash / | ||
+ | login_server: | ||
+ | driver = plaintext | ||
+ | public_name = LOGIN | ||
+ | server_prompts = " | ||
+ | server_condition = "${if crypteq{$auth2}{${extract{1}{: | ||
+ | server_set_id = $auth1 | ||
+ | .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS | ||
+ | server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}} | ||
+ | .endif | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== saslauthd Authentication ===== | ||
+ | |||
+ | You need to configure Exim4 to use the saslauthd for authentication. | ||
+ | |||
+ | <file bash / | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | # | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | # don't send system passwords over unencrypted connections | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Configuring SASL ===== | ||
+ | |||
+ | This section provides details on configuring the saslauthd to provide authentication for Exim4. | ||
+ | |||
+ | Install the sasl2-bin package. | ||
+ | |||
+ | <code bash> | ||
+ | apt-get install sasl2-bin | ||
+ | </ | ||
+ | |||
+ | To configure saslauthd edit the / | ||
+ | |||
+ | <file bash / | ||
+ | START=yes | ||
+ | </ | ||
+ | |||
+ | Next the Debian-exim user needs to be part of the sasl group in order for Exim4 to use the saslauthd service: | ||
+ | |||
+ | <code bash> | ||
+ | sudo adduser Debian-exim sasl | ||
+ | </ | ||
+ | |||
+ | Now start the saslauthd service: | ||
+ | |||
+ | <code bash> | ||
+ | sudo / | ||
+ | </ | ||
+ | |||
+ | Exim4 is now configured with SMTP AUTH using TLS and SASL authentication. | ||
Line 70: | Line 146: | ||
===== Setup the users and passwords ===== | ===== Setup the users and passwords ===== | ||
- | Create / | + | Users and their passwords are held within the **/ |
+ | |||
+ | < | ||
+ | : | ||
+ | </ | ||
+ | |||
+ | |||
+ | Create | ||
Copy output from: | Copy output from: | ||
Line 78: | Line 161: | ||
</ | </ | ||
- | And paste it in / | + | or |
+ | |||
+ | <code bash> | ||
+ | mkpasswd -H md5 | ||
+ | </ | ||
+ | |||
+ | and paste it in / | ||
Repeat for any other logins you'd like to add. | Repeat for any other logins you'd like to add. | ||
+ | |||
+ | |||
+ | ==== Set the permissions and ownership ==== | ||
+ | |||
+ | This file should have permissions set to 640 and have ownership of root: | ||
+ | |||
+ | <code bash> | ||
+ | chmod 640 / | ||
+ | Chown root: | ||
+ | </ | ||
Line 91: | Line 190: | ||
+ | ===== An SMTP AUTH session ===== | ||
+ | |||
+ | <code bash> | ||
+ | 220-mail.xxxxxxxx.com ESMTP Exim 4.34 #1 Wed, 23 Jun 2004 17:35:13 -0700 | ||
+ | EHLO mail.myserver.com | ||
+ | 250-mail.xxxxxxxx.com Hello mail.myserver.com [192.168.0.156] | ||
+ | 250-SIZE 52428800 | ||
+ | 250-PIPELINING | ||
+ | 250-AUTH PLAIN LOGIN | ||
+ | 250-STARTTLS | ||
+ | 250 HELP | ||
+ | AUTH LOGIN | ||
+ | 334 VXNlcm5hbWU6 | ||
+ | bXl1c2VybmFtZQ== | ||
+ | 334 UGFzc3dvcmQ6 | ||
+ | bXlwYXNzd29yZA== | ||
+ | 235 Authentication succeeded | ||
+ | </ | ||
+ | |||
+ | ===== References ===== | ||
+ | |||
+ | / | ||
+ | |||
+ | https:// | ||
+ | |||
+ | https:// |
exim4/enable_smtp-auth.1478516851.txt.gz · Last modified: 2020/07/15 09:30 (external edit)