Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Exim mail queue... deleting single emails (your opinion)

Discussion in 'E-mail Discussion' started by lamp, Jul 20, 2006.

  1. lamp

    lamp Well-Known Member

    Dec 22, 2003
    Likes Received:
    Trophy Points:

    I am trying to delete all email messages (from my mail queue) which contain "mailbox is full". I run the following commands:

    [/var/spool]# grep -irl 'mailbox is full' /var/spool/exim/input/* | xargs rm -rf
    [/var/spool]# grep -irl 'mailbox is full' /var/spool/exim/msglog/* | xargs rm -rf

    This works but leaves the message in the WHM, with error message:
    Failed to open input file for [mail id]: No such file or directory

    What are your thoughts and is there a better way of doing this?

  2. randomuser2

    randomuser2 Member

    Dec 23, 2005
    Likes Received:
    Trophy Points:
    why are you using rm to delete messages? and why are you using -r for single files?

    the correct way to delete an email in exim is 'exim -Mrm messageID'
  3. sparek-3

    sparek-3 Well-Known Member

    Aug 10, 2002
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    That is correct

    exim -Mrm <Message ID>

    is the correct way to remove message out of the mail queue. And I know that you are just wanting to remove those messages from the mail queue, but to take it a step further, you may want to investigate why the mailboxes are over their mailbox quota.

    I'm trying to figure out a good reason for having a mailbox quota on a mailbox. I haven't found any. When you create a mail account through CPanel, you are going to act on that mail account in one of two ways. You are either going to check that mailbox or you are never going to check that mailbox. If you check the mailbox regularly with a POP client, then the mailbox should never reach its mailbox quota. If you are checking the mailbox with an IMAP client or through webmail, then mail stays on the server and you would not want to have a mailbox quota set because eventually the mailbox would hit that quota. The other scenario is that you are not checking the mail account, in which case I would question whiy it is set up in the first place.

    You can say that by setting a mailbox quota you prevent one mail account that is not being checked from consuming all of the account's overall disk space. This is true, but if that account is not being checked, why is it set up in the first place?

    I realize you are just after how to delete the messages out of the queue. But I think you should also investigate why this is an issue, otherwise you are just going to be continually deleting those messages out of the mail queue.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice