Bug 146868 - Request for exim to use procmail (when available) like sendmail does
Request for exim to use procmail (when available) like sendmail does
Product: Fedora
Classification: Fedora
Component: exim (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Woodhouse
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2005-02-02 05:24 EST by Steven Whitehouse
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-09-03 22:54:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Steven Whitehouse 2005-02-02 05:24:06 EST
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:
  driver = accept
  require_files = +${home}/.procmailrc:+/usr/bin/procmail
  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
  driver = pipe
  command = "/usr/bin/procmail -d $local_part"
  check_string = "From "
  escape_string = ">From "
  user = $local_part
  group = $local_part

# 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 18:37:34 EDT
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 03:41:59 EDT
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 06:05:39 EDT
I am sorry, but exim is not part of Fedora Core 5 - assigning to Fedora Extras.
Comment 4 David Woodhouse 2006-07-11 06:37:37 EDT
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-03 22:54:22 EDT
Added in 4.63-2.

The ^From escaping seems to behave incorrectly, so I've removed it.
Comment 6 Chris Jones 2006-09-28 10:25:44 EDT
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}\

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

Note You need to log in before you can comment on or make changes to this bug.