Search

Sunday, March 3, 2019

Postfix: Completely Clear Our Mail Queue and Purge Junk Temporary Files

Supratim Sanyal's Blog: Postfix Mail Transport Agent


#!/bin/bash
#
# This Will Completely Clear Our Mail Queue and Purge Junk Temporary Files
#
service postfix stop
postsuper -d ALL
postsuper -p
service postfix start
postfix status
mailq
date

Also, the following in /etc/postfix/main.cf will limit the outgoing queue size and control syslog message overload while doing so:

# --
# Try to control queue size
# --
qmgr_message_active_limit = 16
qmgr_message_recipient_limit = 16
qmgr_clog_warn_time = 0

No comments:

Post a Comment

"SEO" link builders: move on, your spam link will not get posted.

Note: Only a member of this blog may post a comment.

Recommended Products from Amazon