Claudio Jeker wrote:

On Fri, Aug 15, 2003 at 03:36:16PM -0500, Brian Clark wrote:


Hello List,

I have successfully implemented spamassassin on my qmail-ldap server by using a .qmail file with the text string
"|spamc |maildir ./Maildir/" in each user's home directory. Now I would like to integrate it more closely with Qmail-ldap and eliminate the .qmail files. I assumed that I could do this by setting the user's qmailDotMode to ldapwithprog and then putting a text string into the deliveryProgramPath. I tried this but got an error.



An error was encountered when trying to deliver your email.


<[EMAIL PROTECTED] <http://us.f414.mail.yahoo.com/ym/[EMAIL PROTECTED]&YY=36833&order=down&sort=date&pos=0&view=a&head=b>>:
LDAP attribute deliveryProgramPath contains illegal characters.
(LDAP-ERR #221)


The exact contents of the deliveryProgrampath that I used were:
/usr/bin/spamc |/usr/bin/maildir ./Maildir/
I also tried:
spamc |maildir ./Maildir/
Both resulted in the same error message.

Anyone know why? What is illegal about this command? Can you not include a pipe character in the deliveryProgramPath? Any suggestions on how I should do this instead?




Have a look a qmail-ldap.h the RESTRICT_PROG option is what you are looking for. You need to set it to 0 (see also check.c)




I took a look at this. It says: /* if the sanitycheck function should be less restricted for * program pathes, this means especially that most special chars * of the shell are allowed (like &, &, ;, and <,|,>) * You should know what you are doing when disallowing this */ /* 1 = restriced sanitycheck; 0 = less restriced sanitycheck */ #define RESTRICT_PROG 1

As I understand it, this means that qmail-ldap won't use a "|" or other character (as I have it currently set). However, that wouldn't explain why I wouldn't be able to put this command into a shell script and have the deliveryProgramPath set to the shell script. I tried this and it seems to be still ignoring this program. I set my deliveryProgramPath to /var/qmail/bin/callspamc.sh This is a simple script that looks like this:
#!/bin/sh
spamc |maildir ./Maildir/


Messages still get delivered, just not checked for spam. I have tried this with qmailDotMode set to both "ldapwithprog" and "both". Neither worked.

Any ideas on what is going on here? I am having trouble even troubleshooting it as I don't see any errors anywhere.

Brian!






Reply via email to