O'Reilly logo

Sendmail, 3rd Edition by Bryan Costales

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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
  • Prior to V8 sendmail the maximum length of any given sendmail.cf line of text was defined in conf.h as MAXLINE. That maximum length was usually 1024 characters, which included the end-of-line character and any continuation lines. If sendmail read a line that was longer than MAXLINE, it silently truncated that line to MAXLINE-1 and terminated the result with a zero value. Note that sendmail read the entire line but ignored the excess characters. This allowed it to accurately keep track of where the next line started. V8 sendmail has no limit for line lengths.

  • Prior to V8 sendmail the last line in your sendmail.cf file had to end with a newline character. Some editors, such as emacs(1), are capable of writing a file in which the last line does not end with a newline character. If that trailing newline was missing from the last line, sendmail silently ignored it, thus treating that line as though it didn’t exist. This has been fixed in V8 sendmail.

  • Under ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required