Circa 2001-Apr-20 23:38:55 +0200 dixit Gary Colman:
: Does exim have the facility, or if not (I couldn't find
: anything in the docs), does anyone have a script to
: parse an aliases file (lsearch-type flat text file)
: to test that it isn't blatantly broken (ie. test what can
: be tested)?
Some time ago i wrote a program, 'aliases2cdbm', to convert a flat
aliases file into input suitable for cdbmake[*]:
http://www.jmknoble.cx/software/aliases2cdbm/
http://www.ntrnet.net/~jmknoble/software/aliases2cdbm/
A side effect of aliases2cdbm is that it emits warnings about badly
formed lines in the input file. It could conceivably be used as an
aliases file format tester by sending its output to /dev/null:
$ aliases2cdbm ./aliases.warnings >/dev/null
./aliases.warnings:13: error: whitespace at beginning of line
./aliases.warnings:17: error: empty value for key `blah'
./aliases.warnings:18: error: empty key
./aliases.warnings:37: error: premature end of line
./aliases.warnings:65: error: empty key
./aliases.warnings:69: error: whitespace at beginning of line
./aliases.warnings:79: error: whitespace at beginning of line
./aliases.warnings:84: warning: no newline at end of file
$ echo $?
1
$
________________
[*] A utility shipped with D. J. Bernstein's implementation of CDB.
http://cr.yp.to/cdb.html
--
jim knoble | jmknoble@??? |
http://www.jmknoble.cx/
(GnuPG fingerprint: 31C4:8AAC:F24E:A70C:4000::BBF4:289F:EAA8:1381:1491)