Undeliverable Mail Returned to Sender (procmail-wrapper died with status 231)

12 posts / 0 new
Last post
#1 Mon, 04/18/2011 - 10:33
r0tero

Undeliverable Mail Returned to Sender (procmail-wrapper died with status 231)

Hello,

Things have been running quite smoothly using virtualmin until I updated to centOS 5.6. I got a complaint this morning about "Undelivered Mail Returned to Sender" being received by senders to domains on the system. After some testing, I noticed that the mail does go through, but the sender still gets an error back.

Here's some info from maillog: Apr 18 16:28:06 sys postfix/local[18072]: D07AD37CC42E: to=user-domain.org@sys.domain.org, orig_to=user@post.domain.org, relay=local, delay=0.57, delays=0.3/0/0/0.27, dsn=5.3.0, status=bounced (Command died with status 231: "/usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME") Apr 18 16:28:06 sys postfix/cleanup[18071]: 57D8337CC430: message-id=20110418152806.47D8327CC293@sys.domain.org Apr 18 16:28:06 sys postfix/bounce[18079]: D07AD37CC42E: sender non-delivery notification: 57D8337CC430 Apr 18 16:28:06 sys postfix/qmgr[9281]: 57D8337CC430: from=<>, size=3126, nrcpt=1 (queue active) Apr 18 16:28:06 sys postfix/qmgr[9281]: D07AD37CC42E: removed Apr 18 16:28:08 sys postfix/smtp[18080]: 57D8337CC430: to=user2@domain2.com, relay=domain2.com[123.34.52.1]:25, delay=2.4, delays=0.05/0.01/0.26/2.1, dsn=2.0.0, status=sent (250 2.0.0 OK 3203230977 r16si10319723weh.14)

It looks like the problem has to do with: Command died with status 231: "/usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME" except I'm not sure why procmail-wrapper could be having problems.

Any ideas on where to look or has anyone else experienced this?

Cheers.

Mon, 04/18/2011 - 10:36
r0tero

Just to be more clear, here's the returned error to the sender:

user-domain.org@sys.domain.org (expanded from user@mail.domain.org): Command died with status 231: "/usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME"

Final-Recipient: rfc822; user-domain.org@sys.domain.org Original-Recipient: rfc822;user@domain.org Action: failed Status: 5.3.0 Diagnostic-Code: x-unix; unknown mail system error 231

Mon, 04/18/2011 - 10:56
andreychek

Hrm, I've never heard of a "error 231" before. That's unusual :-)

Do you see any errors in the procmail log, /var/log/procmail.log?

Also, does that problem happen for all users, or just some? You may want to make sure the users in question aren't over their disk quota.

-Eric

Mon, 04/18/2011 - 11:11
r0tero

Thanks for replying!

No, it's not a quota error because the users/domains are under quota and one of the domains is unlimited. Yes, it seems to be happening for all users.

I checked procmail.log and it has: procmail: Program failure (-25) of "/etc/webmin/virtual-server/lookup-domain.pl" From user2@domain2.com Mon Apr 18 15:37:38 2011 Subject: test

Any ideas what that could be a result of?

Mon, 04/18/2011 - 11:17
andreychek

Okay, two things could cause that.

First -- what are the permissions of "/usr/bin/procmail-wrapper"? They should be "6755". You can manually set that by running this command:

chmod 6755 /usr/bin/procmail-wrapper

Also, what does your /etc/procmailrc file look like?

There should be a "DROPPRIVS=yes" line in it -- but that line should be at the end of the file, not at the beginning.

-Eric

Mon, 04/18/2011 - 11:22
r0tero

Here's the output I got:

  • ls -l /usr/bin/procmail-wrapper -rwsr-sr-x 1 root root 4994 May 10 2007 /usr/bin/procmail-wrapper

  • cat /etc/procmailrc

LOGFILE=/var/log/procmail.log
TRAP=/etc/webmin/virtual-server/procmail-logger.pl
:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME
EXITCODE=$?
:0
* ?/usr/bin/test "$EXITCODE" = "73"
/dev/null
:0
* ?/usr/bin/test "$VIRTUALMIN" != ""
{
INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
}
DEFAULT=$HOME/Maildir/
ORGMAIL=$HOME/Maildir/
DROPPRIVS=yes
:0
$DEFAULT
Mon, 04/18/2011 - 11:28
andreychek

Also, make sure that in /etc/postfix/main.cf , the mailbox_command line reads :

mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

And, what about the permissions of /usr/bin/procmail, what do those look like?

-Eric

Mon, 04/18/2011 - 11:53
r0tero

Looks good.

mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

ls -l /usr/bin/procmail -rwxr-xr-x 1 root mail 88340 Jan 2 2009 /usr/bin/procmail

Mon, 04/18/2011 - 11:57
andreychek

Try setting "/usr/bin/procmail" to be 6755 as well:

chmod 6755 /usr/bin/procmail

Mon, 04/18/2011 - 12:18
r0tero

Same problem unfortunately.

Is there a way to lookup what error code 231 could be for procmail-wrapper?

Mon, 04/18/2011 - 12:32
andreychek

I'm unfortunately not sure what procmail error code 231 is. A grep through it's source code doesn't show that number. It's possible that the error is coming from one of the other tools procmail communicates with (such as the lookup daemon).

One thing you could try is restarting the lookup-domain daemon using this:

/etc/init.d/lookup-domain restart

Mon, 04/18/2011 - 12:38
r0tero

Well, I couldn't believe I missed this earlier, but it seems that lookup-domain daemon wasn't running. Restart fixed that and seems that the errors are no longer being sent back!

Thanks a bunch for all your help!

Topic locked