Some years ago a set up my mail system with SMTP authentication, the credentials for sending and receiving E-Mails could be different. I had a special list for SMTP auth with username:password.
I think it is too secure and it makes me too much work to document all this passwords
You can access the Courier authdaemon from an Exim authenticator. That means you have only one password.
Cerate a new auth acl in:
1 | vim /etc/exim4/conf.d/auth/10_courier_auth |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | AUTHDAEMON_SOCKET = /var/run/courier/authdaemon/socket # LOGIN authenticator login: driver = plaintext public_name = LOGIN server_prompts = Username:: : Password:: server_condition = ${extract {address} {${readsocket{AUTHDAEMON_SOCKET} \ {AUTH ${strlen:exim\nlogin\n$1\n$2\n}\nexim\nlogin\n$1\n$2\n} }} {yes} fail} server_set_id = $1 # PLAIN authenticator plain: driver = plaintext public_name = PLAIN server_prompts = : server_condition = ${extract {address} {${readsocket{AUTHDAEMON_SOCKET} \ {AUTH ${strlen:exim\nlogin\n$2\n$3\n}\nexim\nlogin\n$2\n$3\n} }} {yes} fail} server_set_id = $2 |
If you try to send a mail you will see a error in your exim mainlog:
1 | 2011-04-06 11:18:42 plain authenticator failed for hexa.debianuser.org ([192.168.3.118]) [46.4.33.19]: 435 Unable to authenticate at present (set_id=my-username): failed to connect to socket /var/run/courier/authdaemon/socket: Permission denied |
Fix it by adding exim to daemon group:
1 | usermod -a -G daemon Debian-exim |
This idea comes from debian-wiki
Leave a Reply