X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/6372d4c990f39ba6ad84a91af0a3a61a63bd50a3..68d0c019bace3e1d956ea54d4c5276b8c45b6c1d:/test/scripts/4600-SPF/4600?ds=sidebyside diff --git a/test/scripts/4600-SPF/4600 b/test/scripts/4600-SPF/4600 index d24fa9d94..55e2e0aff 100644 --- a/test/scripts/4600-SPF/4600 +++ b/test/scripts/4600-SPF/4600 @@ -1,15 +1,15 @@ # acl condition and variables # -# It is rather difficult to properly test spf. We use libspf2 to do the work, and it -# does the DNS lookups, so we cannot intercept them in the testsuite's usual fashion -# to provide values for testcases. +# The 127.0.0.1 source addr seems to be a builtin in the spf library; no dns lookup is done. +# HOSTIPV4 does get a series of lookups (see server debug output to verify that). # -# For now just check that what should be working syntax does not cause us to fall over. -# Be careful with envelope-domains and IPs used for testcases, as real DNS lookups will be done. +# The libspf2 object stack is built with an exim-specific DNS lookup base object, +# so the testsuite intercept to fakedns works. Be careful of names and addresses +# used, as nonhandled lookups are passed on to real DNS. # -exim -bd -DSERVER=server -oX PORT_D:PORT_S +exim -bd -DSERVER=server -oX PORT_D:PORT_S:PORT_D2 **** -client 127.0.0.1 PORT_D +client 127.0.0.1 PORT_S ??? 220 helo testclient ??? 250 @@ -19,7 +19,7 @@ rcpt to: ??? 250 quit **** -client 127.0.0.1 PORT_D +client HOSTIPV4 PORT_S ??? 220 helo testclient ??? 250 @@ -29,14 +29,62 @@ rcpt to: ??? 250 quit **** -client 127.0.0.1 PORT_S +client 127.0.0.1 PORT_D +??? 220 +helo testclient +??? 250 +mail from: +??? 250 +rcpt to: +??? 250 +quit +**** +client HOSTIPV4 PORT_D +??? 220 +helo testclient +??? 250 +mail from: +??? 250 +rcpt to: +??? 550 +quit +**** +client 127.0.0.1 PORT_D2 ??? 220 helo testclient ??? 250 mail from: ??? 250 rcpt to: +??? 550 +quit +**** +# +# +# +# +# +# helo name gets used when mailfrom is null +client HOSTIPV4 PORT_S +??? 220 +helo passme.helo.example.com +??? 250 +mail from:<> +??? 250 +rcpt to: +??? 250 +quit +**** +# +# helo name is overridden when a mailfrom is set +client HOSTIPV4 PORT_S +??? 220 +helo passme.helo.example.com ??? 250 +mail from: +??? 250 +rcpt to: +??? 550 quit **** #