Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    Member
    Join Date
    Oct 2001
    Posts
    348

    Default Delete mail queue older than 3 days

    Hi!
    Is there a way to delete mail queue that already queue for 3 days or above ?
    I don't understand why mail queue, I just feel unconfortable that so many email (20000) queue there, some are older that 7 days.

  2. #2
    OCX
    OCX is offline
    Member
    Join Date
    Sep 2003
    Posts
    246

    Default

    Quote Originally Posted by jameshsi
    Hi!
    Is there a way to delete mail queue that already queue for 3 days or above ?
    I don't understand why mail queue, I just feel unconfortable that so many email (20000) queue there, some are older that 7 days.

    2000 enails?....sheesh man,

    go here http://www.configserver.com/cp/mailscanner.html

    purchase that..and that que will get a hell of alot smaller!!!!

    the owner of that service/site is "chirpy" on cpanel forums


    OCX

  3. #3
    Member
    Join Date
    Oct 2001
    Posts
    348

    Default

    Is that the only solution ?
    We pay cpanel for a hosting management solution, and we still have to pay someone else to get things well done.

    I hope some advanced users can teach me how to solve this problem, appreciated.

  4. #4
    Member
    Join Date
    Jul 2005
    Location
    Sticky On Internet
    Posts
    555

    Default Re:

    Hi,
    Chirpy has always helped every member and has never asked anyone to compulsarily buy his products, although his products are very good and helpful.

    you can check your stats who is the User getting all these mails.
    Better idea would be to track the problem as there must be some important mails too in those.

    I would recommend you to see which domains these mails are for or from.
    Set default id of domains to :Fail: so it doesn't comes to queue.
    check if someone is exploiting your mail server to relay spam.

    you can also use the "Advanced exim configuration" editor to set number of days you want mails to be kept in queue.

    see ya,
    mohit
    Learn atleast A word Daily

    7+1 Dedicated Boxes with cPanel...

  5. #5
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jun 2002
    Posts
    60

    Default

    Quote Originally Posted by jameshsi
    Is that the only solution ?
    We pay cpanel for a hosting management solution,...
    No you don't. You pay cPanel for a control panel which granted, makes the job of the server admin a bit easier (or a bit harder depending which way you look at it ) but certaibly doesn't manage your server for you or claim to. If you need a server admin or your server to be managed you should seek a third party management company or lease a fully managed server.

    // sorry to take thread slightly ot

  6. #6
    Member
    Join Date
    Mar 2004
    Posts
    710

    Default

    Chirpy's solution will handle the 2000 emails, (here also the free software and instructions there too!) but they are really easy to get rid of. Change your retry time at the bottom of the exim.conf to something less than the period of time the emails are from. For example, if the emails are 3 ays old, set the retry to 2 days. Then stop exim and remove all the files in /var/spool/exim/db. Restart exim. The run exim -qff. What that does is remove all retry times in the database for the individual emails. When exim runs the emails now - they are too old for exim to deliver so they are returned or deleted. In this case, they would be deleted as they are undeliverable.
    Lloyd F Tennison

  7. #7
    Member
    Join Date
    Oct 2001
    Posts
    348

    Default

    Hi!
    I know chirpy, he is very active in this forum, and he help a lot of people, no doubt at that, but I enjoy to know things, I am not afraid of lost $35 or spend $35 for a professional people work for me, I just afraid of don't know how things are running on my server, so, I am trying my best to understand something and to see how far I can go by myself and you guys' help.

    I spent a few hours on one of my server last night, and I found a big spammer in China always sending spam emails to our server, a few clients' email are receive their spam everyday.

    I ban their IP (they all comes from Yunnan province) in /etc/apf/deny_hosts.rules by entering 220.163.0.0/16 , I am not sure if I do right, but now I see a few mail queue is from my server send to spammer, it is like this:

    059F From: Mail Delivery System <Mailer-Daemon@myserver.com>
    036T To: aagan.aagan@chelseachelseae.net
    059 Subject: Mail delivery failed: returning message to sender


    If I ban their IP, why this email still comes in with no problem ? Maybe he is sending this email using other IP ? But since I ban the IP of chelseachelseae.net, maybe this return email will never send out cause can't connect to his server and these queue will be more and more in my queue ?

    How should I do to ban this spammer from send spam emails to my server ?

  8. #8
    Member
    Join Date
    Dec 2002
    Posts
    315

    Default

    Quote Originally Posted by jameshsi
    Hi!
    Is there a way to delete mail queue that already queue for 3 days or above ?
    I don't understand why mail queue, I just feel unconfortable that so many email (20000) queue there, some are older that 7 days.
    1. Login to WHM as root
    2. Click on Exim Configuration Editor
    3. Click on Advanced configuration
    4. In the first box, add
    timeout_frozen_after = 3d

    5. Click Save

    You are done.

  9. #9
    Member
    Join Date
    Oct 2001
    Posts
    348

    Default

    Hi!
    So, this means if a queue over 3 days, it will be delete ?

    Thanks a lot.

    Do you have any idea how to prevent the spammer I mention above in server-wide level ?

  10. #10
    Member
    Join Date
    Oct 2001
    Posts
    348

    Default

    Hi!
    I just look at the /var/log/exim_mainlog , and see a lot of these:

    2005-10-07 17:27:34 1EMCgo-0005Ey-Gm cancelled by timeout_frozen_after
    2005-10-07 17:27:34 1EMCgo-0005Ey-Gm Completed
    2005-10-07 17:27:34 1EMCYo-0004zr-NQ cancelled by timeout_frozen_after
    2005-10-07 17:27:34 1EMCYo-0004zr-NQ Completed
    2005-10-07 17:27:34 1EMBvo-0002xW-GG cancelled by timeout_frozen_after
    2005-10-07 17:27:34 1EMBvo-0002xW-GG Completed
    2005-10-07 17:27:34 1EMBRo-0000k1-Qs cancelled by timeout_frozen_after
    2005-10-07 17:27:34 1EMBRo-0000k1-Qs Completed
    2005-10-07 17:27:34 1ELKHo-0002zr-2P cancelled by timeout_frozen_after


    Appreciated!

  11. #11
    Member
    Join Date
    Dec 2002
    Posts
    315

    Default

    No problem. Have a great day.

    Cpanel /WHM do have some settings that can reduce the queue such as not keeping mails users who have been over the quota etc.

Similar Threads & Tags
Similar threads

  1. Replies: 6
    Last Post: 11-22-2007, 02:59 PM
  2. Mail queue isn't deleting older messages.
    By gflamerich in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 10-05-2005, 06:37 PM
  3. Delete emails from spam box older than x days
    By Netmaking in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 12-02-2004, 08:05 AM
  4. Delete messages in queue older than xx days ?
    By pguy in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 02-02-2004, 01:40 PM
  5. How to delete email that is older than x amount of days?
    By Roberto in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 01-09-2004, 05:55 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube