Bug 54677 - deliver-wrapper is out of date w.r.t deliver
deliver-wrapper is out of date w.r.t deliver
Product: Red Hat Powertools
Classification: Retired
Component: cyrus-imapd (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Nalin Dahyabhai
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2001-10-15 23:52 EDT by Bryan O'Sullivan
Modified: 2007-04-18 12:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-05-16 12:50:57 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 Bryan O'Sullivan 2001-10-15 23:52:01 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.9-ac17 i686)

Description of problem:
The deliver-wrapper program that Red Hat bundles with its cyrus-imapd
package seems to have been written some time in 1998 or 1999, and not
maintained since then.  As far as I can tell from looking at the source, it
simply cannot work at all with recent versions of the Cyrus deliver

The problem is that deliver-wrapper doesn't pass the correct flags or
mailbox name to deliver. The result, at least on my system, is that mail
passed through deliver-wrapper simply vanishes without any error messages
showing up in any logs.

I'm using sendmail as my MTA, with mail configured to be delivered through
procmail, which in its turn invokes deliver-wrapper.  There's an added
wrinkly with this, too: if you want to deliver to any mailbox other than
INBOX, that mailbox must have an ACL set on it so that the anonymous user
can post to it, otherwise the mail will just show up in the INBOX.  (This
isn't documented anywhere.)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Simply take an RFC822 message, pop it into a file, and run "deliver-wrapper
user.INBOX < file".  You'll find that the message doesn't get delivered,
not matter what steps you try to take.

Actual Results:  Mail vanishes, no error messages, no output.

Expected Results:  Mail gets delivered.

Additional info:

Here's a rewrite of deliver-wrapper that actually works. The formatting is
probably messed up by the Web form submission.

#include <stdio.h>
#include <unistd.h>
#include <pwd.h>
#include <sys/types.h>
int main(int argc, char *argv[])
  char *const envp[] = { NULL };
  uid_t uid = getuid();
  struct passwd *ent = getpwuid(uid);

  if (ent == NULL)
      fprintf(stderr, "Trouble: getpwuid didn't find uid %d\n", uid);
      return 71; /* EX_OSERR */
  if (ent->pw_name == NULL || ent->pw_name[0] == '\0')
      fprintf(stderr, "Trouble: user name for uid %d is empty\n", uid);
      return 71; /* EX_OSERR */
  if (argc != 2)
      fprintf(stderr, "Usage: %s mailbox\n", argv[0]);
      return 64; /* EX_USAGE */
  execle("/usr/cyrus/bin/deliver", "deliver", "-e",
	 "-a", ent->pw_name, "-m", argv[1], ent->pw_name,
	 NULL, envp);

  perror("exec /usr/cyrus/bin/deliver");           
  return 71; /* EX_OSERR */
Comment 1 David Lawrence 2003-05-16 12:50:57 EDT
Closing as WONTFIX due to end of life of the Power Tools product line. Please
open a new bug report under the Red Hat Linux product if the component is still
included in the base Red Hat distribution.

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