Why are emails to my address being being bounced back to sender? Procmail shows "Disk quota has been reached" but I can't find evidence of that

SYSTEM INFORMATION
Rocky Linux 8.8
Virtualmin 7.7
Webmin 2.021

I run a Rocky Linux 8.8 server using Virtualmin (v 7.7). On this server I have a virtual server that has an email address that can receive and send emails - this has all been working fine for the last year, but sometime in the last ~week, emails to my address have bounced back to sender, with an error:

This is the mail system at host DOMAIN@SERVER.COM.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<USER@DOMAIN> (expanded from
    <user@VIRTUAL-SERVER>): can't create user output file

Checking the log file in the server at /var/log/procmail.log, I see:

Disk quota for username@DOMAIN-EXAMPLE.COM has been reached.
procmail: Program failure (73) of "/etc/webmin/virtual-server/lookup-domain.pl"
From test-email-sender@email.com  Sat Jul 29 10:54:07 2023
Subject: #listentome
Folder: /dev/null							   3316
Time:1690638847 From:test-email-sender@email.com To:user@virtual-server.com User:username@DOMAIN-EXAMPLE.COM Size:3317 Dest:/dev/null Mode:None

Which very clearly says “Disk quota for [user] has been reached.” BUT I cannot find any instance where the disk quota is exceeded in this server, at all.

\[root@server \~\]# quota -v username@DOMAIN-EXAMPLE.COM
Disk quotas for user username@DOMAIN-EXAMPLE.COM (uid 1007):
Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
/dev/vda1       0   51200   51200               6       0       0  
/dev/vdb1     196       0       0              42       0       0  
\[root@server \~\]# quota -g username@DOMAIN-EXAMPLE.COM
quota: group username@DOMAIN-EXAMPLE.COM does not exist.

My understanding (and what is shown in Virtualmin!) is that the 0 in the quota and limits above means unlimited quota. Checking EVERY user and group using repquota -avug shows no users or groups are over quota. Using df -h and df -i (as noted in the answers of a StackOverflow question) show none of the disks are at or anywhere near 100%. I did find a similar issue from 2011 in the Virtualmin forums, but the comments didn’t really pertain to my issue - the root user and group doesn’t have any hard or soft quotas on the server (all “unlimited”).

For further context, there are MariaDB databases on this server and other virtual servers to produce websites. I’m the sys admin for this server in my department but have extremely limited Linux experience and am constantly learning things as I go with this system that I inherited.

How can I fix this issue, what should I check?

In Virtualmin is you edit users do you see quota for username@DOMAIN-EXAMPLE.COM??

edit this user and in quota’s you can change to unlimited (domain limit)

if i use that quota command it shows 0 so its incorrect, please you VM tools to check quota’s
quota -v user@mydomain.au
Disk quotas for user user@mydomain.au (uid 1160):
Filesystem blocks quota limit grace files quota limit grace
/dev/vda1 136 51200 51200 33 0 0

if you like use command line use
virtualmin list-users --domain yourdomain.au --user username

User Real name Mail FTP DBs Quota


user user domain Yes No No 50 MiB

Thanks for your comment!

In Webmin under Disk Quotas, that specific user (the user associated with the email address) indeed has “Unlimited” hard and soft limits.

In Virtualmin under that domain > edit users, indeed the same user shows Unlimited quota in the home directory. In fact, everything I see in Virtualmin and Webmin shows that no quotas are exceeded for any user or group.

I hadn’t tried using virtualmin via the command line yet, so I gave that a go for the specific mail user that I’m having issues with:

[root@server ~]# virtualmin list-users --domain domainname.ca --user username
User              Real name            Mail FTP        DBs  Quota          
----------------- -------------------- ---- ---------- ---- ---------------
username          Real Name            Yes  No         No   Unlimited   

I’m still seeing emails being bounced back, with an error in /var/log/procmail.log of the following:

Disk quota for user@domain.ca has been reached.
procmail: Program failure (73) of "/etc/webmin/virtual-server/lookup-domain.pl"
From test-address@mail.com Mon Jul 31 20:15:04 2023
 Subject: test email
  Folder: /dev/null							   3307
Time:1690845305 From:test-address@mail.com To:user@domain.ca User:user-domain.ca Size:3308 Dest:/dev/null Mode:None

Here’s a snippet of whats in /var/log/maillog - if this is useful in anyway, I can get a more complete log here?

Jul 31 20:15:04 servername postfix/smtpd[1091516]: connect from mail-vk1-f177.google.com[209.85.221.177]
Jul 31 20:15:04 servername postfix/smtpd[1091516]: discarding EHLO keywords: CHUNKING
Jul 31 20:15:04 servername postfix/smtpd[1091516]: discarding EHLO keywords: CHUNKING
Jul 31 20:15:04 servername postfix/smtpd[1091516]: 9564010186C: client=mail-vk1-f177.google.com[209.85.221.177]
Jul 31 20:15:04 servername postfix/cleanup[1091590]: 9564010186C: message-id=<CAKdA+T=vh1mSab1iJjLsy8SMZqYn47JxG55d46YFJxw6_Ws4fw@mail.gmail.com>
Jul 31 20:15:04 servername postfix/qmgr[1439]: 9564010186C: from=<test-sender@gmail.com>, size=3193, nrcpt=1 (queue active)
Jul 31 20:15:04 servername postfix/trivial-rewrite[1091587]: warning: do not list domain domain.ca in BOTH mydestination and virtual_alias_domains
Jul 31 20:15:04 servername postfix/smtpd[1091516]: disconnect from mail-vk1-f177.google.com[209.85.221.177] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
Jul 31 20:15:05 servername postfix/local[1091605]: 9564010186C: to=<user-domain.ca@servername>, orig_to=<user@domain.ca>, relay=local, delay=0.6, delays=0.11/0.01/0/0.48, dsn=5.2.0, status=bounced (can't create user output file)

I appreciate the help, this seems like a very weird issue.

My procmail folder should be under the domain that its using.
like
Folder: /home/mydomain.com/homes/username/Maildir/new/

You config seems all screwed up. Did you create the user using Virtualmin?

Interesting - thanks for noticing that. Yes, the user was originally created via Virtualmin (at least, I’m pretty sure). The user was created roughly a year ago and has been working fine since then… until roughly the last week!

[I’ll come back here shortly if I can find any older maillog or procmail.log logs from when it WAS working earlier in July or before] * editing to add, I found /var/log/procmail.log from when it was working!:

From sender@emailaddress  Thu Jul  6 13:48:47 2023
 Subject: #listentome
  Folder: /home/domain/homes/user/Maildir/new/1688662130.535045_	   3338
Time:1688662130 From:sender@emailaddress To:user@domain.ca User:user-domain.ca Size:3394 Dest:/home/domain/homes/user/Maildir/new/1688662130.535045_0.servername.ca Mode:None

That totally seems to be the issue - that /dev/null folder. Now… how do I fix that…?

The “Inbox mail file” seems to be set correctly in virtualmin, in the attached screenshot. This also very interestingly shows that the last email successfully received was July 27. Currently, the mailbox is empty.

Adding more context, thanks to stefan1959’s excellent find with that /dev/null folder: This does indeed seem to be a server-wide issue, not just a single-user issue. I have other email accounts on the server that I now realized are bouncing emails back, too! All of the /var/log/procmail.log entires are showing that same Folder: /dev/null issue instead of a reasonable path to a mail folder like /home/domain/homes/user/Maildir/new

My /etc/procmailrc file has not been changed since long before the mail stopped worked, and looks like this:

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
* ?/bin/test "$EXITCODE" = "73"
/dev/null
EXITCODE=0
:0
* ?/bin/test "$VIRTUALMIN" != ""
{
INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
}
ORGMAIL=$HOME/Maildir/
DEFAULT=$HOME/Maildir/
DROPPRIVS=yes
:0
$DEFAULT

So… is there an issue with /etc/webmin/virtual-server/lookup-domain.pl ? How can I check that?

I see a small difference at the end of the file. Maybe someone on staff might know what might be going on. I sort of think its a variable name not working maybe. Please backup your virtual machines as a fresh reinstall might be the easiest solution. and seeing your using a older OS. If you can create a test machine and reinstall the backup and see if that fixes things. My procmailrc.

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

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

Ah, shoot, I’m REALLY hoping I won’t have to do a whole reinstall… Fingers crossed there’s some other brains that can take a look at this problem, too.

I’m currently trying to figure out exactly when the last email received was and then will try to “undo” and package updates from that point, seeing if whatever is broken may become fixed. Before a ~week ago, all was perfectly fine! I’ll update with relevant information when I can, though it may be in the morning.

Have you tried creating a new user and see if they same thing happens.

Also run Recheck Configuration.

Adding to this: emails can be forwarded through the email address where they bounce back. For example, if I send an email to username@domain.ca which also forwards to secondemail@anotherdomain.ca, the original sender gets a bounceback message AND that email gets successfully forwarded to secondemail@anotherdomain.ca.

I found the last email that was successfully received for certain was midday July 19, though I’m not sure if emails were received to any other email account after that one. I just did yum history rollback x to an update done on July 18. However, after restarting the server the emails are still not going through.

I created a new user - “testuseremail@domain.ca” and emails to that address get bounced back with a slightly different note(?) - I also had this “testuseremail@domain.ca” email forward to a microsoft-provided email address so maybe there’s an issue there? (I have not had ANY time to troubleshoot this specific thing, but I’ll paste it here - it’s currently 10pm and I’m at the end of 12 hours of work! Will return in the morning.)

This is the mail system at host server.ca.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<testuseremail-domain.ca@domain.ca> (expanded from
    <testuseremail@domain.ca>): mail forwarding loop for
    testuseremail-domain.ca@server.ca

I haven’t yet done Recheck Configuration - I’m not sure where to find that (yet) but I will look into it in the morning. Thank you!

That would be a crazy thing to do over a minor mail issue.

I really have no idea if this is related to your issue but I noticed another similar post from a while back.

It might be useful, or not. Just figured I should at least pass on the info to you.

I’m at a loss on how to fix it, is it minor?

Oh my goodness gracious, I fixed the issue. It WAS a quota issue but it wasn’t showing up anywhere with “disk quotas” via command line or in Disk Quotas in virtualmin. I went to Virtualmin for the domain > Edit Virtual Server > Quotas and Limits.

The limit HERE under “Quotas and limits” was set to 1Gb and it had gone over that limit. Switched this quota to unlimited and voila, emails can be received again. Good grief. To think of how many hours I spent on this… Fixed now! Thank you very much to those that were helping me along.

2 Likes

Great, so the

Folder: /dev/null	

is used when the quota is used up, something for the memory bank. Pitty the user section dosn’t show its a quota issue.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.