After adding your email server IP/FQDN in email settings you have left some test voicemails but no email arrives!
You check the “qmail.current” log under “View log files” and find the issue, whew. How ever, now you are left with lots of failed voicemail to email messages in the qmail buffer which you dont want to be sent to the users
How do i delete unwanted emails from the qmail queues?
Log into the Nupoint or Micollab console via putty.
If you havent done this before please see my guide here
Login as “root” not “admin” 99 times out a 100 the password is the same as the admin account
You can check the curent queue by issuing this command:
/var/qmail/bin/qmail-qstat
The reply will be something like this:
[root@testserver~]# /var/qmail/bin/qmail-qstat
messages in queue: 22463
messages in queue but not yet preprocessed: 22
In order to remove mail queue you must first stop the qmail service:
service qmail stop
Once the service is stoppped you can delete the messages
I have found these commands on the internet (credit goes to this website)
find /var/qmail/queue/mess -type f -exec rm {} \; find /var/qmail/queue/info -type f -exec rm {} \; find /var/qmail/queue/local -type f -exec rm {} \; find /var/qmail/queue/intd -type f -exec rm {} \; find /var/qmail/queue/todo -type f -exec rm {} \; find /var/qmail/queue/remote -type f -exec rm {} \;
But they didnt work form me so i have to find another way
If the above does work for you then restart the qmail service and recheck the queue
Service qmail start
/var/qmail/bin/qmail-qstat
If it doesn’t work for you then you can delete the files manually
Change directory to each of the folders in turn (info,remote,local,mess,todo,intd) and delete the contents. Note: Do not delete the folders!
For example, in my each of my folders i have directories called 0,1,2,3,4……30.
What i did (which was wrong) was delete the directories and the contents with a “rm * -Rf” = remove everything in this folder including folders.
What you should do is go into each directoty and delete the contents with :
rm *-f
Do this for the contents of each hunt group (info,remote,local,mess,todo,intd)
If you made the same mistake as me you will see the logs show “unable to open directory info/0”
So you have to recreate the directory(s)
If you wanted to do this properly they should be recreate with the correct ownership of “qmailq:qmail”
The way i did it was to create multiple directories and set permissions at the same time:
mkdir {0,1,2,3,4,5,6,7,8,9,10} -m777
Do this for diectories upto 30 worked for me
You could instead just create the hunt groups as above with out the -m777. This would create them owned by the root user and group
To change the owner of the directories in one step then issue:
chown qmailq:qmail * -R
To check the owner of directories and files
ls -la
This would need to be done for each of the directories inside the directories info,remote,local,mess,todo,intd.
After doing all that, start the qmail service again
Service qmail start
and check the queues
/var/qmail/bin/qmail-qstat
then check the logs
tail -F /var/log/qmail/current
Hope this helps someone
2 thoughts on “Micollab: Voicemail to email troubleshooting.”