Web linux-server.50webs.com

Linux Mail Server

Testing the m4 Configuration:

Test the new configuration using the sendmail –bt command exactly as it was used earlier in this chapter. The following listing shows a test of the linux.cf file that we built with m4 macros.


# sendmail -bt -Clinux.cf
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> /tryflags HS
> /try smtp craig
Trying header sender address craig for mailer esmtp
canonify input: craig
Canonify2 input: craig
Canonify2 returns: craig
canonify returns: craig
1 input: craig
1 returns: craig
HdrFromSMTP input: craig
PseudoToReal input: craig
PseudoToReal returns: craig
MasqSMTP input: craig
MasqSMTP returns: craig < @ *LOCAL* >
MasqHdr input: craig < @ *LOCAL* >
canonify input: Craig . Hunt @ *LOCAL*
Canonify2 input: Craig . Hunt < @ *LOCAL* >
*LOCAL*: Name server timeout
Canonify2 returns: Craig . Hunt < @ *LOCAL* <
Canonify returns: Craig . Hunt < @ *LOCAL* <
MasqHdr returns: Craig . Hunt < @ foobirds . org . >
HdrFromSMTP returns: Craig . Hunt < @ foobirds . org . >
final input: Craig . Hunt < @ foobirds . org . >
final returns: Craig . Hunt < @ foobirds . org . >
Rcode = 75, addr = Craig.Hunt@foobirds.org
> /quit

This time, when the sender address craig is processed through the Extended SMTP mailer, the address is rewritten to craig.hunt@foobirds.org using the genericstable database that we created. Again, after running several tests, copy linux.cf to /etc/sendmail.cf.

Of course, this entire configuration depends on having the m4 source files on the Linux system. If your system doesn't have the m4 source files, you can download the latest sendmail distribution from ftp://ftp.sendmail.org/, where it is stored in the pub/sendmail directory. The distribution includes a complete sendmail m4 source tree.

.