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.

Suggestion (IMAP trash)

Discussion in 'General Discussion' started by PackCat, Mar 3, 2006.

  1. PackCat

    PackCat Active Member

    Joined:
    Jan 20, 2004
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Charlotte, NC
    I think it would be a wonderful enhancement to allow in WHM Tweak Settings for the administrator to enable IMAP: trash > /dev/nul

    It seems many IMAP users are just selfish bastards that couldn't manipulate themselves out of a wet paper bag.

    I have a user that keeps filling up his mailbox. When warned about his limits, He finally started sending some of the volume to his trash bin... BUT does he ever delete his trash bin? Noooooooooooo!!!

    To make a long story short, after continually increasing his limits up to 65MB+...
    Every three months, his trash bin is full of 65MB of deleted mail, and all his mail keeps sitting on the queue.

    I don't know about anyone else, but personally I like to keep the server queue clean. This makes it easier to track real issues when they appear. (like those pesky users that forget to turn off their vacation auto-reply and I have a queue full of undeliverable mail to gambling sites and auto-senders)

    ----

    PLEASE enable a TWEAK to send IMAP trash to /dev/nul OR
    setup a time setting to automatically delete trash after a set time.

    thanks!

    PS. I am open to comments and suggestions...
     
    #1 PackCat, Mar 3, 2006
    Last edited: Mar 3, 2006
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If you want to make a suggestion you can do so by logging an enhancement entry in bugzilla.cpanel.net

    That said, if a user is happy to keep filling up their account quota and risking not receiveing any new emails, IMO, that's their fault entirely. It's their responsibility to empty their trash in their email client, not the servers, and the email quotas are doing their job. If you left their quota alone, they'd soon realise that they have their own responsibilities for their own email accounts.
     
  3. PackCat

    PackCat Active Member

    Joined:
    Jan 20, 2004
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Charlotte, NC
    I agree with you on technical level... But since this is a user on a domain account supposedly paying for the service thru a reseller... The most I can logically do is make a lot of noise and hope someone gets a clue. All they do is complain about the service when their mailbox fills up.

    I have threatened to send a server-wide Broadcast stating New policies similar to what you said, but let's face it, if people had as much brains as they do money, they wouldn't need us!
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I don't disagree ;) I suppose you could always convert over to maildir and then run a crontab that simply empties out the trash folders of accounts.
     
  5. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Chirpy's suggestion is what I was thinking too (convert to maildir, run a job to expire trash entries).

    But the real problem here is that you're bailing this guy out every time instead of re-educating him. Next time he/she complains about the service, simply tell him/her to empty his trash can to receive new emails. If they don't do it, no email. If they do, they'll get new email. Seems to me they might learn fast that way! :D (and whatever you do, don't give in and do it yourself!!)
     
  6. PackCat

    PackCat Active Member

    Joined:
    Jan 20, 2004
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Charlotte, NC
    The real problem here is that my server overflow queue is filling up. I really don't give a damn about the user and I seem to be the only one that understands what is going on... The user is so far in lala land, they probably don't even realize they are missing mail. I don't think they even have a clue that they are causing problems.

    But, if I am the CEO of a company, it isn't my place to lecture the janitor on cleaning the bathrooms... Maybe I need to suspend the Reseller Account until such time, I have a copy of the confirmation from the end user that they understand the terms of service and that the Reseller agrees to keep on top of this. LOL

    Unfortunately in this case, this particuliar Reseller is the one paying my server dues in exchange for supporting (her) clients... Easier said than done.
     
  7. mohit

    mohit Well-Known Member

    Joined:
    Jul 12, 2005
    Messages:
    553
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sticky On Internet
    hi,
    why do you want to queue his mails when he's exceeded the allocated quota, you need to set this from WHM to not to queue mails for users who are Over quota.

    See ya,
    mohit
     
  8. justhost

    justhost Well-Known Member

    Joined:
    Sep 2, 2003
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Halifax, Nova Scotia
    Chirpy

    How would one go about this? I have several clients that have the cur folder filled up? They have over 200MB in these cur folders but have no way to clear this info?

    Do you have any suggestions??

    Thank you.
     
  9. abubin

    abubin Well-Known Member

    Joined:
    Dec 7, 2004
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    i am facing similar problem with a bunch of users. They never ever seems to check their emails. Then when their email box is full, it causes other people unable to receive email.

    When someone send an email to aaa@domain.com and bbb@domain.com, if aaa's box is full, it will cause both users unable to receive email. Am I right?

    Would love to have an option to clear their trash folder or all their mails in one button or something.
     
  10. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    It only prevents other people receiving email if the full mailbox has filled up the disk allocation for the account. If you set the email account quota to something reasonable, that's smaller (eg: 30mb), a full mailbox in itself won't affect the account.

    No, bbb will still receive the email. aaa's email will either bounce or be queued depending on your WHM settings for over-quota mail delivery.

    You can do this really easily from the command line!
     
  11. PackCat

    PackCat Active Member

    Joined:
    Jan 20, 2004
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Charlotte, NC
    I think you are missing the point of this whole exercise...
    I am currently deleting their trash folders from the command line already.
    I depise manual labor and believe as part of Cpanel, it would be a nice gesture to include a WHM setting to automatically purge trash folders on a regular basis.

    UNIX/Linux as operating systems DO NOT save copies in a Recycle bin when you delete files and since Cpanel and other 3rd party applications are going against the operating system parameters, each should be responsible for their own management even if handled by system config settings!

    I submitted a request to Bugzilla. (3/7/06)
    see: http://bugzilla.cpanel.net/show_bug.cgi?id=3970
     
  12. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    No, actually you're missing my (implied) point! (which is understandable since it was implied!! :))

    If you already do it from the command line, put it into crontab, then it's automatic, for ever.

    If you give me the commands you're using I'm happy to suggest a suitable crontab entry.

    Granted, the real fix is to get cpanel to do it. But given that's unlikely to happen anytime soon, a crontab entry is gonna work pretty well.

    A script something like:
    Code:
    cd /home
    for trash in $(locate .trash | egrep '^/home.*/mail/')
    do
       find $trash -name '[0-9][0-9][0-9]*_*' -type f -mtime +14 -exec rm '{}' \;
    done
    
    This should be conservative about removing files -- only removing them from .trash directories inside /home/*/mail, and only removing them if they have the right sort of name, and only then if they are more than 14 days old. I've tested it on my server, but it would be a good idea to test it before running it; do that by running a version of the script with the "-exec rm '{}' \;" removed from the find line.

    Put this in a file, and run it daily from your root crontab, and your .trash directories will be cleaned out daily of files older than 14 days.
    By the way, the script uses "locate" instead of find as it's more than an order of magnitude faster (26 mins on a big server vs 30 seconds!!). If "locate" doesn't work for you, you can use find instead (although it's 50 times slower!) -
    for trash in $(find /home -name .trash | grep /mail/)

    Or, of course, you could make locate work by making sure the locate database update is running nightly! On my system that was from a cron file located in /etc/cron.daily/slocate.cron - your system may not be the same.

    It's worth noting - this cleans out trash files based on a 14 day or more modtime - which may mean day old trash as I don't think a delete would update the modtime on a deleted mail file, but locate is a day behind anyway in updating it's database. It might make more sense to use the find option -atime instead of -mtime as that might get closer to "put in the trash 14 days or more ago", which is probably what we want.
     
    #12 brianoz, Apr 16, 2006
    Last edited: Apr 16, 2006
Loading...

Share This Page