On Wed, Jan 14, 2015 at 12:58 PM, Santiago Vila <sanv...@unex.es> wrote:
> On Sun, 11 Jan 2015, Michael Grant wrote: > > > Package: procmail > > Version: 3.22-20+deb7 > > > > 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: > > > > >From smmta Sat Jan 10 18: 18:42 2015 > > > > 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/YzCb > > xAwWQuM/QPaW9D76YjkJ > > 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. > 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 u...@gmail.com < foo and have it show up at/on/in u...@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 u...@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