Sendmail adds X-Authentication-Warning for trusted users?

So, I've digged through tons of articles and answers to configure sendmail on Ubuntu 12.04 correctly but still my emails are being flagged with X-Authentication-Warning header by sendmail:

X-Authentication-Warning: advisor.travel: www-data set sender to [email protected] using -f

by simple console call:

echo "Test email being by sendmail" | sudo -u www-data /usr/sbin/sendmail -f [email protected]

Please mind that I am not trying to configure a spam-proof setup here as everything regarding SPF, DKIM and other stuff are already in place :)

Sendmail info:

# sendmail -d0.1
Version 8.14.4
 Compiled with: DNSMAP LDAPMAP LDAP_REFERRALS LOG MAP_REGEX MATCHGECOS
        MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6 NETUNIX
        NEWDB NIS NISPLUS PIPELINING SASLv2 SCANF SOCKETMAP STARTTLS
        TCPWRAPPERS USERDB USE_LDAP_INIT XDEBUG

============ SYSTEM IDENTITY (after readcf) ============
      (short domain name) $w = advisor
  (canonical domain name) $j = advisor.travel
         (subdomain name) $m = travel
              (node name) $k = advisor.travel
========================================================

Configuration:

/etc/mail  # cat trusted-users 
www-data

/etc/mail  # cat sendmail.mc | grep use_ct_file
FEATURE(`use_ct_file')dnl

/etc/mail  # cat sendmail.cf | grep -A 5 trusted
Ft/etc/mail/trusted-users %[^\#]
Troot
Tdaemon
Tuucp

No luck, still having X-Authentication-Warning header :/

I've read in several sources that trusted users file should be enabled in submit.mc but no idea how :/


Solution 1:

Add FEATURE(use_ct_file) to submit.mc and generate new submit.cf.


Explanation:
Sendmail-8.12+ uses submit.cf to control "send an email" sendmail execution.
It has been introduced to avoid installing sendmail as set root uid (security risk).

Sendmail: Secure Install