Here are a few commands to keep in mind
Show current queue
[Expert@HostName:0]# /opt/postfix/usr/sbin/postqueue -c /opt/postfix/etc/postfix/ -p
Show one mail from queue:
(5632E28B0044 is an example
Queue ID from the current queue)
[Expert@HostName:0]# /opt/postfix/usr/sbin/postcat -c /opt/postfix/etc/postfix/ -q 5632E28B0044 | less
Attempt immediate delivery of queue content
[Expert@HostName:0]# /opt/postfix/usr/sbin/postqueue -c /opt/postfix/etc/postfix/ -f
Delete one message from queue:
(5632E28B0044 is an example
Queue ID from the current queue)
Expert@HostName:0]# /opt/postfix/usr/sbin/postsuper -c /opt/postfix/etc/postfix/ -d 5632E28B0044
Delete all messages in queue
Expert@HostName:0]# /opt/postfix/usr/sbin/postsuper -c /opt/postfix/etc/postfix/ -d ALL
Show postfix configuration
Expert@HostName:0]# /opt/postfix/usr/sbin/postconf -c /opt/postfix/etc/postfix/
Get postfix version
[Expert@HostName:0]# /opt/postfix/usr/sbin/postconf -c /opt/postfix/etc/postfix/ | grep mail_version
Restart postfix
Expert@HostName:0]# /opt/postfix/usr/sbin/postfix -c /opt/postfix/etc/postfix reload
One additional step that I take on firewalls running MTA is to change the configuration on the maillog file size.
with this command you check configuration:
[Expert@Hostname:0]# log_start list
Index File Max-Size Back-logs
0) messages 65536 4
1) maillog 65536 4
2) send_alert 65536 10
3) blade_config 65536 15
4) pingable_hosts 65536 10
To change the maximal size and the number of rotated backups for a log file, run the following command:
[Expert@HostName]# /bin/log_start limit <log-index> <max-size-in-bytes> <number-of-backlog-copies>
/bin/log_start limit 1 2097152 10
Here is the result
[Expert@Hostname:0]# log_start list
Index File Max-Size Back-logs
0) messages 65536 4
1) maillog 2097152 10
2) send_alert 65536 10
No comments:
Post a Comment