# ACL checks after DATA
#
# Syntax OK, non-null sender => should be accepted
exim -odq -bs
helo test
mail from:<x@y>
rcpt to:<x@y>
data
Message 1
.
quit
****
# Syntax error in header => should fail
exim -odq -bs
helo test
mail from:<x@y>
rcpt to:<x@y>
data
From: @

Message 2
.
quit
****
# Syntax error (version 2) in header => should fail
exim -odq -bs
helo test
mail from:<x@y>
rcpt to:<x@y>
data
To: <dummy@gmail.com
Subject: incomprehensible
From: <forged@sender.com

Message 2a
.
quit
****
# Syntax error in header => should fail even with null sender
exim -odq -bs
helo test
mail from:<>
rcpt to:<x@y>
data
From: <x@y>, @

Message 3
.
quit
****
# Null sender, invalid sender in header => fail
exim -odq -bs
helo test
mail from:<>
rcpt to:<x@y>
data
From: <x@y>

Message 4
.
quit
****
# Null sender, valid sender in header => accept
exim -odq -bs
helo test
mail from:<>
rcpt to:<x@y>
data
From: <postmaster@test.ex>
Reply-to:<x@y>

Message 5
.
quit
****
# Syntax OK, non-null sender, but bad data => reject
exim -odq -bs
helo test
mail from:<x@y>
rcpt to:<x@y>
data
Message 6 contains trigger word
.
quit
****
# Syntax OK, non-null sender, good data
exim -odi -bs
helo test
mail from:<x@y>
rcpt to:<userx@test.ex>
data
Message 7
.
quit
****
# -bh test: Syntax error in header => should fail
exim -bh 10.0.0.0
helo test
mail from:<x@y>
rcpt to:<x@y>
data
From: @

Message 8
.
quit
****
# -bh test: Syntax OK, non-null sender, but bad data => reject
exim -bh 10.0.0.0
helo test
mail from:<x@y>
rcpt to:<x@y>
data
Message 9 contains trigger word
.
quit
****
# Group syntax in reply-to header
exim -odi -bs
helo test
mail from:<x@y>
rcpt to:<userx@test.ex>
data
to: group name: x@y, p@q;
reply-to: group name: a@b, c@d;

Message 10
.
quit
****
# Group syntax in reply-to header, but no address (falls back to From: for
# header_sender check - From: is valid)
exim -odi -bs
helo test
mail from:<>
rcpt to:<userx@test.ex>
data
to: group name: x@y, p@q;
reply-to: group name:;
from: userx@test.ex

Message 11
.
quit
****
# Group syntax in reply-to header, but no address (falls back to From: for
# header_sender check - but there is no From:)
exim -odi -bs
helo test
mail from:<>
rcpt to:<userx@test.ex>
data
to: group name: x@y, p@q;
reply-to: group name:;

Message 12
.
quit
****
no_msglog_check
