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!

Auto Expunge Trash, actually is not expunging anything

Discussion in 'E-mail Discussion' started by Kent Brockman, Oct 8, 2018.

  1. Kent Brockman

    Kent Brockman Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    1,187
    Likes Received:
    8
    Trophy Points:
    168
    Location:
    Buenos Aires, Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hey guys, I'm worried about this feature not working at all. Since a lot of time, actually. I've failed to report this in the past, but it is becoming a problem on servers with thousands of email accounts alotting gigs of trash.

    Below is the current configuration in all the servers, but it is quite being ignored and no Trash folder is being currently processed. I found trashed mails from more than 6 months...

    autoexpunge trash cpanel.png

    Any solution or debug action to enable the auto expunge for real?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,806
    Likes Received:
    275
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Kent Brockman

    So this should be part of the nightly maintenance that runs. One of the items that is run during maintenance is
    Code:
    /scripts/dovecot_maintenance
    And that script includes the auto expunge:

    Code:
    dovecot_maintenance - Run nightly maintenance for dovecot which includes
                          expunging trash and purging deleted messages from
                          mdbox.
    There are some caveats like mail that was in the trash prior to enabling auto expunge will not have an expiration added and as such will not be auto expunged, there is also some issue with mail directly filtered to trash using an email filter.

    There are a few other threads referencing the same issue as well:

    Delete all emails in Trash via SSH
    SOLVED - Dovecot trash not deleting

    Can you confirm that your mail doesn't meet any of the conditions and/or are there any notifications when you run dovecot maintenance manually?

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,806
    Likes Received:
    275
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Kent Brockman

    To look more in-depth on this I'd like to see what you have when you do the following -

    First, identify the mail in trash with an expiry time - the last entry is an epoch date for when the mail was delivered :

    Code:
    # sqlite3 /var/cpanel/dovecot/dict.sqlite
    SQLite version 3.7.17 2013-05-20 00:56:22
    Enter ".help" for instructions
    Enter SQL statements terminated with a ";"
    sqlite> .tables
    expires
    sqlite> select * from expires;
    test@test.tld|INBOX.Trash|1539182250
    You can translate that into a standard date with the following:

    Code:
    # date -d @1539182250
    Wed Oct 10 09:37:30 CDT 2018
    Add 30 days to that and you will have the date the mail should be deleted automatically.



    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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