smtp-auth + qmail-tls (starttls) + forcetls patch for qmail
I have put into a package the latest version of the following patches for netqmail-1.06. You may be interested to the combined patch I have put together here.
qmail-smtp
- Author: Erwin Hoffmann (updates the previous work of Krysztof Dabrowski and Bjoern Kalkbrenner)
- Released on 2013.02.02
- Version 0.7.6
- Info: http://www.fehcom.de/qmail/smtpauth.html
- README.auth
Provides cram-md5, login, plain authentication support.
qmail-tls
- Author: Frederik Vermeulen
- Info: http://inoa.net/qmail-tls/
- Version 20110119
Implements SSL or TLS encrypted and authenticated SMTP between the MTAs and from MUA to MTA.
force-tls
- Author: Roberto Puzzanghera
- Download original
- Version: 2012.10.28
Optionally gets qmail to require TLS before authentication to improve security.
Usage
wget http://notes.sagredo.eu/sites/notes.sagredo.eu/files/qmail/roberto-netqmail-1.06_auth_tls_force-tls.patch-xxxx.xx.xx wget http://qmail.org/netqmail-1.06.tar.gz tar xzf netqmail-1.06.tar.gz cd netqmail-1.06 chown -R root.root . patch < ../roberto-netqmail-1.06_auth_tls_force-tls.patch-2012.10.28 make make setup check
Forcing STARTTLS
By default the authentication will be denied if the client does not provide the STARTTLS command. If you want to allow connections without TLS, just do
export FORCETLS=0
in your run file. Values different from 0 or no declaration at all will force the TLS before the auth.
Managing auth options
You may want to take a look to the README.auth file expecially if you are planning to enable CRAM-MD5 auth.
Be aware that you have to export SMTPAUTH in you run file.


Comments
Forcetls Question
HI
I have question about forcetls patch:
If forcetls is active, why not offer authentication server in an unencrypted connection?
Auth TLS not available without a password, and so it was sent in clear text, when you try to AUTH PLAIN authentication.
Is this a correct and meaningful?
The correct solution - gmail.com:
The server does not provide authorization for connection without encryption:
No attempt was made AUTH PLAIN authentication, the password is safe.
Is such a solution is correct? Does it make sense?
In my opinion gmail has the correct solution to prevent sending an unencrypted password in the AUTH PLAIN.
Can you make a patch forcetls similar change in the future?
Cheers
I have adjusted the force-tls
I have adjusted the force-tls patch accordingly. Now the program simply does an exit instead of a return if STARTTLS is not provided when required.
Yes, I agree.
Yes, I agree. This is a point where the patch deserves some improvement. I'll fix it when I have some time.
Thanks a lot for the contribution.