Bug 146868

Summary: Request for exim to use procmail (when available) like sendmail does
Product: [Fedora] Fedora Reporter: Steven Whitehouse <steve>
Component: eximAssignee: David Woodhouse <dwmw2>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: mattdm, swhiteho
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-04 02:54:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steven Whitehouse 2005-02-02 10:24:06 UTC
Description of problem:
The FC3 sendmail default config uses procmail as a local delivery
agent. Exim doesn't do this and thus I'm suggesting that something
like the following should be added to the exim config so that it will
use procmail if its available. You might feel that this is more of
an enhancement request, but I've filed it as a bug on the principle
of least surprise.

# Add to the routers just before the existing localuser router:
procmail:
  driver = accept
  check_local_user
  require_files = +${home}/.procmailrc:+/usr/bin/procmail
  no_verify
  no_expn
  transport = procmail_transport

# Since the above checks for the existance of procmail, it will
# fail back to the original behaviour in case of procmail not
# being installed

# Add to the list of transports
procmail_transport:
  driver = pipe
  command = "/usr/bin/procmail -d $local_part"
  return_path_add
  delivery_date_add
  envelope_to_add
  check_string = "From "
  escape_string = ">From "
  user = $local_part
  group = $local_part
  return_output

# I think the above is ok from a security point of view, but I
# suggest someone checks what I've suggested here carefully
# anyway.

Comment 1 Matthew Miller 2006-07-10 22:37:34 UTC
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!


Comment 2 Steve Whitehouse 2006-07-11 07:41:59 UTC
It isn't a security issue. Its an issue that it would be nice if when you swap
between sendmail & exim the two exhibit the same behaviour (by default). Its
just a matter of adding the above to the exim default config file so that it
will automatically run procmail for those who have a .procmailrc installed.

Note that because of the way that this config is written, if the person doesn't
have a .procmailrc or procmail isn't installed, this will be ignored and the
previous (current behaviour) mail delivery method will continue as normal.

This is actually a cut & paste from my exim config file, and its been working
for me for the last few years with no trouble.

Comment 3 Thomas Woerner 2006-07-11 10:05:39 UTC
I am sorry, but exim is not part of Fedora Core 5 - assigning to Fedora Extras.

Comment 4 David Woodhouse 2006-07-11 10:37:37 UTC
Seems sane enough, although people really ought to be encouraged to use Exim
filters instead of procmail. File a tested patch against
exim/src/configure.default and I'll look at adding it. Please check that mails
with  'From ' at the beginning of a line of the _body_ are handled correctly.

From foo

Comment 5 David Woodhouse 2006-09-04 02:54:22 UTC
Added in 4.63-2.

The ^From escaping seems to behave incorrectly, so I've removed it.

Comment 6 Chris Jones 2006-09-28 14:25:44 UTC
require_files = +${home}/.procmailrc:+/usr/bin/procmail

should be replaced with 

# emulate OR with "if exists"-expansion
require_files = ${local_part}:\
                  ${if exists{/etc/procmailrc}\
                    {/etc/procmailrc}{${home}/.procmailrc}}:\
                  +/usr/bin/procmail

To enable use of a system procmailrc (shamelessly stolen from the debian exim
configs)