Merge pull request #210 from Crafter6432/SHA512

switch to SHA512
This commit is contained in:
Thomas VIAL 2016-06-14 18:03:39 +02:00 committed by GitHub
commit 0df999bbfd
6 changed files with 3 additions and 38 deletions

View file

@ -11,8 +11,8 @@ build:
docker build -t $(NAME) . docker build -t $(NAME) .
generate-accounts: 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=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 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 SHA512-CRYPT -u $$MAIL_USER -p $$MAIL_PASS)"' >> test/config/postfix-accounts.cf
run: run:
# Run containers # Run containers

View file

@ -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_USER=user1@domain.tld \
-e MAIL_PASS=mypassword \ -e MAIL_PASS=mypassword \
-ti tvial/docker-mailserver:latest \ -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 #### Generate DKIM keys

View file

@ -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

View file

@ -1,2 +0,0 @@
user1@localhost.localdomain|{CRAM-MD5}de5924752ad74e36bc271a8dc7fad4b2d341f21f05382f20dedf1fdfbd5a1717
user2@otherdomain.tld|{CRAM-MD5}de5924752ad74e36bc271a8dc7fad4b2d341f21f05382f20dedf1fdfbd5a1717

View file

@ -1,2 +0,0 @@
user1@localhost.localdomain|{CRAM-MD5}de5924752ad74e36bc271a8dc7fad4b2d341f21f05382f20dedf1fdfbd5a1717
user2@otherdomain.tld|{CRAM-MD5}de5924752ad74e36bc271a8dc7fad4b2d341f21f05382f20dedf1fdfbd5a1717

View file

@ -180,11 +180,6 @@
# accounts # accounts
# #
@test "checking accounts: generated 'postfix-accounts.cf' matches template" {
run diff test/config/example.postfix-accounts.cf test/config/postfix-accounts.cf
[ "$status" -eq 0 ]
}
@test "checking accounts: user accounts" { @test "checking accounts: user accounts" {
run docker exec mail doveadm user '*' run docker exec mail doveadm user '*'
[ "$status" -eq 0 ] [ "$status" -eq 0 ]