Mail bouncing "can't create user output file"

Mail to all my inboxes is bouncing with the message “can’t create user output file” since I moved my sites to a new server. This really has me stumped, I’d appreciate any thoughts. Nothing I do seems to make any difference.

I did a fresh install of Virtualmin using install.sh, then copied my sites over using the (excellent) Virtualmin backup and restore feature. Everything else is working including mail forwarding, and POP access to my empty mailboxes. The one thing I did differently on my new server compared to the old was enable Spamassassin and ClamAV (on the new one). I’ve tried disabling them again but it makes no difference.

My first thought after googling for similar reports was that a disk quota had been inadvertently enabled or directory permissions were wrong, but I’ve checked all that - quotas are disabled, the disk is not full, file permissions and ownership seem correct. I checked that procmail-wrapper, spamassasin etc are installed (I’m on Ubuntu 10.04).

My procmail log is interesting though, it contains entries like this:

Time:1357645254 From:phil.mckerracher@outlook.com To:test@mckerracher.net User:test.mckerracher Size:1667 Dest:/dev/null Mode:None
Disk quota for test.mckerracher has been reached.
procmail: Program failure (73) of “/etc/webmin/virtual-server/lookup-domain.pl”
From phil.mckerracher@outlook.com Tue Jan 8 11:56:03 2013
Subject: test
Folder: /dev/null 1671

It seems to be trying to send the message to /dev/null instead of the correct mailbox folder. Yet the folder exists and can be accessed in the usual ways (POP, “Read User Mail” and so on).

Here’s my procmail.rc. I can’t see anything wrong with it.

LOGFILE=/var/log/procmail.log
TRAP=/etc/webmin/virtual-server/procmail-logger.pl
:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME
EXITCODE=$?
:0

  • ?/usr/bin/test “$EXITCODE” = “73”
    /dev/null
    EXITCODE=0
    :0
  • ?/usr/bin/test “$VIRTUALMIN” != “”
    {
    INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
    }
    DEFAULT=$HOME/Maildir/
    ORGMAIL=$HOME/Maildir/
    DROPPRIVS=yes
    :0
    $DEFAULT
    :0
  • ^X-Spam-Status: Yes
    $DEFAULT

Any ideas how to narrow this down, or more things to try?

Howdy,

You may want to make super-sure that there’s not a quota of any sort on your user… you can verify that with these two commands:

quota -u test.mckerracher quota -g mckerracher

Where “mckerracher” in that second command represents the groupname of your user.

Also, to rule out a possibility with the lookup service, you may want to try restarting it, which you can do with this command:

/etc/init.d/lookup-domain restart

Many thanks for your help.

The quota is confirmed:
root@mail:~# quota -u test.mckerracher
Disk quotas for user test.mckerracher (uid 1118): none
root@mail:~# quota -g mckerracher
Disk quotas for group mckerracher (gid 1006): none

This is interesting though:
root@mail:~# /etc/init.d/lookup-domain restart
-bash: /etc/init.d/lookup-domain: No such file or directory

Howdy,

Hmm, do you see anything in “/etc/init.d” that begins with the name “lookup”?

Also, how did you install Virtualmin, did you by chance use the install.sh script to do that?

-Eric

Nothing that looks like “lookup” in /etc/init.d. I did use install.sh.

There’s no “lookup” process in Bootup and Shutdown either. How could this be missing?

This thread looks very similar but there’s no resolution
http://www.virtualmin.com/node/19723

This is also very similar, also without resolution:
http://www.virtualmin.com/node/16687

Solved!

Looking inside /usr/share/webmin/virtual-server/lookup-domain-daemon.pl (which I found by grepping for “lookup-domain”) I found it uses port 11000, which by sheer bad luck was the port I chose to use instead of 10000 for webmin (a bit of probably pointless “security by obscurity” on my part). Moving webmin to a different port solved the problem and mail is now getting through.

I still haven’t found any running server or entry in /etc/init.d though, so I guess the documentation is out of date, including comments within that script itself.

Nor have I solved the mystery of how this worked on the old server, since I used port 11000 for webmin there and yet mail was still getting through.

Howdy,

I’m glad you got it figured out! I’m planning to chat with Jamie about the issue you ran into; it might take a little longer than usual though, as he’s on vacation ATM :slight_smile:

There should be an init script for lookup-domain on every distro; the fact that there isn’t in your case is odd! But I’m wondering if that’s somehow related.

I’ll let you know what Jamie says about all that :slight_smile:

-Eric

I’m not using BIND9 in case that’s relevant to the the missing lookup-domain issue (using hosting company nameservers instead).

I had an earlier problem with getting spamassassin to work that I never got to the bottom of - that may well be related since it seems to work now, though only for stored mail - it seems to have no effect on forwarded mail. Is that by design? I had a heated argument with postfix coders about causing “backscatter” and they said the proper way to solve this was filtering out spam before it gets forwarded to a third party (e.g. Gmail) that rejects it. So I’m puzzled.

It would be nice if the port usage was documented and the error message was not so misleading.

I’m happy to give you an admin login to my server if that would help.