Odd errortasq.log entries from Dovecot, expunge and domain config null.

Richard G

Verified User
Joined
Jul 6, 2008
Messages
13,771
Location
Maastricht
On one of our servers I see this happening during the cronjob every night:
Code:
2023:12:19-00:17:59: doveadm expunge returned an error:
2023:12:19-00:17:59: doveadm expunge returned an error:
2023:12:19-00:17:59: doveadm expunge returned an error:
2023:12:19-00:17:59: doveadm expunge returned an error:
2023:12:19-00:17:59: doveadm expunge returned an error:
2023:12:19-00:17:59: doveadm expunge returned an error:
2023:12:19-00:17:59: doveadm expunge returned an error:

Next to that, this morning I've seen this for 4 users.
Code:
2023:12:23-10:31:19: Error getting user 'admin' domain config file for domain (null)
2023:12:23-10:31:19: Error getting user 'user1' domain config file for domain (null)
2023:12:23-10:31:20: Error getting user 'user2' domain config file for domain (null)
2023:12:23-10:31:20: Error getting user 'user3' domain config file for domain (null)

Server is freshly installed about 1,5-2 weeks ago.
I rebuild dovecot and dovecot.conf to see if that makes the issue dissapear. Did not help.
 
Last edited:
Nobody any clue? Still having a lot of the first ones with doveadm expunge returned an error in errortaskq.log here.

The 2nd thing I'm not seeing anymore.
 
Hi Richard,
We had same logs " doveadm expunge returned an error:" longtime some servers.

We found out this..

Admin Settings ---> E-mail Settings --->Purge Spambox / Trash data after (days)
if you set it > 0 you will see the logs . if you set it = 0 (disable) you will not see the logs.
You can test it

set the Purge Spambox / Trash data after (days) = 1
and run the command echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue
wait untill task end .
check the the errortask.log
you will see the logs doveadm expunge returned an error:
run the command many times
you will see the logs doveadm expunge returned an error: after task ended.

--- NOW ----------

set the Purge Spambox / Trash data after (days) = 0
echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue
wait untill task end
you will not see the doveadm expunge returned an error: logs anymore
run the command many times echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue
wait untill task ended you will not see anymore the logs

i thing something with this to do

Best Regards
 
i thing something with this to do
Thank you.

This shows:
dovecadmn expunge returned an error: doveadm([email protected]): Error: Syncing mailbox 'INBOX.Trash' failed: Mailbox doesn't exist: INBOX.Trash
However, we don't have all that behind it, only doveadm expunge returned an error: without any reason behind it. But maybe that doesn't matter.

Also, we only have this on 1 server while we have a setting to 30 days on all servers.

We found out this..
Great find! Thank you! (y)
So in fact this means that on this one server, one or more users do not have a spam/trash folder.

If I understand correctly, if I would find out which users do not have the spam/trash folder present and I would create the folder, this would fix the issue too, correct?
 
If I understand correctly, if I would find out which users do not have the spam/trash folder present and I would create the folder, this would fix the issue too, correct?

Yes and No
I don't thing if you creat the folder over ssh or filemanager will fix the issue
you have to login in email adress whit webmail (roundcube ) create the folder.


Regards
 
you have to login in email adress whit webmail (roundcube ) create the folder.
Maybe not, as you can also use a spamfolder if you only use POP3 and don't use webmail.
But I'm not sure. I'm getting curious to test that.

However, first find a method to find out which account does not have a spambox. :)
 
Hi Richard;
if found ther is basic script: wher you can get a list of all created email accounts

I modified code for you to check if ".INBOX.spam" folder exist or not

creat a folder like /root/inboxlist
use nano or vi crate file like inbox.sh

copy and paste the code and make file chmod 700
run it . it will creat 2 .txt files


1. existlist.txt you will see this kind logs
INBOX.spam Folder exist in /home/username/imap/domainanem/mail-adressname/Maildir
you can see the user and domainname and email adressname wher .INBOX.spam exist


2. notexistlist.txt you will see this logs
INBOX.spam Folder Not exist in /home/username/imap/domainanem/mail-adressname/Maildir
this is the username domain and email adrress wher .INBOX:spam missing
this is the list which you are loookig for.

Hope this helps
Bestregards


Code:
#!/bin/bash

for d in `cat /etc/virtual/domains`; do
{

       S=`grep "^${d}:" /etc/virtual/domainowners | cut -d: -f2 | awk '{print $1;}'`
       if [ "${S}" != "" ]; then
               echo "${S}@${d}";
       fi

       if [ ! -s /etc/virtual/$d/passwd ]; then
               continue;
       fi

       for e in `cat /etc/virtual/$d/passwd | cut -d: -f1`; do
       {
               if [ -d "/home/$S/imap/$d/$e/Maildir/.INBOX.spam" ];  then
               echo "INBOX.spam Folder exist in /home/$S/imap/$d/$e/Maildir" >> existlist.txt;
else
               echo " INBOX.spam Folder Not exist in /home/$S/imap/$d/$e/Maildir" >> notexistlist.txt;
               fi




       };
       done;
};
done;
exit 0;
 
Hello @Hostmavi

Great, thank you very much!
However, seems there is a little bug in the script.

I get "notexistlist" results on multiple servers but it seems the script has a flaw.

In a notexistlist.txt I got something like this:
/home/username/imap/domain.nl/username/Maildir
now this is a non-existing folder anyway, because normally it looks like for example:
/home/username/imap/domain.nl/john/Maildir
those are all present in the existlist.txt file.

As you can see, non existing username folders appear in the nonexisting list on the place where a mailname (like john) should be present.
So in fact it's generating notexistlist.txt list the wrong way or rather false positive as those folders don't exist anyway.

Still strange it's only on 1 server.
 
Hi Richart;
this is not bug this is normal.

If you creat account username john and whit domain domain.nl ,
directadmin creating defaul email for system mail for [email protected]
and add it the account username (for defaul emailadress in( /etc/virtual/domain.nl/passwd).
If user John creat email adress [email protected] in (directadmin panel )
also it will add in /etc/virtual/domain.nl/passwd

for the account username (john) defaul mail folder is in /home/john/Maildir
for other email (john1) folder is /home/john/imap/domain.nl/john1/Maildir

scritp doesn't check if it's defaul email adress or only emailadress.
it reads lines in /etc/virtual/domain.nl/passwd and
check in the /home/john/imap/domain.nl/(username-from passwd file)/Maildir

if you want also check account username defaul email adress like ([email protected] in /home/john/Maildir folder.
you muss make some changin on it .

I am sorry. i am bussy and not alwasy online here.
Best Regards.
 
this is not bug this is normal.
No because I think you don't understand what I mean. I will try to make myself more clear.

I know about the Maildirs like you say.

Lets use this example.
username=accountname like present in /etc/passwd
mailname=name like present in /etc/virtual/domain.nl/passwd

Now the notexist list gives this:
/home/username/imap/domain.nl/username/Maildir
And that directory doesn't exist anyway ever.

Like you say it's either:
/home/username/imap/domain.nl/mailname/Maildir
or
/home/username/Maildir

But never:
/home/username/imap/domain.nl/username/Maildir
and the notexist list is generating these non existing dirs in the list. That is what I mean. I'm not looking for those. ;)


Or in your example ithe notexist list is filled with /home/john/imap/domain.nl/john/Maildir which can't be true so seems to me a little flawin the script.

So I have to figure out if I can make a change somehow.

I am sorry. i am bussy and not alwasy online here.
That's no poblem at all, it's not an urgent issue.

I'm already very thankfull for your input to the cause and the fact that you helped with this script as I don't know about scripting. (y) (y)
 
Ah LoL! Luckily we don't have that many accounts on a sever (like 60).
So I think I found a solution with your script anyway.

I just checked, because there were accounts which were not in the notexistlist.txt so I thought then there this non-existing directory's would be present in their imap folder or something else must be off.

But it appears the first I found didn't have -any- folder in that account, the domain didn't even exist, lol.:)

So I remove that one, and checking for others which are accounts but not present in the notexistlist.txt now and then see if the errors are gone then.

Edit: Just seen that users which only have their system account also have no folders in the imap directory. So this is probably not the cause of the issue. Because that is the case on multiple servers, only system accounts used. :(
 
Back
Top