"mkaccess" is a small Perl script which is designed to optimize your Sendmail Access Database.

What do you mean by "optimized"?
Some Access Databases are really simple. They list all of the IP networks and domains which are allowed to relay through your mail server. For this purpose, you probably don't even need mkaccess. However, if you have a more "complete" Access Database (using spam blocking entries), mkaccess can be a good tool to use.

I've seen many accessdbs with something like the following:

user@sub.baddom.ain
user@baddom.ain
baddom.ain
10.168.1.123
10

These three entries can be simplified down to the single "baddom.ain", and "10" entries. This is because sendmail, by default, will check down to the domain on incoming hosts and email addresses, and to the first octet on IP addresses. Therefore, the "optimized" database entries are:

baddom.ain
10

If you would like a copy of mkaccess, you can get it via one of the two following methods:

  1. HTTP - http://www.kluge.net/ftp/pub/felicity/mkaccess-1_1.gz
  2. FTP - ftp://ftp.kluge.net/pub/felicity/mkaccess-1_1.gz

History

1.1
Fixed a bug where uppercase/lowercase domains weren't matching in the right place. i.e. "Baddomain.com" and "baddomain.com" were seen as two different domains in the unduplication process, but were still handled correctly when creating the "optimized" output database file.
1.0
Initial release.