Qmail trouble shooting#

Linux mail server commands - smtp service
#

Find Message from ID

find /var/qmail/queue/ -type f -iname $ID

Find Message from String

grep -ir "$STRING"  /var/qmail/queue/mess/ 

How many emails in queue

/var/qmail/bin/qmail-qstat

List emails in queue

/var/qmail/bin/qmail-qread

Install Qmail-Remove#

yum install gcc gcc-c++

wget http://www.linuxmagic.com/opensource/qmail/qmail-remove/qmail-remove-0.95.tar.gz

tar -zxvf qmail-remove-0.95.tar.gz

cd qmail-remove-0.95
make
make install
cp qmail-remove /usr/bin/
mkdir /var/qmail/queue/yanked

Nice graceful way to delete the qmail queue as the other solutions can cause trouble to the queue and then servie won't start:

service qmail stop

When the servie is stopped, execute hte following commands:
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 {} \;

When this is done, run the service again and check the mail queue:
service qmail start

Remove emails in queue (Remember to stop qmail before you do this service qmail stop/service qmail start)

/usr/local/sbin/qmail-remove -r -p"stringtosearch"

Yanked folder (delete when done)

/var/qmail/queue/yanked/

Delete

find /var/qmail/queue/yanked/. | xargs rm -rf

SMTP Auth log

/var/log/secure

Mail Log

/var/log/maillog

Mail Log on Plesk

/usr/local/psa/var/log/maillog

Show smtp connections:

netstat | grep smtp

Xinet conf

/etc/xinetd.conf

The Test

Connect
telnet mailserver.com 25

Handshake
EHLO mailserver.com

Identify Sender
MAIL FROM:<user@mailserver.com>

Identify Recipient
RCPT TO:<user@mailserver.com>

Provide Message Body
DATA
subject:subject goes here
this is my test message
sincerely,
user
.

Google#


telnet aspmx.l.google.com 25
HELO aspmx.l.google.com
MAIL FROM: <tickets-no-reply@hyve.com>
RCPT TO: <xxx@xxx.com>

  • Check this out:
http://kb.parallels.com/en/1711 For postfix http://kb.parallels.com/en/114845 http://kb.parallels.com/766

If you want all mail to unknown local addresses to be delivered to the void, you can do this:

echo '#' > /var/qmail/alias/.qmail-default 

Back to Linux

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-19) was last changed on 24-May-2017 15:30 by Hyve Support
G’day (anonymous guest) My Prefs
  • View Page Source
  • This clear IPSec security association,
    clear ipsec sa peer X.X.X.X
    

All Pages

Page views: 9985

Private Tomcat

Linux

MySQL

Email

SQL Server

ASP

JSP

C#

Web Mail

Windows Plesk

Linux Plesk

PHP

Gaming

ASP.NET

Persits ASPUpload

Wiki Help

Referring Pages:
...nobody

JSPWiki v2.8.1