procmail-wrapper: cannot execute binary file

Hi Joe/all,

I get this error when trying to have mail delivered to any of my accounts:

postfix/local[12156]: 7CC821A7AFE: to=<>, orig_to=<>, relay=local, delay=0, status=bounced (Command died with status 126: "/usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME". Command output: sh: line 1: /usr/bin/procmail-wrapper: cannot execute binary file )

I am running on an OSX Server box so looks like that causes this. Had Linux executables before and they did the same thing.


You’ll need to build procmail-wrapper on your platform–no binary for another platform will work. It’s dead easy to build, but I’m not sure how to set suid something on Mac OS X (that’s the purpose of procmail-wrapper…it grabs the configuration for the domain of the user, and then drops privileges for delivery and running user-level recipes).

Anyway, to build it:

Grab the procmail-wrapper.c from the virtual-server module directory, or from:

Build it with:

gcc -o procmail-wrapper procmail-wrapper.c

Assuming you’ve got gcc installed. setuid the resulting binary and put it in place instead of the binary you have now.

Another alternative is to run Sendmail instead of Postfix. Sendmail already calls procmail using a setuid wrapper (at least, it does on most platforms). I don’t necessarily recommend it, as I don’t like Sendmail configuration and find it unnecessarily terse in error loggin, but Virtualmin supports it just fine and once setup either mail server acts roughly identically.

Thanks for clearing this up Joe, I didn’t even check if the source was laying in the same folder. How stupid of me… doh…

Well, but it works now!! GREAT!


ps: did you get my email about the trouble I had earlier posting this? Really strange, I still can not access the post UNLESS I search for it. Otherwise it kicks me right back to the index of