The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

What's the root command to clean out exims queue?

Discussion in 'General Discussion' started by DWHS.net, Jul 25, 2003.

  1. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    I had it some where but I can't find it now..

    It's the command to clean out the exims queue from a command prompt.

    Also anyone know what this is:

    2003-07-25 02:37:36 19fz0x-0004rn-B7 Cannot open main log file "/var/log/exim_mainlog": Permission denied: euid=47 egid=12
    2003-07-25 02:37:37 19fz0z-0004s5-QH <= <> R=19fz0y-0004ru-8b U=mailnull P=local S=1268

    I have thousands in a row on the exim_panic log.

    Thanks,

    cPanel.net Support Ticket Number:
     
    #1 DWHS.net, Jul 25, 2003
    Last edited: Jul 26, 2003
  2. Silverado

    Silverado Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    154
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Backyard - Poolside
    /usr/local/cpanel/whostmgr/bin/whostmgr2 killeximq is ok..

    But if you really want to get everything out of exim...

    rm -rf /var/spool/exim/msglog/ and you can use the same to clean out the input file rm -rf /var/spool/exim/input/

    Beware though... this will remove everything in queue.

    cPanel.net Support Ticket Number:
     
  3. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    If you just want to empty the msglog and input directories (leaving the actual directories in tact) you can use this:

    rm -f /var/spool/exim/msglog/*

    rm -f /var/spool/exim/input/*
     
  4. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    I did this: rm -f /var/spool/exim/input/*

    And got this: -bash: /bin/rm: Argument list too long

    I do this: rm -f /var/spool/exim/msglog/*

    And get this: -bash: /bin/rm: Argument list too long

    Is this what it was sapposed to do?

    Thanks, Charles

    cPanel.net Support Ticket Number:
     
  5. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    I think that means you have too many files in those directories.

    Maybe you could check somehow if there is a certain pattern in filenames and start deleting them by in steps by doing this for example

    rm -f /var/spool/exim/input/11*
    rm -f /var/spool/exim/input/12*
    rm -f /var/spool/exim/input/13*

    cPanel.net Support Ticket Number:
     
  6. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    That's what I thought to...

    Hmmmm, Delete in steps sound good Bond.

    Since I am not familiar with these commands, what is the command to delete say 100 at a time?

    and sorry but do you know what command shows how many files are in a folder when your in there. I tried ls and after 20 minites it still didn't show, so I stopped it.

    I will try it again unless there is a easy way to list how many files are in ther without running a ls.

    :)

    cPanel.net Support Ticket Number:
     
  7. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    If you have other cpanel servers just look in those directories to see what pattern the filenames have. And then delete them the way I mentioned before.

    Or do what Bdraco mentioned in a similar thread


    create a shell script with the following lines and execute it.

    cd /var/spool/exim/input
    for file in *
    do
    rm -fv $file
    done

    I haven't tried this myself.
    Before running it make sure you specified the correct path in the script, since this will otherwise delete all the files in the directory you're in.

    cPanel.net Support Ticket Number:
     
  8. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Do you think I can delete the folder and re-create it without probs?

    cPanel.net Support Ticket Number:
     
  9. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    I guess you could do that, make sure you set the same permissions on the directory after recreating it.
    Maybe it's better you also stop exim while doing this and start it again afterwards.

    cPanel.net Support Ticket Number:
     
  10. Silverado

    Silverado Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    154
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Backyard - Poolside
    if you will just use rm -rf /var/spool/exim/input/ it will wipe out everything in there... and your folder will still be there. I use it every day.. :D

    cPanel.net Support Ticket Number:
     
  11. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    cool, but I got this:

    rm: cannot remove directory `/var/spool/exim/input/': Directory not empty

    Hmmm, it shouldn't matter if it's empty I thought?

    Weird stuff is going on here.

    cPanel.net Support Ticket Number:
     
  12. Silverado

    Silverado Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    154
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Backyard - Poolside
    Strange indeed. I run that command weekly on all my servers to remove most of the stale mail that the cron jobs just don't pick up.
    You could try it without the final / behind input.
    Sometimes you may have to run it twice.... give me a few minutes and I will give you another cool program that works like FTP and you can navigate to the folder or any other and delete them that way.

    cPanel.net Support Ticket Number:
     
  13. Silverado

    Silverado Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    154
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Backyard - Poolside
    http://winscp.sourceforge.net/eng/download.php

    One of my favorite tools as well. No server owner/admin should be without one I think.

    You can use this to naviagate to the /var/spool/exim/input directory and then select "mark all"... then delete everything within it.

    cPanel.net Support Ticket Number:
     
  14. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    I will definably check it out.

    :D

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page