Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Having trouble to use preline command with Qmail's mail filtering.

When i use next syntax in .qmail-default file:

| /var/qmail/bin/preline /usr/bin/maildrop /etc/mail/mailfilter

... I get following error:

preline: usage: preline cmd [ arg ... ]

Just to mention that upper line is content of the file

/home/vpopmail/domains/mydomain.com/.qmail-default

Can you tell me what I'm doing wrong with this, and how to use preline command in this case?

Thank you in advance!

share|improve this question
    
Your .qmail* file should have a pipe character at the beginning of the line, which you didn't show here, but it looks like preline is being run, so that's probably not the actual problem. Still it would be nice to see the real unaltered .qmail-default. If the problem isn't there, we'll need to know some of the surrounding context. Is /home/vpopmail/domains/mydomain.com the home directory of some user? Presumably with a virtualdomains mapping? –  Wumpus Q. Wumbley Dec 22 '13 at 2:58
    
sorry, i forgot to add pipe in my primary post, and .qmail-default looks like in my primary post –  user48058 Dec 22 '13 at 9:30
    
directory /home/vpopmail/domains/mydomain.com is not home dir of some user –  user48058 Dec 22 '13 at 9:34
    
A good way to debug such problems is to attach an strace -ff -s200 -o /tmp/qmail.log to the qmail-lspawn process, then attempt a delivery. The strace log should show you how preline is actually called or how it fails (maybe the error message is misleading). –  András Korn Sep 2 '14 at 21:35
1  
@Danijel, just press CTRL-C to stop strace (and thus deattach it from the process it is tracing). You can give strace the PID of the qmail-lspawn process to attach to using the -p switch; see man strace. –  András Korn Mar 24 at 16:38

1 Answer 1

This happend to me after uprgading/recompiling qmail The fix is, recompile vpopmail ;)

share|improve this answer
    
Please accept the answer. –  Danijel Mar 23 at 14:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.