2 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] xfilter - Unable to f...
FromSent OnAttachments
Pierce Forrest EnglandMar 22, 2007 8:08 pm 
moussMar 24, 2007 4:06 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] xfilter - Unable to filter messageActions...
From:mouss (mlis@free.fr)
Date:Mar 24, 2007 4:06:30 pm
List:net.sourceforge.lists.courier-maildrop

Pierce Forrest England wrote:

hunted around the archives, none of the replies seemed to help with this, so apologies if this has been answered before and I missed it.

I'm trying to get maildrop to execute a little c program when I send it an email with the subject line "Bl" from my phone:

if (/^From: 8029@VTEXT.COM/ && /^Subject: Bl/) { xfilter "/home/fengland/bin/blastgb" }

the filter is matching fine. Replacing the binary with a simple shell script echoing some output to a file works just fine, but when I try to get it to execute the binary, I get this in the maillog:

Mar 22 14:59:11 doghouse maildrop[13201]: Unable to filter message.

does the program read from stdin? what does # cat message.eml | /home/fengland/bin/blastgb say?

it will filter the message ok when putting the command in backticks and specifying a mailbox to deliver to on the next line, but the command again doesn't run. "blastgb" logs to a file, but nothing shows up there, and it doesn't do anything. I can run it just fine from the command line. my shell is /bin/bash, and SHELL=/bin/bash is specified in my .mailfilterrc as well. Maildrop is running in delivery mode via postfix with /usr/bin/maildrop -d ${USER}.

can maildrop access that binary. check the permissions of the file as well as that of all directories (/home, /home/fengland, /home/fengland/bin) and make sure that maildrop running as the uid used for delivery can access the binary.

try # /usr/bin/maildrop -V 6 -d someone < message.eml and see what it says.