CIDR netmasks with sendmail

sendmail does not support CIDR notation in its maps.

The cidrexpand script in the contrib subdirectory of the sendmail source may be used to expand CIDR netmasks for use in sendmail databases.

Example access map:
10.                OK   OK

cidrexpand usage:
# ./cidrexpand < /etc/mail/access | makemap hash /etc/mail/access

In my environment, Net::CIDR is in @INC for /usr/local/bin/perl, not /usr/bin/perl, so I explicitly call the former interpreter when running cidrexpand.

# /usr/local/bin/perl cidrexpand < /etc/mail/access | makemap hash /etc/mail/access

Back to
Last modified: 2006/06/19