Depending on the length of the ip address, Exim adds
spaces to -bt output, to make all lines the same length (why? Maybe to
add port= or mx= later in a nicely aligned manner)
compare:
host 127.0.0.1 [127.0.0.1]
host 10.0.0.1 [10.0.0.1]-
vs:
host 127.0.0.1 [127.0.0.1]--
host 169.16.16.16 [169.16.16.10]
# Also, the length of space at the end of the host line is dependent
# on the length of the longest line, so strip it also on otherwise
# un-rewritten lines like localhost
# Also, the length of space at the end of the host line is dependent
# on the length of the longest line, so strip it also on otherwise
# un-rewritten lines like localhost
+ #
+ # host 127.0.0.1 [127.0.0.1]
+ # host 10.0.0.1 [10.0.0.1]-
+ #
+ # host 127.0.0.1 [127.0.0.1]--
+ # host 169.16.16.16 [169.16.16.10]
s/^\s+host\s(\S+)\s+(\S+)/ host $1 $2/;
s/^\s+(host\s\S+\s\S+)\s+(port=.*)/ host $1 $2/;
s/^\s+host\s(\S+)\s+(\S+)/ host $1 $2/;
s/^\s+(host\s\S+\s\S+)\s+(port=.*)/ host $1 $2/;
s/(^|\W)\K\Q$parm_ipv6_stripped\E/ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6/g;
s/\b\Q$parm_ipv4r\E\b/ip4-reverse/g;
s/(^|\W)\K\Q$parm_ipv6r\E/ip6-reverse/g;
s/(^|\W)\K\Q$parm_ipv6_stripped\E/ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6/g;
s/\b\Q$parm_ipv4r\E\b/ip4-reverse/g;
s/(^|\W)\K\Q$parm_ipv6r\E/ip6-reverse/g;
- s/^(\s+host\s\S+\s+\[\S+\]) +$/$1 /;
+ s/^\s+host\s\S+\s+\[\S+\]\K +$//; # strip, not collapse the trailing whitespace
# ======== Test network IP addresses ========
# ======== Test network IP addresses ========
userx@bdomain1
router = r3, transport = smtp2
host ipv4.ipv4.ipv4.ipv4 [ipv4.ipv4.ipv4.ipv4]
userx@bdomain1
router = r3, transport = smtp2
host ipv4.ipv4.ipv4.ipv4 [ipv4.ipv4.ipv4.ipv4]
- host 127.0.0.1 [127.0.0.1]
+ host 127.0.0.1 [127.0.0.1]
host the.local.host.name [ip4.ip4.ip4.ip4]
userx@bdomain2
router = r3, transport = smtp2
host the.local.host.name [ip4.ip4.ip4.ip4]
host the.local.host.name [ip4.ip4.ip4.ip4]
userx@bdomain2
router = r3, transport = smtp2
host the.local.host.name [ip4.ip4.ip4.ip4]
- host 127.0.0.1 [127.0.0.1]
+ host 127.0.0.1 [127.0.0.1]
host ipv4.ipv4.ipv4.ipv4 [ipv4.ipv4.ipv4.ipv4]
userx@bdomain3
router = r3, transport = smtp2
host ipv4.ipv4.ipv4.ipv4 [ipv4.ipv4.ipv4.ipv4]
host ipv4.ipv4.ipv4.ipv4 [ipv4.ipv4.ipv4.ipv4]
userx@bdomain3
router = r3, transport = smtp2
host ipv4.ipv4.ipv4.ipv4 [ipv4.ipv4.ipv4.ipv4]
- host 127.0.0.1 [127.0.0.1]
+ host 127.0.0.1 [127.0.0.1]
host the.local.host.name [ip4.ip4.ip4.ip4]
******** SERVER ********
host the.local.host.name [ip4.ip4.ip4.ip4]
******** SERVER ********
xx@yy
router = r1, transport = t1
xx@yy
router = r1, transport = t1
host other2.test.ex [V4NET.12.3.2]
host other2.test.ex [V4NET.12.3.2]
router = r1, transport = t1
host ten-1.test.ex [V4NET.0.0.1] MX=5
host eximtesthost.test.ex [ip4.ip4.ip4.ip4] MX=5
router = r1, transport = t1
host ten-1.test.ex [V4NET.0.0.1] MX=5
host eximtesthost.test.ex [ip4.ip4.ip4.ip4] MX=5
- host ten-6.test.ex [V4NET.0.0.6]
+ host ten-6.test.ex [V4NET.0.0.6]
x@manual.route is undeliverable: lowest numbered MX record points to local host
x@random.manual.route cannot be resolved at this time: lookup of host "localhost.test.ex" failed in r2 router
x@random.manual.route
x@manual.route is undeliverable: lowest numbered MX record points to local host
x@random.manual.route cannot be resolved at this time: lookup of host "localhost.test.ex" failed in r2 router
x@random.manual.route
manualroute@test.ex
router = r2, transport = smtp
host 46.test.ex [V6NET:ffff:836f:a00:a:800:200a:c031]
manualroute@test.ex
router = r2, transport = smtp
host 46.test.ex [V6NET:ffff:836f:a00:a:800:200a:c031]
- host 46.test.ex [V4NET.0.0.4]
+ host 46.test.ex [V4NET.0.0.4]
dnslookup@v6.test.ex
router = r1, transport = smtp
host v6.test.ex [V6NET:ffff:836f:a00:a:800:200a:c032]
dnslookup@v6.test.ex
router = r1, transport = smtp
host v6.test.ex [V6NET:ffff:836f:a00:a:800:200a:c032]
x@46.test.ex
router = r1, transport = t1
host 46.test.ex [V6NET:ffff:836f:a00:a:800:200a:c031]
x@46.test.ex
router = r1, transport = t1
host 46.test.ex [V6NET:ffff:836f:a00:a:800:200a:c031]
- host 46.test.ex [V4NET.0.0.4]
+ host 46.test.ex [V4NET.0.0.4]
x@mx46.test.ex
router = r1, transport = t1
host 46.test.ex [V6NET:ffff:836f:a00:a:800:200a:c031] MX=46
x@mx46.test.ex
router = r1, transport = t1
host 46.test.ex [V6NET:ffff:836f:a00:a:800:200a:c031] MX=46
host 46.test.ex [V4NET.0.0.4] MX=46
x@mx46.test.ex
router = r0, transport = t1
host 46.test.ex [V4NET.0.0.4] MX=46
x@mx46.test.ex
router = r0, transport = t1
- host 46.test.ex [V4NET.0.0.4]
+ host 46.test.ex [V4NET.0.0.4]
host 46.test.ex [V6NET:ffff:836f:a00:a:800:200a:c031]
x@mx46.test.ex
router = r0, transport = t1
host 46.test.ex [V6NET:ffff:836f:a00:a:800:200a:c031]
x@mx46.test.ex
router = r0, transport = t1
userx@other99.test.ex cannot be resolved at this time: host non-exist.test.ex not found when translating other99.test.ex [V4NET.99.0.1]
userx@other99.test.ex
router = lookuphost, transport = smtp
userx@other99.test.ex cannot be resolved at this time: host non-exist.test.ex not found when translating other99.test.ex [V4NET.99.0.1]
userx@other99.test.ex
router = lookuphost, transport = smtp
- host non-exist.test.ex [unknown]
+ host non-exist.test.ex [unknown]