Use mailq, postmap, postqueue, and postsuper In the postfix Mail Service

Source: Internet
Author: User

1. Mailq

Function Description: displays the list of emails to be sent.

 

Syntax: mailq [-q]

 

Note: mailq can list the emails to be sent, including the email ID, email size, email retention time, sender, recipient, and the reason why the emails cannot be sent, provide the Administrator's reference information. Mailq actually executes the sendmail-bp command.

 

Parameters:

-V displays more detailed information.

 

2. process the mail queue:
Stop postfix

#/Etc/init. d/postfix stop

For example, if you want to delete one or more emails, you can do the following:

The following is the result of mailq:

10EB53A808C 26985 Fri Dec 29 10:49:26 sane@aaa.com
(Lost connection with mx2.hotmail.com [65.54.244.168] while sending end of data -- message may be sent more than once)
Christina8163_8@hotmail.com

7B94A3A810F 3683 Sun Dec 24 19:20:11 MAILER-DAEMON
(Connect to mx-dfw-rpfn.emailscience.com [207.235.126.39]: Connection timed out)
Online@Webspan.net

We can use

Postsuper-d 7B94A3A810F

Delete all:

Postsuper-d ALL allIt must be uppercase or lowercase.

 

 

Operation commands for mail queue in Postfix

PostfixThe queue is placed in/Var/spool/deferredUnder,


Queuemgr
Command to delete the specifiedIDNumber of queues.


Postqueue-p
View queue content

 

Postqueue-fResend the email from the storage queue once.


Postcat
View the mail content in the queue


Postsuper-d ALL hold/deffered...
Delete all emails in a queue


Postmap can check for syntax errors, or the file takes effect immediately.

A statement error is reported in the Postmap mail. c file.

Postmap virtual is encrypted to take effect

Postalias/etc/alias enables the email alias file to take effect immediately

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.