mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Merge pull request #240 from tomav/issue-230
Fixed #230 adding postifx configuration. Also added tests.
This commit is contained in:
commit
354c396068
1
Makefile
1
Makefile
|
@ -62,6 +62,7 @@ fixtures:
|
|||
docker exec mail /bin/sh -c "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/existing-alias-external.txt"
|
||||
docker exec mail /bin/sh -c "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/existing-alias-local.txt"
|
||||
docker exec mail /bin/sh -c "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/existing-user.txt"
|
||||
docker exec mail /bin/sh -c "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/existing-user-and-cc-local-alias.txt"
|
||||
docker exec mail /bin/sh -c "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/existing-regexp-alias-external.txt"
|
||||
docker exec mail /bin/sh -c "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/existing-regexp-alias-local.txt"
|
||||
docker exec mail /bin/sh -c "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/sieve-spam-folder.txt"
|
||||
|
|
|
@ -49,6 +49,7 @@ smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject
|
|||
smtpd_sasl_auth_enable = yes
|
||||
smtpd_sasl_path = /var/spool/postfix/private/auth
|
||||
smtpd_sasl_type = dovecot
|
||||
dovecot_destination_recipient_limit = 1
|
||||
|
||||
smtpd_sasl_security_options = noanonymous
|
||||
smtpd_sasl_local_domain = $myhostname
|
||||
|
|
|
@ -3,7 +3,7 @@ MAIL FROM: user@external.tld
|
|||
RCPT TO: alias2@localhost.localdomain
|
||||
DATA
|
||||
From: Docker Mail Server <dockermailserver@external.tld>
|
||||
To: Existing Local User <alias2@localhost.localdomain>
|
||||
To: Existing Local Alias <alias2@localhost.localdomain>
|
||||
Date: Sat, 22 May 2010 07:43:25 -0400
|
||||
Subject: Test Message
|
||||
This is a test mail.
|
||||
|
|
13
test/email-templates/existing-user-and-cc-local-alias.txt
Normal file
13
test/email-templates/existing-user-and-cc-local-alias.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
HELO mail.external.tld
|
||||
MAIL FROM: user@external.tld
|
||||
RCPT TO: user1@localhost.localdomain
|
||||
DATA
|
||||
From: Docker Mail Server <dockermailserver@external.tld>
|
||||
To: Existing Local User <user1@localhost.localdomain>
|
||||
Cc: Existing Local Alias <alias2@localhost.localdomain>
|
||||
Date: Sat, 22 May 2010 07:43:25 -0400
|
||||
Subject: Test Message
|
||||
This is a test mail.
|
||||
|
||||
.
|
||||
QUIT
|
|
@ -131,7 +131,7 @@
|
|||
@test "checking smtp: delivers mail to existing account" {
|
||||
run docker exec mail /bin/sh -c "grep 'status=sent (delivered via dovecot service)' /var/log/mail/mail.log | wc -l"
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$output" -eq 4 ]
|
||||
[ "$output" -eq 5 ]
|
||||
}
|
||||
|
||||
@test "checking smtp: delivers mail to existing alias" {
|
||||
|
@ -149,7 +149,7 @@
|
|||
@test "checking smtp: user1 should have received 3 mails" {
|
||||
run docker exec mail /bin/sh -c "ls -A /var/mail/localhost.localdomain/user1/new | wc -l"
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$output" = 3 ]
|
||||
[ "$output" = 4 ]
|
||||
}
|
||||
|
||||
@test "checking smtp: rejects mail to unknown user" {
|
||||
|
@ -427,6 +427,8 @@
|
|||
@test "checking system: /var/log/mail/mail.log is error free" {
|
||||
run docker exec mail grep 'non-null host address bits in' /var/log/mail/mail.log
|
||||
[ "$status" -eq 1 ]
|
||||
run docker exec mail grep 'mail system configuration error' /var/log/mail/mail.log
|
||||
[ "$status" -eq 1 ]
|
||||
run docker exec mail grep ': error:' /var/log/mail/mail.log
|
||||
[ "$status" -eq 1 ]
|
||||
run docker exec mail_pop3 grep 'non-null host address bits in' /var/log/mail/mail.log
|
||||
|
|
Loading…
Reference in a new issue