stevejenkins/postwhite

/32 are removed as invalid

jnorell opened this issue · 3 comments

Using the most recent postwhite, all addresses listed as /32 get removed in the "invalid" cleanup, but specifying a /32 cidr is perfectly valid:

root@mail:/etc/postfix# cat /etc/postfix/test.cidr 
1.1.1.1 OK
2.2.2.2/32 OK
root@mail:/etc/postfix# postmap -q 1.1.1.1 cidr:/etc/postfix/test.cidr 
OK
root@mail:/etc/postfix# postmap -q 1.1.1.1/32 cidr:/etc/postfix/test.cidr 
root@mail:/etc/postfix# postmap -q 2.2.2.2 cidr:/etc/postfix/test.cidr 
OK
root@mail:/etc/postfix# postmap -q 2.2.2.2/32 cidr:/etc/postfix/test.cidr 
root@mail:/etc/postfix# 

Note that /32 syntax is not valid for a query argument, but it certainly is valid in the cidr table itself. (The workaround for now is to set invalid_ip4=fix or invalid_ip4=keep.)

I am experiencing the same problem with domain tn.gov when added to the custom list.

Pull request #41 fixes this problem.

Fixed in version 3.3 (#41).