github/sourceforge merge
v2.6.1 fixes for address verifier exit 100 etc
v2.6.1
v2.6b
v2.6.1 fixes for address verifier exit 100 etc
(I shouldn't post code off the top of my head -- in the original version the dots in the address would match any character in the address, not just a literal dot. I've changed it to use an exact match.) To allow a handful of addresses you could just extend the "test" expression with "-o": if test "$ip" = "10.0.0.1" -o "$ip" = "192.168.1.1" -o ...etc... or iterate through a list: whitelist="10.0.0.1 192.168.1.1" for w in $whitelist; do test "$ip" = "$w" && allow=y; done if test "$allow" = "y" then...
Since you asked about using the address-verifier to authorise the IP address I was going to suggest a script like this (or equivalent in JScript): #!/bin/sh ip=`IFS=: ; set -- $3 ; echo $1` if test "$ip" = "10.0.0.1" then echo "" echo "$1" exit 1 else exit 100 fi Unfortunately the connection-abort feature is broken in v2.6.x -- the protocol stops but the connection persists. The alternative is to reject all recipient addresses with an error message. The remote client cannot then submit the e-mail...
Since you asked about using the address-verifier to authorise the IP address I was going to suggest a script like this (or equivalent in JScript): #!/bin/sh whitelist="10.0.0.1" if echo "$3" | grep -q "^$whitelist:" then echo "" echo "$1" exit 1 else exit 100 fi Unfortunately the connection-abort feature is broken in v2.6.x -- the protocol stops but the connection persists. The alternative is to reject all recipient addresses with an error message. The remote client cannot then submit the e-mail...