HostOnNet Blog

Plesk Qmail SMTP Server

Looking for Linux Server Admin or WordPress Expert? We can help.

Plesk control panel in Linux can use Postfix or Qmail as SMTP server. Here are some useful commands working with Plesk Server with Qmail SMTP Server.

Stop/Start Qmail

To start qmail use

service qmail start

To stop qmail use

service qmail stop

Log file

In pleask, qmail store logs in

/var/log/maillog

qmail-qstat

Shows mail queue status.

# /var/qmail/bin/qmail-qstat
messages in queue: 44
messages in queue but not yet preprocessed: 0
# 

qmail-qread

To view mails in queue, run

/var/qmail/bin/qmail-qread

qmHandle

# /usr/local/psa/admin/bin/mailqueuemng 
qmHandle v1.2.0
Copyright 1998-2003 Michele Beltrame

Available parameters:
  -a      : try to send queued messages now (qmail must be running)
  -l      : list message queues
  -L      : list local message queue
  -R      : list remote message queue
  -T      : list todo message queue
  -s      : show some statistics
  -mN     : display message number N
  -dN     : delete message number N
  -Stext  : delete all messages that have/contain text as Subject
  -D      : delete all messages in the queue (local and remote)
  --clean : delete all messages in the queue (local and remote), same as -D option
  -V      : print program version

Additional (optional) parameters:
  -c      : display colored output
  -N      : list message numbers only
            (to be used either with -l, -L, -R or -T)

You can view/delete multiple message i.e. -d123 -v456 -d567

# 

To show qmail stats, run

# /usr/local/psa/admin/bin/mailqueuemng -s -N 
Messages in local queue:  0
Messages in remote queue: 44
Messages in todo queue:   0
Messages total:           44
Messages found:           0
Timestamp: 1503307267
# 

Email Storage location

/var/qmail/mailnames/DOMIN.TLD/MAILBOX-NAME

Whitelist a domain in gray list

/usr/local/psa/bin/grey_listing --update-server -whitelist add:*@some-domain.com

Posted in Mail Server

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.