diff options
| author | manuel <manuel@mausz.at> | 2013-02-04 02:32:40 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2013-02-04 02:32:40 +0100 |
| commit | 8514473287c9594137c6fbc39f5619672ebc2430 (patch) | |
| tree | a5b965d8c7b60dee396bf8ebe25dd3eddfaa6753 /README.starttls | |
| parent | 35ddb916045abafaa4ae2c778b9383059fa06726 (diff) | |
| download | qmail-8514473287c9594137c6fbc39f5619672ebc2430.tar.gz qmail-8514473287c9594137c6fbc39f5619672ebc2430.tar.bz2 qmail-8514473287c9594137c6fbc39f5619672ebc2430.zip | |
[PATCH] qregex-starttls-2way-auth-20060423-mm
Diffstat (limited to 'README.starttls')
| -rw-r--r-- | README.starttls | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/README.starttls b/README.starttls new file mode 100644 index 0000000..0286632 --- /dev/null +++ b/README.starttls | |||
| @@ -0,0 +1,103 @@ | |||
| 1 | Frederik Vermeulen <qmail-tls akrul inoa.net> 20060104 | ||
| 2 | http://inoa.net/qmail-tls/ | ||
| 3 | |||
| 4 | This patch implements RFC 3207 (was RFC 2487) in qmail. | ||
| 5 | This means you can get SSL or TLS encrypted and | ||
| 6 | authenticated SMTP between the MTAs and from MUA to MTA. | ||
| 7 | The code is considered experimental (but has worked for | ||
| 8 | many since its first release on 1999-03-21). | ||
| 9 | |||
| 10 | Usage: - install OpenSSL-0.9.8 http://www.openssl.org/ | ||
| 11 | (any 0.9.6 to 0.9.8 version is presumed to work) | ||
| 12 | - apply patch to netqmail-1.05 http://qmail.org/netqmail | ||
| 13 | (should work on qmail-1.03 too). The patches to | ||
| 14 | qmail-remote.c and qmail-smtpd.c can be applied separately. | ||
| 15 | - provide a server certificate in /var/qmail/control/servercert.pem. | ||
| 16 | "make cert" makes a self-signed certificate. | ||
| 17 | "make cert-req" makes a certificate request. | ||
| 18 | Note: you can add the CA certificate and intermediate | ||
| 19 | certs to the end of servercert.pem. | ||
| 20 | - replace qmail-smtpd and/or qmail-remote binary | ||
| 21 | - verify operation (header information should show | ||
| 22 | something like | ||
| 23 | "Received [..] with (DHE-RSA-AES256-SHA encrypted) SMTP;") | ||
| 24 | If you don't have a server to test with, you can test | ||
| 25 | by sending mail to tag-ping@tbs-internet.com, | ||
| 26 | which will bounce your mail. | ||
| 27 | |||
| 28 | Optional: - when DEBUG is defined, some extra TLS info will be logged | ||
| 29 | - qmail-remote will authenticate with the certificate in | ||
| 30 | /var/qmail/control/clientcert.pem. By preference this is | ||
| 31 | the same as servercert.pem, where nsCertType should be | ||
| 32 | == server,client or be a generic certificate (no usage specified). | ||
| 33 | - when a 512 bit RSA key is provided in /var/qmail/control/rsa512.pem, | ||
| 34 | this key will be used instead of (slow) on-the-fly generation by | ||
| 35 | qmail-smtpd. Idem for 512 and 1024 DH params in control/dh512.pem | ||
| 36 | and control/dh1024.pem. `make tmprsadh` does this. | ||
| 37 | Periodical replacement can be done by crontab: | ||
| 38 | 01 01 * * * /var/qmail/bin/update_tmprsadh > /dev/null 2>&1 | ||
| 39 | - server authentication: | ||
| 40 | qmail-remote requires authentication from servers for which | ||
| 41 | /var/qmail/control/tlshosts/host.dom.ain.pem exists. | ||
| 42 | The .pem file contains the validating CA certificates | ||
| 43 | (or self-signed server certificate). CommonName has to match. | ||
| 44 | WARNING: this option may cause mail to be delayed, bounced, | ||
| 45 | doublebounced, and lost. | ||
| 46 | If /var/qmail/control/tlshosts/exhaustivelist is present, | ||
| 47 | the lists of hosts in /var/qmail/control/tlshosts is | ||
| 48 | an exhaustive list of hosts TLS is tried on. | ||
| 49 | If /var/qmail/control/notlshosts/host.dom.ain is present, | ||
| 50 | no TLS is tried on this host. | ||
| 51 | - client authentication: | ||
| 52 | when relay rules would reject an incoming mail, | ||
| 53 | qmail-smtpd can allow the mail based on a presented cert. | ||
| 54 | Certs are verified against a CA list in | ||
| 55 | /var/qmail/control/clientca.pem (eg. http://www.modssl.org/ | ||
| 56 | source/cvs/exp/mod_ssl/pkg.mod_ssl/pkg.sslcfg/ca-bundle.crt) | ||
| 57 | and the cert email-address has to match a line in | ||
| 58 | /var/qmail/control/tlsclients. This email-address is logged | ||
| 59 | in the headers. CRLs can be provided through | ||
| 60 | /var/qmail/control/clientcrl.pem. | ||
| 61 | - cipher selection: | ||
| 62 | qmail-remote: | ||
| 63 | openssl cipher string (`man ciphers`) read from | ||
| 64 | /var/qmail/control/tlsclientciphers | ||
| 65 | qmail-smtpd: | ||
| 66 | openssl cipher string read from TLSCIPHERS environment variable | ||
| 67 | (can vary based on client IP address e.g.) | ||
| 68 | or if that is not available /var/qmail/control/tlsserverciphers | ||
| 69 | - smtps (deprecated SMTP over TLS via port 465): | ||
| 70 | qmail-remote: when connecting to port 465 | ||
| 71 | qmail-smtpd: when SMTPS environment variable is not empty | ||
| 72 | |||
| 73 | Caveats: - do a `make clean` after patching | ||
| 74 | - binaries dynamically linked with current openssl versions need | ||
| 75 | recompilation when the shared openssl libs are upgraded. | ||
| 76 | - this patch could conflict with other patches (notably those | ||
| 77 | replacing \n with \r\n, which is a bad idea on encrypted links). | ||
| 78 | - some broken servers have a problem with TLSv1 compatibility. | ||
| 79 | Uncomment the line where we set the SSL_OP_NO_TLSv1 option. | ||
| 80 | - needs working /dev/urandom (or EGD for openssl versions >0.9.7) | ||
| 81 | for seeding random number generator. | ||
| 82 | - packagers should make sure that installing without a valid | ||
| 83 | servercert is impossible | ||
| 84 | - when applied in combination with AUTH patch, AUTH patch | ||
| 85 | should be applied first and first part of this patch | ||
| 86 | will fail. This error can be ignored. Packagers should | ||
| 87 | cut the first 12 lines of this patch to make a happy | ||
| 88 | patch | ||
| 89 | - `make tmprsadh` is recommended (or should I say required), | ||
| 90 | otherwise DH generation can be unpredictably slow | ||
| 91 | - some need "-I/usr/kerberos/include" to be added in conf-cc | ||
| 92 | |||
| 93 | Copyright: GPL | ||
| 94 | Links with OpenSSL | ||
| 95 | Inspiration and code from examples in SSLeay (E. Young | ||
| 96 | <eay@cryptsoft.com> and T. Hudson <tjh@cryptsoft.com>), | ||
| 97 | stunnel (M. Trojnara <mtrojnar@ddc.daewoo.com.pl>), | ||
| 98 | Postfix/TLS (L. Jaenicke <Lutz.Jaenicke@aet.tu-cottbus.de>), | ||
| 99 | modssl (R. Engelschall <rse@engelschall.com>), | ||
| 100 | openssl examples of E. Rescorla <ekr@rtfm.com>. | ||
| 101 | |||
| 102 | Bug reports: mailto:<qmail-tls akrul inoa.net> | ||
| 103 | |||
