Qmail queue: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(25 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Configuration#Qmail_queue|Back]]<br> | [[Configuration#Qmail_queue|Back]]<br> | ||
[https://qtp.qmailtoaster.org/bin/ Queue Tools] | [https://qtp.qmailtoaster.org/bin/ Queue Tools] | ||
=[https://pyropus.ca./software/queue-repair/ queue_repair.py]= | |||
This tool must be converted to python3 first | |||
= | |||
This tool must be converted to python3 first | |||
# wget -P /usr/local/bin https://qtp.qmailtoaster.org/bin/queue_repair.py | # wget -P /usr/local/bin https://qtp.qmailtoaster.org/bin/queue_repair.py | ||
# chmod +x /usr/local/bin/queue_repair.py | # chmod +x /usr/local/bin/queue_repair.py | ||
Line 11: | Line 8: | ||
# cd /usr/local/bin | # cd /usr/local/bin | ||
# 2to3 queue_repair.py -w | # 2to3 queue_repair.py -w | ||
Queue [https://pyropus.ca./software/queue-repair/docs.html Help] | |||
# queue_repair.py --help | |||
queue_repair.py v. 0.9.0 | |||
Copyright (C) 2001 Charles Cazabon <pqt @ discworld.dyndns.org> | |||
Licensed under the GNU General Public License version 2<br> | |||
Usage: queue_repair.py [options] [conf-qmail] | |||
Options:<br> | |||
conf-qmail (default: /var/qmail) | |||
-t or --test Test only; do not modify the filesystem | |||
-r or --repair Repair errors found (default: test) | |||
-b or --bigtodo Force use of big-todo (default: auto) | |||
-n or --no-bigtodo Force non-use of big-todo (default: auto) | |||
-s N or --split N Force conf-split of N (default: auto) | |||
-c or --create Force creation of queue (default: no) | |||
--i-want-a-broken-conf-split Force non-prime conf-split (default: no) | |||
-h or --help This text | |||
Queue creation | |||
# qmailctl stop | # qmailctl stop | ||
# mv /var/qmail/queue /var/qmail/queue.bak | # mv /var/qmail/queue /var/qmail/queue.bak | ||
Line 20: | Line 35: | ||
# qmailctl start | # qmailctl start | ||
# qmailctl queue | # qmailctl queue | ||
=qmHandle= | =[https://sourceforge.net/projects/qmhandle/ qmHandle]= | ||
# wget -P /usr/local/bin https://qtp.qmailtoaster.org/bin/qmHandle | # wget -P /usr/local/bin https://qtp.qmailtoaster.org/bin/qmHandle | ||
# chmod +x /usr/local/bin/qmHandle | # chmod +x /usr/local/bin/qmHandle | ||
# qmHandle | # qmHandle | ||
qmHandle v1.2.0-bovine | qmHandle v1.2.0-bovine | ||
Copyright 1998-2003 Michele Beltrame | Copyright 1998-2003 Michele Beltrame | ||
Patched 2004-2006 Robert McLeay | Patched 2004-2006 Robert McLeay<br> | ||
Available parameters: | |||
Available parameters: | |||
-V : print program version | -V : print program version | ||
-a : try to send queued messages now (qmail must be running) | -a : try to send queued messages now (qmail must be running) | ||
Line 46: | Line 60: | ||
-M : delete all msgs in the queue from | -M : delete all msgs in the queue from | ||
MAILER-DAEMON@localhost.localdomain | MAILER-DAEMON@localhost.localdomain | ||
Additional (optional) parameters: | Additional (optional) parameters: | ||
-c : display colored output | -c : display colored output | ||
-N : list message numbers only | -N : list message numbers only | ||
(to be used either with -l, -L or -R) | (to be used either with -l, -L or -R)<br> | ||
You can view/delete multiple message i.e. -d123 -d456 -d567 | |||
=[https://github.com/jkister/qmqtool qmqtool]= | |||
# wget -P /usr/local/bin https://qtp.qmailtoaster.org/bin/qmqtool | |||
# chmod +x /usr/local/bin/qmqtool | |||
# qmqtool | |||
qmqtool version 1.13 | |||
syntax: qmqtool [-l] [-L] [-R] [-S [-nN]] [-T] [-s] [-Q] [-c] [-r] [-i [-nN]] [-V] | |||
[-E(A|R|L)] [-U(A|R|L)] [-vN [-w]] [-e(N|[-f 'STRING'|-oN])] [-u(N|[-f 'STRING'|-oN])] | |||
[-d(N|[-f 'STRING'|-oN])] [-f 'STRING'] [-oN] [-B(b|r)]<br> | |||
-l list messages in all parts of the queue | |||
-L list messages in local queue | |||
-R list messages in remote queue | |||
-T list messages in todo queue | |||
-s show statistical information | |||
-Q be as quiet as possible (useful for snmp, cron, and such) | |||
-V be more verbose | |||
-B | |||
b Backup queue into /var/qmail/queue.backup/ | |||
r Restore backup from /var/qmail/queue.backup/ | |||
-c check queue consitancy | |||
-r repair queue (by deleting fragments) found by checking queue consistancy | |||
-i show how many messages are queued per ip | |||
-nN pay attention to the Nth last smtp-hop | |||
-S show how many bytes are queued per ip | |||
-e expire message | |||
may specify N (multiples may be comma separated), or -f 'STRING' and/or -o N | |||
-u unexpire message | |||
may specify N (multiples may be comma separated), or -f 'STRING' and/or -o N | |||
-d delete message | |||
may specify N (multiples may be comma separated), or -f 'STRING' and/or -o N | |||
-E expire messages in [A]ll, [R]emote, or [L]ocal queues | |||
-U unexpire messages in [A]ll, [R]emote, or [L]ocal queues | |||
-v | |||
N view first 100 lines of message number N | |||
N -w view whole message N | |||
-f 'STRING' display comma separated list of message number(s) containing STRING. | |||
prints 0 if no matches are found. | |||
-o N display comma separated list of message number(s) older than N hours. | |||
prints 0 if no matches are found.<br> | |||
see the FAQ for examples. | |||
More to come... | More to come... |
Latest revision as of 09:49, 18 December 2024
queue_repair.py
This tool must be converted to python3 first
# wget -P /usr/local/bin https://qtp.qmailtoaster.org/bin/queue_repair.py # chmod +x /usr/local/bin/queue_repair.py # dnf -y install 2to3 # cd /usr/local/bin # 2to3 queue_repair.py -w
Queue Help
# queue_repair.py --help queue_repair.py v. 0.9.0 Copyright (C) 2001 Charles Cazabon <pqt @ discworld.dyndns.org> Licensed under the GNU General Public License version 2
Usage: queue_repair.py [options] [conf-qmail] Options:
conf-qmail (default: /var/qmail) -t or --test Test only; do not modify the filesystem -r or --repair Repair errors found (default: test) -b or --bigtodo Force use of big-todo (default: auto) -n or --no-bigtodo Force non-use of big-todo (default: auto) -s N or --split N Force conf-split of N (default: auto) -c or --create Force creation of queue (default: no) --i-want-a-broken-conf-split Force non-prime conf-split (default: no) -h or --help This text
Queue creation
# qmailctl stop # mv /var/qmail/queue /var/qmail/queue.bak # queue_repair.py -c --split 23 --no-bigtodo /var/qmail # qmailctl start
Queue repair
# qmailctl stop # queue_repair.py -r # qmailctl start # qmailctl queue
qmHandle
# wget -P /usr/local/bin https://qtp.qmailtoaster.org/bin/qmHandle # chmod +x /usr/local/bin/qmHandle # qmHandle qmHandle v1.2.0-bovine Copyright 1998-2003 Michele Beltrame Patched 2004-2006 Robert McLeay
Available parameters: -V : print program version -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 -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) -tX 'string': delete all messages with matching headers, where 'string' is the string to match and X specifies: 'f' : Who the message is from, 't' : Who the message is to; or, 's' : What the message's subject is -M : delete all msgs in the queue from MAILER-DAEMON@localhost.localdomain Additional (optional) parameters: -c : display colored output -N : list message numbers only (to be used either with -l, -L or -R)
You can view/delete multiple message i.e. -d123 -d456 -d567
qmqtool
# wget -P /usr/local/bin https://qtp.qmailtoaster.org/bin/qmqtool # chmod +x /usr/local/bin/qmqtool # qmqtool qmqtool version 1.13 syntax: qmqtool [-l] [-L] [-R] [-S [-nN]] [-T] [-s] [-Q] [-c] [-r] [-i [-nN]] [-V] [-E(A|R|L)] [-U(A|R|L)] [-vN [-w]] [-e(N|[-f 'STRING'|-oN])] [-u(N|[-f 'STRING'|-oN])] [-d(N|[-f 'STRING'|-oN])] [-f 'STRING'] [-oN] [-B(b|r)]
-l list messages in all parts of the queue -L list messages in local queue -R list messages in remote queue -T list messages in todo queue -s show statistical information -Q be as quiet as possible (useful for snmp, cron, and such) -V be more verbose -B b Backup queue into /var/qmail/queue.backup/ r Restore backup from /var/qmail/queue.backup/ -c check queue consitancy -r repair queue (by deleting fragments) found by checking queue consistancy -i show how many messages are queued per ip -nN pay attention to the Nth last smtp-hop -S show how many bytes are queued per ip -e expire message may specify N (multiples may be comma separated), or -f 'STRING' and/or -o N -u unexpire message may specify N (multiples may be comma separated), or -f 'STRING' and/or -o N -d delete message may specify N (multiples may be comma separated), or -f 'STRING' and/or -o N -E expire messages in [A]ll, [R]emote, or [L]ocal queues -U unexpire messages in [A]ll, [R]emote, or [L]ocal queues -v N view first 100 lines of message number N N -w view whole message N -f 'STRING' display comma separated list of message number(s) containing STRING. prints 0 if no matches are found. -o N display comma separated list of message number(s) older than N hours. prints 0 if no matches are found.
see the FAQ for examples.
More to come...