The output that is produced by sendmail can become huge, especially when many addresses need testing. To simplify the process (and to help bulletproof your configuration file), consider using a shell script such as the following:
#!/bin/sh /usr/sbin/sendmail -bt < $1 |\ egrep "canonify.*input:|canonify.*returns|^>"
Here, the output is piped through egrep(1), which selects only the lines of interest. If this script were to be called testcf.sh, it could be invoked with the following command line:
address.list is a file consisting of
pairs of rule set names and addresses such as the following:
canonify,parse nobody@ourhost canonify,parse email@example.com canonify,parse firstname.lastname@example.org ...and so on
The output that is produced shows the input to the
canonify rule set 3 and the result of each pass
through that rule set:
> canonify input: nobody @ ourhost canonify returns: nobody < @ ourhost . domain . > > canonify input: nobody @ ourhost . domain canonify returns: nobody < @ ourhost . domain . > > canonify input: nobody @ distant . domain canonify returns: nobody < @ distant . domain . >
Note that the
address.list file should contain
every conceivable kind of address. The output from the shell script
should be saved. At a later time, after the configuration file is
changed, diff(1) can be used to see if the saved output differs from the new output (to see whether anything unexpected changed as a result of your modifications). ...