Ok guys, I did it twice 1st time...it didn't work straight away.. my mail queue build up almost immediately
Some details
qmHandle has been added with
my ($pidcmd) = "ps -e |grep 'qmail-send' |cut -d ' ' -f 1";
The moment i change, i check the queue by using
qmHandle -s
Straight away my remote queue builds up
Thanks to jamesyeeoc, most arguements work for qmHandle (like deleteion etc)
Problem:
I wanted to list all the mail in remote queue with -R, I got...
readline() on closed filehandle MSG at /tmp/qmHandle line 234, <MSG> line 6 (#1)
(W closed) The filehandle you're reading from got itself closed sometime
before now. Check your control flow.
Use of uninitialized value in substr at /tmp/qmHandle line 235, <MSG> line 6 (#2)
(W uninitialized) An undefined value was used as if it were already
defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
To suppress this warning assign a defined value to your variables.
To help you figure out what was undefined, perl tells you what operation
you used the undefined value in. Note, however, that perl optimizes your
program and the operation displayed in the warning may not necessarily
appear literally in your program. For example, "that $foo" is
usually optimized into "that " . $foo, and the warning will refer to
the concatenation (.) operator, even though there is no . in your
program.
readline() on closed filehandle MSG at /tmp/qmHandle line 244 (#1)
readline() on closed filehandle MSG at /tmp/qmHandle line 234, <MSG> line 19 (#1)
Use of uninitialized value in substr at /tmp/qmHandle line 235, <MSG> line 19 (#2)
readline() on closed filehandle MSG at /tmp/qmHandle line 234, <MSG> line 21 (#1)
Use of uninitialized value in substr at /tmp/qmHandle line 235, <MSG> line 21 (#2)
readline() on closed filehandle MSG at /tmp/qmHandle line 234, <MSG> line 12 (#1)
Use of uninitialized value in substr at /tmp/qmHandle line 235, <MSG> line 12 (#2)
Doesn't work? Then I used -S"failure" and after that -R works.
Weirdly....
Anyway, the mail queue is piling up fast...
so I removed the -Rt0 again.
I then tried a second time whereby I added one more space before "-Rt0", as follows:
Additional space can't be shown as the forum truncates additional spaces
service smtp
{
socket_type = stream
protocol = tcp
wait = no
disable = no
user = root
instances = UNLIMITED
server = /var/qmail/bin/tcp-env
server_args = -Rt0 /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
}
This time round.. up till now more than an hour has pass so far still ok. some interesting things to note...
netstat -pan |grep 'spam' returns nothing
ps -ax |grep 'spam' returns only "
2757 pts/2 S 0:00 grep spam
"
Any point for concern?
One thng abt -Rt0, after adding it, while there is always mail in the queue, seems to be always more in the remote queue.. but so far.. acceptable
on top of the above questions.. some more here...
1) Where does the mail with "failure notice" goes to? Considering I haven't added the cron yet.. cos I have set to bounce all mail with invalid recipient(s) in my PLESK control panel.. so if I remove, there won't be any bounce mail so to speak, right?
2) Why is it when it get stuck.. mostly are them (failure notices)? Where will they go after a while? will qmail be able to get rid of them automatically?
3) There was a point the qmHandle didn't work. I had to change the my_pid to 'f 2' to get the pid... weird...? it seems randomly there's a space at the front...
Especially so after i do a -S"failure notice".. then when i try to do a -a, it will tell me qmail is not running, then i know i have to do the above mentioned.... didn't know output position can be changed like that...
after i did another delete, i had to change back to f 1 again....
4) Any possible suggestion as to why my remote mail queue builds up more faster (and not get sent out) after i added the -Rt0? Right now some valid mails are stuck.. even after i delete the "failure notice", those mails never move...
How else can i try to push it out? I have already try qmHandle -a
5) all the failure notices are send out using MAILER-DAEMON@serverhostname, someare even send to "postmaster@serverhostname, which is not a valid domain.
In sendmail, I could edit sendmail.mc to solve the problem by change the hostname when it sends out, to something valid. Especailly so when some email servers out there are sensitive to this...
How do I do this for qmail?
For now will still monitor.. while still acceptable.. the rising concern is that since i added, the remote queue is getting higher slightly.. and some valid mails are still stuck there...
I'm afraid by tomorrow morning it will shoot up to tens of thousands...
so till then.. would appreciate the feedback.. thanks!
ps: I took more than 1hr to finish this post as I monitor and added stuff... so timing maybe off