How do you delete all the default emails with maildir?

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
The messages are in /home/user/mail/cur Each message is a single file. Deleting all the files from the command line will have similar effect as deleting the mbox. However, with 30K of files, don't do rm -f * as the shell expansion will be very slow.
 

Bailey

Well-Known Member
Aug 12, 2001
120
1
318
Wisconsin
CMM would help with this as it's very quick at clearing down maildir files without destroying the maildir and courier file structure.
I use CMM for this exact thing, and it's perfect. And very fast. :) Great script.

:D Bailey
 

johndoe

Active Member
May 26, 2002
38
1
308
Modified version of CMM for hosting clients?

Hello forum members,

I have several hosting clients who have "multiple domain" accounts, and use cPanel. Yesterday I received a message from one of them about an email problem he was having. I went straight to his mail account and found the usual suspect - 6,000 messages hanging around doing nothing had used up his quota.

The odd thing from my perspective is that this fellow has no forwarders conflicting with same name pop accounts - in fact, he has no forwarders at all. He claims that he's downloaded all those messages at one time or another, so I can't explain to him why they're still on the server (I did tell him to make sure "save messages on server" isn't checked in his mail software).

In his last message he asked me if there is a way to set the mail program to automatically delete messages after a certain date. I don't know the answer.

But searching the forum here, and finding this thread makes me wonder if there's a way I could add a stripped down account specific version of the CMM feature to his WHM. That might help him until I can see if I can discover a way to "auto-delete" messages after X number of days.

I've been a loyal cPanel customer since 2001. Two things have remain constant since my introduction to cPanel:

1. I love cPanel and everything about it.

2. The more I learn, the less I know.

Regards,

JD
 

johndoe

Active Member
May 26, 2002
38
1
308
Modified version of CMM for hosting clients?

Hello forum members,

I have several hosting clients who have "multiple domain" accounts, and use cPanel with WHM. Yesterday I received a message from one of them about an email problem he was having. I went straight to his mail account and found the usual suspect - 6,000 messages hanging around doing nothing had used up his quota.

The odd thing from my perspective is that this fellow has no forwarders conflicting with "same name" pop accounts - in fact, he has no forwarders at all. He claims that he's downloaded every one of those 6,000 messages at one time or another, so I can't explain to him why they're still on the server (I did tell him to make sure "save messages on server" isn't checked in his mail software).

In his last message he asked me if there is a way to set the mail program to automatically delete messages after a certain date. I don't know the answer. Is there?

Searching the forum here, and finding this thread makes me wonder if there's a way I could add a stripped down "account specific" version of the CMM feature to his WHM. That might help him until I can see if I can discover a way to "auto-delete" messages after X number of days.

I've been a loyal cPanel customer since 2001. Two things have remained constant since my introduction to cPanel:

1. I love cPanel and everything about it.

2. The more I learn, the less I know.

Regards,

JD
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Are they checking messages via IMAP or POP3? If they are using IMAP then there will be a setting in their mail client to discard deleted messages after X days.
 
Last edited:

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
When using IMAP, the default is to leave the messages on the server and download a copy to the local computer. This can easily give the appearance that all messages were downloaded, when they are not. As David noted, one would need to configure the mail client in question to actually remove the messages from the IMAP server after receipt.