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


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

Thank you in advance!

  • 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? – user193597 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 '15 at 16:38

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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