From 63fd58a7cb382f16acc0d89db27381bc02d90b6a Mon Sep 17 00:00:00 2001 From: shim_ Date: Tue, 14 Jun 2016 13:00:51 +0200 Subject: [PATCH] switch to SHA512 --- Makefile | 4 ++-- README.md | 2 +- test/auth/smtp-auth-cram-md5.txt | 26 ------------------------- test/config/example.postfix-accounts.cf | 4 ++-- test/config/postfix-accounts.cf | 4 ++-- 5 files changed, 7 insertions(+), 33 deletions(-) delete mode 100644 test/auth/smtp-auth-cram-md5.txt diff --git a/Makefile b/Makefile index b5625348..c1110515 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,8 @@ build: docker build -t $(NAME) . generate-accounts: - docker run --rm -e MAIL_USER=user1@localhost.localdomain -e MAIL_PASS=mypassword -t $(NAME) /bin/sh -c 'echo "$$MAIL_USER|$$(doveadm pw -s CRAM-MD5 -u $$MAIL_USER -p $$MAIL_PASS)"' > test/config/postfix-accounts.cf - docker run --rm -e MAIL_USER=user2@otherdomain.tld -e MAIL_PASS=mypassword -t $(NAME) /bin/sh -c 'echo "$$MAIL_USER|$$(doveadm pw -s CRAM-MD5 -u $$MAIL_USER -p $$MAIL_PASS)"' >> test/config/postfix-accounts.cf + docker run --rm -e MAIL_USER=user1@localhost.localdomain -e MAIL_PASS=mypassword -t $(NAME) /bin/sh -c 'echo "$$MAIL_USER|$$(doveadm pw -s SHA512-CRYPT -u $$MAIL_USER -p $$MAIL_PASS)"' > test/config/postfix-accounts.cf + docker run --rm -e MAIL_USER=user2@otherdomain.tld -e MAIL_PASS=mypassword -t $(NAME) /bin/sh -c 'echo "$$MAIL_USER|$$(doveadm pw -s SHA512-CRYPT -u $$MAIL_USER -p $$MAIL_PASS)"' >> test/config/postfix-accounts.cf run: # Run containers diff --git a/README.md b/README.md index baff8314..efca5c0e 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ Don't forget to adapt MAIL_USER and MAIL_PASS to your needs -e MAIL_USER=user1@domain.tld \ -e MAIL_PASS=mypassword \ -ti tvial/docker-mailserver:latest \ - /bin/sh -c 'echo "$MAIL_USER|$(doveadm pw -s CRAM-MD5 -u $MAIL_USER -p $MAIL_PASS)"' >> config/postfix-accounts.cf + /bin/sh -c 'echo "$MAIL_USER|$(doveadm pw -s SHA512-CRYPT -u $MAIL_USER -p $MAIL_PASS)"' >> config/postfix-accounts.cf #### Generate DKIM keys diff --git a/test/auth/smtp-auth-cram-md5.txt b/test/auth/smtp-auth-cram-md5.txt deleted file mode 100644 index 5707eecd..00000000 --- a/test/auth/smtp-auth-cram-md5.txt +++ /dev/null @@ -1,26 +0,0 @@ -# This is the output of a manual test. -# CRAM-MD5 is not (yet) testable with telnet. -# -# # telnet localhost 25 -# Trying ::1... -# Connected to localhost. -# Escape character is '^]'. -# 220 mail.my-domain.com ESMTP Postfix (Ubuntu) -# ehlo test -# 250-mail.my-domain.com -# 250-PIPELINING -# 250-SIZE 10240000 -# 250-VRFY -# 250-ETRN -# 250-STARTTLS -# 250-AUTH PLAIN LOGIN CRAM-MD5 DIGEST-MD5 -# 250-AUTH=PLAIN LOGIN CRAM-MD5 DIGEST-MD5 -# 250-ENHANCEDSTATUSCODES -# 250-8BITMIME -# 250 DSN -# AUTH CRAM-MD5 -# 334 PDIxMDMyODkzMTMuMTA2Mzg2MjhAbWFpbC5teS1kb21haW4uY29tPg== -# dXNlcjFAbG9jYWxob3N0LmxvY2FsZG9tYWluIGJlYjUxNzg4OGE5ZWI0OGM1NjQ2MTYwZGY3NTY1ZWNh -# 235 2.7.0 Authentication successful -# QUIT -# 221 2.0.0 Bye \ No newline at end of file diff --git a/test/config/example.postfix-accounts.cf b/test/config/example.postfix-accounts.cf index 200b6331..ada9b297 100644 --- a/test/config/example.postfix-accounts.cf +++ b/test/config/example.postfix-accounts.cf @@ -1,2 +1,2 @@ -user1@localhost.localdomain|{CRAM-MD5}de5924752ad74e36bc271a8dc7fad4b2d341f21f05382f20dedf1fdfbd5a1717 -user2@otherdomain.tld|{CRAM-MD5}de5924752ad74e36bc271a8dc7fad4b2d341f21f05382f20dedf1fdfbd5a1717 +user1@localhost.localdomain|{SHA512-CRYPT}$6$6Xxcp1JSbIopyWIC$LdrPrPSAdDuOZOZhaQsmuqFa8gyZ.F43Bh8vHNCd2zumwaj9DdM6v7gkMwOP0Fn4IartmPvF5CdVCzV1pdx7M1 +user2@otherdomain.tld|{SHA512-CRYPT}$6$OVDJp7HtL3U2d2c7$jxVpLBYBfNLekpsx6Ih3uAg640iGXXGPgKno8uDK31/FIL1rRf7Uh.go/xTyD5PQNsr/pOPkJb2b1QS7Ovnll0 diff --git a/test/config/postfix-accounts.cf b/test/config/postfix-accounts.cf index 200b6331..ada9b297 100644 --- a/test/config/postfix-accounts.cf +++ b/test/config/postfix-accounts.cf @@ -1,2 +1,2 @@ -user1@localhost.localdomain|{CRAM-MD5}de5924752ad74e36bc271a8dc7fad4b2d341f21f05382f20dedf1fdfbd5a1717 -user2@otherdomain.tld|{CRAM-MD5}de5924752ad74e36bc271a8dc7fad4b2d341f21f05382f20dedf1fdfbd5a1717 +user1@localhost.localdomain|{SHA512-CRYPT}$6$6Xxcp1JSbIopyWIC$LdrPrPSAdDuOZOZhaQsmuqFa8gyZ.F43Bh8vHNCd2zumwaj9DdM6v7gkMwOP0Fn4IartmPvF5CdVCzV1pdx7M1 +user2@otherdomain.tld|{SHA512-CRYPT}$6$OVDJp7HtL3U2d2c7$jxVpLBYBfNLekpsx6Ih3uAg640iGXXGPgKno8uDK31/FIL1rRf7Uh.go/xTyD5PQNsr/pOPkJb2b1QS7Ovnll0