1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice

Need to view qmail queue

Discussion in 'Plesk for Linux - 8.x and Older' started by NotSoHappy, Aug 9, 2005.

  1. NotSoHappy

    NotSoHappy Guest

    How would I view the number of emails in the qmail queue on the server?
  2. jamesyeeoc

    jamesyeeoc Guest

  3. NotSoHappy

    NotSoHappy Guest

    Thanks for the info. I installed qmHandle and it tells me 7362 messages in remote queue.

    I try to run qmHandle -a to send the messages, and it tells me qmail isnt running when it is. I have qmhandle in /var/qmail/sbin

    Any suggestions?

  4. NotSoHappy

    NotSoHappy Guest

    Here is the full message:

    Can't exec "pidof": No such file or directory at /var/qmail/bin/qmHandle line
    459 (#1)
    (W exec) A system(), exec(), or piped open call could not execute the
    named program for the indicated reason. Typical reasons include: the
    permissions were wrong on the file, the file wasn't found in
    $ENV{PATH}, the executable in question was compiled for another
    architecture, or the #! line in a script points to an interpreter that
    can't be run for similar reasons. (Or maybe your system doesn't support
    #! at all.)

    Use of uninitialized value in scalar chomp at /var/qmail/bin/qmHandle line 460 (#1)
    (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

    Use of uninitialized value in pattern match (m//) at /var/qmail/bin/qmHandle
    line 461 (#1)
    Qmail isn't running, can't send messages!
  5. NotSoHappy

    NotSoHappy Guest

    What exactly is the remote queue anyway? I just recently sent a mailing to 70,000 and I am sure this is related. We had about 10,000 bouncers in the list from what I gathered.

    qmHandle hasnt told me much of anything :(
  6. jamesyeeoc

    jamesyeeoc Guest

    It has told you how many messages are in the outbound (remote) queue, which is what your original post was related to.

    The remote queue contains messages outbound to other SMTP servers. The local queue are messages awaiting delivery into the local user maildir/mailboxes.

    After installing qmHandle, did you make sure the config paths were proper for your system? From their README file:
  7. NotSoHappy

    NotSoHappy Guest

    i ddint realize I had to edit variables. What would be the proper settings for a plesk 7.5 reloaded install? Can you help with that?

  8. NotSoHappy

    NotSoHappy Guest

    Well I just found out "pidof" is an invalid command on my server so I somehow need to find out the PID of qmail-send so I can put it in there. I ran top but it wasnt on there.

    What other options do I have?

    Thanks again!
  9. NotSoHappy

    NotSoHappy Guest

    I dont even know what I am trying to accomplish here. I guess I wanted a visual of what was in the queue, not just a number.

    I dont want to just delete them without knowing what they are, and doing a "./qmail-send" just tells me qmail send is already running. I want these to be pushed through, I dont know what the deal is.

    The number is growing too. I am at almost 8000 now. :(
  10. jamesyeeoc

    jamesyeeoc Guest

    I'll refrain from any comment on this line... :D
    Ok, I guess it wasn't clear that you wanted a GUI type utility.

    qmHandle has a README file which I quoted from.

    If the 'pidof' command does not work on your OS, then you will need to refer to your OS docs to find the equivalent. It has worked fine on all the RH type systems I have dealt with, so if you are using some other OS, then I would not be able to assist you on that aspect.

    The growing number is more than likely related to your mailing of 70,000 and the high number of bounces you posted. Another thing it could be related to is SPAM bounce/doublebounces. That is an entirely different topic which has been covered in depth numerous times under many Plesk version forums (please use search).

    Unfortunately I do not know off hand of a visual or GUI based utility to view the Qmail queue. I use a combination of preventative Qmail settings, and qmHandle to manage my queues.

    Your original post was that you wanted to
    qmHandle does just that for both local and remote queues, and other functions. Sorry it did not fit your needs.
  11. Swakoo

    Swakoo Guest

    I am using RHEL3 with Plesk 7.5.3

    I too get the problem when I use the -a option...

    - how do I configure the variables? Don find any documentation..

    - where you guys got the readme from? Their sourceforge site doesn't have any

    Many thanks!
  12. jamesyeeoc

    jamesyeeoc Guest

    You have to download the package and extract it. One of the files in the archive is the README file.
  13. tandberg

    tandberg Guest

    just download queue-admin, a nice bash script.

    It makes your life much easier. :)

    Don't forget to edit 2 vars in it, disable svc and use your qmail init.d starter.
  14. Swakoo

    Swakoo Guest

    I was getting the same error as "NotSoHappy"

    for my ($pidcmd) I put "ps -e | grep qmail-send"

    then it just prompt these lines:

    Qmail isn't running... no need to stop it.
    Qmail wasn't running when qmHandle was started, so it won't be restarted.

    Any ideas guys?

    Right now, whenever I add the -Rt0 to server_args, I will have remote mails stuck in remote queue after a while (2 days about there).. so now my queue is stuck...)

    what you guys reckon?
  15. jamesyeeoc

    jamesyeeoc Guest

    Your replacement for pidof needs to be modified. What it is returning now is not just the pid number, it is returning something like:

    2936 ? 00:00:00 qmail-send

    Which is not being interpreted properly. Try changing your command to:

    my ($pidcmd) = "ps -e |grep 'qmail-send' |cut -d ' ' -f 1";

    <Edit: My original post has been corrected to reflect -f1 instead of -f2, my error, typo>
  16. Swakoo

    Swakoo Guest

    yah it isn't.. for now i am just manually entering the pid each time.. painful.. ok willgive your suggestion a try
  17. manos

    manos Guest

    Ok back to my thread
  18. jamesyeeoc

    jamesyeeoc Guest

    Your queue is quite large, it may take a few minutes.

    Shall we go back to your original post thread or abandon that one?
  19. jamesyeeoc

    jamesyeeoc Guest

    The -a option will not return any output to the screen. If you want to just delete all messages in the queue, then use the -D option. I believe that's what your original post in the other thread indicated you wanted to do.
  20. criticman

    criticman Guest

    Actually, on my server, it was -f2 instead of -f1 to get the pid. -f1 brings up a blank.