HowTo Setup Basic SMTP AUTH in Exim4 Debian

This brief guide will explain the steps you can take to get basic SMTP AUTH working with Debian exim4 package. (For users connecting to your server, not for forwarding via your ISP)

First of all generate an Exim SSL certificate:

# /usr/share/doc/exim4-base/examples/exim-gencert

Now edit /etc/exim4/exim4.conf.template using your favourite text editor.

Uncomment (don’t copy and paste from here because my copy from file cut out end of lines) the following lines:

# plain_server:
# driver = plaintext
# public_name = PLAIN
# server_condition = “${if crypteq{$3}{${extract{1{:}{${lookup{$2}lsearch{CON$
# server_set_id = $2
# server_prompts = :
# .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
# server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
# .endif

Once that has been done create (or edit if it exists) /etc/exim4/exim4.conf.localmacros

Add the line:

MAIN_TLS_ENABLE = true

You need to add users with:
# adduser username

In order to create file /var/mail/username you need to send email to new user

# mail username@yourdomain.com[enter]
some text[enter]
.[enter]

To actually setup the users and passwords for outgoing SMTP create /etc/exim4/passwd

Copy output from:

htpasswd -nd usernameforsmtp

And paste it in /etc/exim4/passwd

Repeat for any other logins you’d like to add.

Now you’re done. Update your configuration and Restart Exim4:

# update-exim4.conf
# /etc/init.d/exim4 restart


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *