I work on a newsletter system for my project and I wanna use exim4 (lightweight version) for sending newaletters (just for newsletters because the mail is hosted separated...on google apps). But there is a way to auth and setup domains and accounts (mail@ex1.com, mail@ex2.com, etc.) ? Any idea is welcomed! Thanks :)
1 Answers
Debian provides a couple of examples in their default configuration snippets. If you're using Debian and its split configuration system, these should be in /etc/exim4/auth/30_exim4-config_examples (if you aren't, it would be after begin authenticators in the configuration file), and then you'd uncomment the section you are using (for instance, this one is for crypted passwords):
login_server:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = "${if crypteq{$auth2}{${extract{1}{:}{${lookup{$auth1}lsearch{/some/place/passwdfile}{$value}{*:*}}}}}{1}{0}}"
server_set_id = $auth1
server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
Note the server_advertise_condition. Since the password is sent in clear text over the network, this login type should only be allowed when TLS is being used. CRAM-MD5 does not send the password in plaintext over the network so it does not require TLS, but it does require the server to hold a plaintext copy of the password so it can generate per-session hashes from it. Per Debian's documentation, /some/place/passwdfile contains accounts of the form
foo@example.com:$crypt$compatible$hash:plaintextpassword
bar@example.com:$crypt$compatible$hash:plaintextpassword
foo@example.net:$crypt$compatible$hash:plaintextpassword
etc. The crypt password hashes can be made using (for example) makepasswd --crypt-md5 or mkpasswd -H md5. The plaintextpassword is only necessary if you're using CRAM-MD5, since it requires the server to create custom hashes of the password for each login. Adding and removing accounts is simply a matter of adding or deleting lines from the file. Users must log in with the whole email address as their username.
- 19,826