FEATURE(use_ct_file)

Use /etc/mail/trusted-users for a list of trusted users V8.7 and later

V6 sendmail removed the concept of trusted users (Security Features on page 173). V8.7 reintroduced trusted users, but in a form different from that used by V5 sendmail. Now, trusted users are those who can rebuild the aliases database, and who can run sendmail with the -f switch (-f on page 241) without generating an authentication warning (X-Authentication-Warning: on page 1167):

X-Authentication-Warning: host:  user  set sender to other using -f

To prevent this warning, the user should be added to a list of trusted users. Simply use this FEATURE(use_ct_file) and add user to the file /etc/mail/trusted-users (V8.10 and later) or /etc/mail/sendmail.ct (V8.9 and earlier). You declare FEATURE(use_ct_file) like this:

FEATURE(`use_ct_file')

If you want to locate the /etc/mail/trusted-users in a different place or give it a different name, you can do so with this declaration:

define(`confCT_FILE', `/etc/mail/trusted.list')

Note that the file must exist before sendmail is started, or it will complain:

fileclass: cannot open /etc/mail/trusted.list: No such file or directory

If you want the file to optionally exist, you can add a -o (The F Class Command on page 857) to the conf-CT_FILE definition:

define(`confCT_FILE', `-o /etc/mail/trusted_users')

Here, we retain the file’s default name and location, but add the -o to make the file’s presence optional.

You can also add trusted users directly in your mc configuration ...

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.