Pitfalls

  • Avoid accidentally creating an empty-looking line (one that contains only invisible space and tab characters) in the sendmail.cf file when you really intend to create a blank line (one that contains only the newline character). The empty-looking line is joined by sendmail to the line above it and is likely to cause mysterious problems that are difficult to debug. One way to find such lines is to run a command such as the following, where there is a single space between the ^ and the dot:

    % grep '^ .*$' /etc/mail/sendmail.cf
  • Beginning with V8 sendmail, it is a mistake to edit your configuration file directly because that file is generated from m4 source. The correct way to change your configuration file is to edit the m4 source and generate a new configuration file from that source (see Configure with m4 on page 587).

  • Avoid the temptation to devise tools that parse the sendmail configuration file. Future versions of sendmail might dramatically change the internals of the configuration file and might obsolete your work.

  • The listening daemon and the submission msp sendmail use two different configuration files (e.g., sendmail.cf and submit.cf ). Unless you specify a specific configuration file with -C (-C on page 238), the -Am and -Ac switches (-A on page 231) determine which of the two configuration files is used.

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.