5

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 noreply@advisor.travel using -f

by simple console call:

echo "Test email being by sendmail" | sudo -u www-data /usr/sbin/sendmail -f noreply@advisor.travel

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 :/

5

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

  • It worked! But where can I find the details about WHY should I do it? :/ – WASD42 Nov 3 '15 at 19:22
  • 1
    Sendmail command you executed to send email is controlled by submit.cf [in sendmail-8.12+] see sendmail.com/sm/open_source/security/secure-install . It seems that sendmail documentation has not been properly and throughly "synchronized" with many consequences of the above change. – AnFi Nov 3 '15 at 19:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.