• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

messages stay in queue...

F

fgilain

Guest
H iall,

could someone tell me how i could check why messages are staying in my qmail queue ?

here is the output i get :

[root@www root]# cd /var/qmail/bin/
[root@www bin]# ./qmail-qstat
messages in queue: 24
messages in queue but not yet preprocessed: 0

thanks

Florent
 
Download "qmHandle" so you can get specific information about the queues, like where the emails are addressed to, whether they are in the remote or local queue, etc.. Chances are they are just postmaster bounces, you will have to use qmhandle to clear them from the queue if you don't want to wait for them to expire.
 
Also check your maillogs to see if there are any errors, like deferrals or failures connecting to remote SMTP servers.
 
ok, here is what it shows me :

[root@mx2 bin]# ./qmHandle -l
977374 (12, R)
Return-path: [email protected]
From: [email protected]
To: [email protected]
Subject: LogWatch for www2.company.com
Date: 2 Jul 2005 04:02:01 +0200
Size: 3075 bytes

977378 (16, R)
Return-path: [email protected]
From: [email protected]
To: [email protected]
Subject: LogWatch for www2.company.com
Date: 28 Jun 2005 04:02:01 +0200
Size: 2407 bytes

977379 (17, R)
Return-path: [email protected]
From: [email protected]
To: [email protected]
Subject: LogWatch for www2.company.com
Date: 29 Jun 2005 04:02:01 +0200
Size: 1708 bytes

Where doses that comes from? and how to avoid this ?

thanks

Florent
 
Try modifying the conf file for logwatch:

/etc/log.d/conf/logwatch.conf


# Default person to mail reports to. Can be a local account or a
# complete email address.
MailTo = root

change this line to:

MailTo = [email protected]

where domain.com is the name of your domain. With the default of just 'root', it will auto-append the server hostname (www2.company.com) which you may not actually have defined as a real functional domain on the server.

Making this change should force it to send to the proper [email protected]

I also assume that you have [email protected] actually going to a valid email account on the server. Or you could put any valid email address instead of [email protected].

Logwatch is a normal part of the server. These messages are not spam. They are stuck in the queue because '[email protected]' is not a valid mailbox on your server (probably).
 
should i restart something for my modification to take effect ?
 
I don't believe so, the cron job which runs the daily logrotate script would pickup the changes on the next daily run.
 
does it mean its more recommended to set a proper working email account so as not to jam the queue?

That means I will need to have a huge account to hold the potentially huge influx of emails
 
Of course it should be emailing to a valid email account, or else it will end up staying in the queue (at least until the Qmail queue lifetime limit is reached, normally defaults to 7 days).

Wouldn't you want to know if logwatch was reporting any problems? As to the normal daily emails, you can always just delete them, should not be a 'huge influx' of emails.
 
Back
Top