feed me

  • Subscribe with Atom
  • Subscribe with RSS
  • Find out more about feeds


mt poweredCreative Commons License



qmail. vpopmail. procmail.

March 14, 2003

qmail. vpopmail. procmail. How comes they just don't want to work together?

procmail: Program failure (100) of "/var/qmail/vpopmail/bin/vdelivermail"
[email protected] Fri Mar 14 02:12:30 2003
 Subject: test
  Folder: **Bounced**                                                       782

Anyone seen this problem before?

post tools


I just finished working on exactly this problem. It took me more than 12 hours to solve it. Non of what Google came up with worked for me.
This is my procmailrc file

###### Procmairc start ##########
# Uncomment these if you want to debug
# Find the users home directory and store in variable
VIRTUALHOME=`/var/vpopmail/bin/vuserinfo -d [email protected]$HOST`

# Location of safecat

# Location of the users Maildir

# Give each user a spamfolder where spam-tagged mail will be delivered.

# Check if the user have a spamfolder, if not, create one.
# We never use this variable, but the command will be executed, dirty dirty.
CHECKSPAMFOLDER=`if [ ! -d $SPAMDIR ]; then /var/courier-imap/bin/maildirmake $SPAMDIR && chown -R vpopmail:vchkpw $SPAMDIR && echo "INBOX.Spam >> $MAILDIR/courieimapsubscribed"; fi`

# Finally we can let SpamAssassin check our mail.
| /usr/bin/spamassassin

# If the message is tagged as spam, put it in spamfolder
* ^X-Spam-Status: Yes

# If the message is considered clean, deliver as normal.

###### Procmairc end ##########

NOTE: The CHECKSPAMFOLDER is only for squirrelmail.

In .qmail-default iI have this:
| preline /usr/bin/procmail -p -m /path/to/procmailrc

Good luck

Great Help! This file was exactly what I have spent ages looking for!

Have you had problems with the qmail message que getting quite long? Just wondering ....

Hi, we have been using the script you suggested and it works well. Although how do you catch email accounts that do not exist? Any help would be great!

On my server, where vpopmail uses MySQL and so on, the solution presented on the first comment fails on alias users, for example if the user has an account 'firstnameX', the vuserinfo fails to find user as '[email protected]', which is kinda groody.
(The solution would've been quite what i've been searching for otherwise.)

Another thing I haven't quite figured out yet are the .qmail-user -files, procmail gets run only if it's in domain's .qmail-default , and .qmail-username -files never seem to get processed.
If anyone would've thoughts on these issues, I'd be pleasantly surprised to get back an email covering them.


as Adrian commented on catching email accounts that doesnt exist, I tried putting

|/var/vpopmail/bin/vdelivermail '' bounce-no-mailbox

but it didn't work, mail kept getting requeued.
my temporary solution was to put


at the end of procmailrc.

To solve the "non-existent" user problem, I just create a symbolically linked .qmail-username file for each user to a file called .qmail-template. The .qmail-template file contains what the author listed above. My .qmail-default file then looks like
"| /var/vpopmail/bin/vdelivermail '' delete" to delete the messages
or you can use
"| /var/vpopmail/bin/vdelivermail '' bounce-no-mailbox" to bounce the message
With the .qmail-default set to one of these I do not have to worry about any non-existent user. Yes it adds one more step after creating a virtual user, but it solves the issue and everything behave like I would want it to.

Great stuff. Here is another solution to the problem, which uses maildrop instead of procmail for the mail delivery:


Works well in some quick tests, and has no problem with non-existant mailboxes.


lawrence (at) aslak (dot) net