Delete old email accounts

alipour66m

Verified User
Joined
Feb 22, 2013
Messages
68
hello
is there a way to delete old email accounts from directadmin?
I have a webmail server with over 100.000 accounts (in directadmin imap)
I need really help
 
Hello,

Do you need to delete them all?

You should

1. remove information about email accounts from /etc/virtual/<domain.com>/passwd
2. remove folders from /home/<username>/imap/<domain.com>/
 
How to find old and unused email account?
for example an email account that had not beed used over 6 months?
 
Currently I don't need it for myself and that's hardly needed by other users of directadmin. So if you want me to write scripts please send me a PM for a quote.
 
I have an idea
I can find emails account from
cat /var/log/maillog | grep imap-login:\ Login | sed -e 's/.*Login: user=<\(.*\)>, method=.*/\1/g' | sort | uniq
and then insert them to a database daily

I need help in two step
1) above code find every email , how to change it to find today email logins
2) how to write a line to insert them in database?

tnank you
 
Hello,

We use an own script that identifies unused accounts (with very old emails in the imap "/new" folder) and send an e-mail to the account admin and an general report to server admin. It's very useful to keep the server clean. I'll post it soon.
 
Back
Top