I was thinking about how much space was getting used up by inactive e-mail accounts just collecting spam or whatnot and I wondered if there was a tool to remove users that hadn't authenticated with vpopmail in a long time as shown in vqadmin next to each username under the column 'Last Logon' not knowing there was a tool to do this for me I did all of my removals by hand until I just couldn't take it anymore and decided I would just see if there was a binary that came with vpopmail to do this for me which there was! It's easy to use as well and saved me so much time.

You should be able to find the binary here /home/vpopmail/bin/vdeloldusers, you can easily incorporate a crontab to run every week to remove old e-mail accounts like I've done.

Just to remove e-mail accounts that haven't been authenticated in 6 months or 180 days you just execute...


# /home/vpopmail/bin/vdeloldusers -a 180 -e -D

This will remove all e-mail accounts that haven't been used in 180 days or 6 months on every virtual domain you host

To see what would be removed you can easily just execute...


# /home/vpopmail/bin/vdeloldusers -a 180 -e -V

This will show you every virtual domain that you host with inactive e-mail accounts without removing them

Just running /home/vpopmail/bin/vdeloldusers will give you all the options you can pass to it so don't be afraid to use this binary! I was a little hesistant at first since I host so many domains but it works like a charm, I didn't know if it would update the last logon when a user is just using webmail/imap authentication but it did and of course it updates when a user does smtp authentication that was what I was kind of skeptic about but it works great!