#775071 Please add user "smmta" to TRUSTED_IDS list

Package:
procmail
Source:
procmail
Description:
Versatile e-mail processor
Submitter:
Michael Grant
Date:
2015-01-15 20:57:05 UTC
Severity:
normal
#775071#5
Date:
2015-01-11 00:31:28 UTC
From:
To:
sendmail on debian runs as user 'smmta'.

Please add this user to this user to the TRUSTED_IDS list in config.h:

#define TRUSTED_IDS   {"root","daemon","uucp","mail","x400","network",\
                       "list","slist","lists","news", "smmta", 0}

Without this user in the TRUSTED_IDS list, when sendmail, running as smmta,
passes the message to procmail, an extra From line gets added to messages
which looks like this:

For reference, this was discussed on the sendmail group back in 1999:

https://groups.google.com/forum/#!searchin/comp.mail.sendmail/unix$20from$20line/comp.mail.sendmail/YzCbxAwWQuM/QPaW9D76YjkJ

#775071#10
Date:
2015-01-14 12:58:45 UTC
From:
To:
I find really hard to believe that nobody noticed about this problem
until now.

My guess is that this should probably happen only when you do things
in a certain non-standard way.

So, before making any changes, I would like to know what exactly are
you doing differently, because it is likely that by doing things in
the way everybody else does, you don't need procmail to be changed.

Thanks.

#775071#15
Date:
2015-01-15 20:55:02 UTC
From:
To:
I don't think I'm doing anything non-standard.  I use procmail as the local
delivery agent in sendmail by adding these lines to my sendmail.mc file:

FEATURE(local_procmail)
MAILER(procmail)

This is a known configuration, nothing odd about this at all.  This usage
is well documented and used ubiquitously.

I tried solving this issue by running sendmail as one of the users on this
TRUSTED_IDS list but the user 'smmta' occurs in several different places in
files which are installed in the debian sendmail package.  I concluded this
would be a 'non-standard' approach to fixing this and abandoned this.

I think nobody has noticed this because frankly, the extra >From line,
though it looks a bit odd, does not immediately cause an error for most
mailers, it's silently ignored in most cases but what it effects is that
you can't resend the message manually via:

sendmail user@gmail.com < foo

and have it show up at/on/in user@gmail.com's inbox as if .procmailrc
forwarded it there if that extraneous >from line is in the msg, otherwise
the fwd'd message comes from user@debian.example.com AS AN INCLUDED MSG.

We noticed this behavior when spamassassin spotted a false negative, marked
the message up as spam, and manual intervention was needed to dump the
message back into sendmail to then be sent back through sendmail and the
spamassassin/procmail plumbing again.

It's very clear to me that this should be fixed.  sendmail on many other
systems is run from one of these users, usually 'mail' or 'daemon'.  It's
just different that debian runs mail as 'smmta'.  It's a very minor
annoyance with rare consequences.  It should not be difficult to fix this
with a simple diff/patch file inside the package.

I tried patching procmail and this does indeed solve the issue.

Michael Grant