source: doc/qmqtool.faq.txt @ 3

Revision 3, 4.1 KB checked in by jake, 6 years ago (diff)

Brought up to date for new packages

1Want to just get going ?  Try: qmqtool -l
5Q. How do I install qmqtool ?
6A. vi qmqtool, and ensure the path and syntax to "ps" and "grep" are
7        compatible with your operating system (defined at the top)
8   cp qmqtool /usr/local/script/
9   chmod 0700 /usr/local/script/qmqtool
10   chown root /usr/local/script/qmqtool
12Q. Why arent messages that I just expired going away ?
13A. After expiring, you can force the queue to run by:
14   /var/qmail/bin/qmail-tcpok
15   svc -a /service/qmail-send/
16A. If you have already forced qmail to re-run the queue, you may be
17   running into a scenario where qmail-remote is caching an
18   unresponsive SMTP server, and messages after the first are kept in
19   the queue to be tried later.  There's no solution to this problem,
20   besides to simply delete the messages instead of expire.
22Q. Do I really have to restart qmail-send after using -d ?
23A. You should.  qmail doesnt know you've removed the message from the
24   queue, and will keep trying to send it.  Each time it tries, you'll
25   see a complaint in your log file.
27Q. What is the difference between 'expiring' and 'deleting' messages?
28A. qmail remembers what messages are in it's queue.  If you tinker
29   with the queue manually (via deleting a message), you will have
30   to restart qmail-send.  By simply expiring the message, you trick
31   qmail into thinking the message has been in the queue too long
32   (about double the queuelifetime), and qmail gracefully removes the
33        message for you.
35Q. How can I list all messages that have the subject of
36   "Free Pupil Enlargment" ?
37A. qmqtool -f '^Subject: Free Pupil Enlargment'
38   will do a pretty good job; since qmqtool's -f argument searches
39   the entire message, this could list an incorrect message if the
40   string 'Subject: Free Pupil Enlargment' is found in the body of
41   the email and not in the header.
43Q. How can I delete all messages with a subject of "Pupil Enlargment"?
44A. qmqtool -d -f '^Subject: Pupil Enlargment!'`
45   restart qmail-send.
47Q. How can I show how many queued messages a host has sent?
48A. If you've got a plain-vanilla qmail installation, try: qmqtool -i
49   If you've got frontend servers that relay mail to backend servers,
50   qmqtool -i -n 2
51   You can also try qmqtool -i -V
53Q. How can I keep my queue clean of soon-to-be double bounces?
54A. Enter the following single line into root's crontab (adjust for
55   syntax and path differences, of course):
56   17,47 * * * * qmqtool -e -o 2 -f 'invoked for bounce|^Subject: failure notice' >/dev/null 2>&1
57   This is not 100% accurate; some legitimate bounce messages will be
58   deleted.
60Q. How can I delete all messages from my remote and local queue ?
61A. qmqtool -d -f .
62   restart qmail-send.
64Q. How can I delete multiple messages at a time ?
65A. qmqtool -d 1234,5678
67Q. How can I find out who most of my remotely queued messages are
68   destined for?
69A. qmqtool -R | awk '/Recipient:/ { print $3 }' | sort | uniq -c | sort -n
70   (your awk, sort, and uniq syntax may differ)
72Q. How can I list messages with a subject of "Failure Notice" that
73   are 18+ hours old ?
74A. qmqtool -o 18 -f '^Subject: Failure Notice'
76Q. How can I expire messages with a subject of "Failure Notice" that
77   are have been queued for 18+ hours ?
78A. qmqtool -e -o 18 -f '^Subject: Failure Notice'
80Q. How can I do the previous question, but watch as it goes ?
81A. use -V: qmqtool -V -e -o 18 -f '^Subject: Failure Notice'
83Q. How can I make a list of just queued bounce messages ?
84A. qmqtool -f 'invoked for bounce'
85   will do a good job.
87Q. What is a "LWQ installation" ?
88A. I (and the general qmail community) recommend installing qmail as
89   per
91Q. How can I move qmail's queue to a different machine?
92A. Use the backup and restore feature:
93        1.  On old machine:
94        stop qmail-send
95   qmqtool -Bb
96   cd /var/qmail
97   tar -zcvf queue.tgz queue.backup/
98        copy or move queue.tgz to the new machine
100        2.  On new machine:
101        cd /var/qmail
102        tar -zxvf queue.tgz
103        stop qmail-send
104        qmqtool -Br
105        start qmail-send
107Q. How can I view message number 12345 ?
108A. qmqtool -v 12345
110Q. How can I view the whole message 12345, instead of the first 100 lines?
111A. qmqtool -wv 12345
Note: See TracBrowser for help on using the repository browser.