I'm using procedurally-generated alias files from a database, and
distributing them with puppet, and would like to have postalias check the
files for duplicate entries and/or other errors before I install them.
I'd like to use the same program used to install the DB, rather than
hacking a validator together with perl or something.
As an example, an empty left-hand
would be an error I want to catch. I want to catch duplicate items, as
well. I'd rather not parse stderr for this.
There seem to be two obvious missing features:
First, the ability to not output a file, but just parse the existing one.
Second, the abiity to generate errors (as in, exit code errors) rather
than warnings. This could be added to postfix without changing existing
Is there any good way that people would recommend parsing alias and map
files? The closest I've come would be counting the number of lines of
output to stderr, rather than looking at exit code, but that still seems
Perhaps this is best for the manpage: what errors *will* cause actual
non-zero exit codes?
On Thu, Jun 27, 2019 at 05:39:14PM -0700, Dan Mahoney (Gushi) wrote:
> Is there any good way that people would recommend parsing alias and map
> files? The closest I've come would be counting the number of lines of
> output to stderr, rather than looking at exit code, but that still seems