Jump to: navigation, search
MithiWiki Home > ConnectXf Home > ConnectXf Administration > Configuration > Mailstore is getting full


Troubleshooting Icon.png
Troubleshooting
Product ConnectXf
Version All
Applies to Administrators
Level Advanced




Mailstore partition is running full, it is almost 95% full

Symptoms

  • Users are unable to send/receive emails or Log-in to Webmail client.
  • Some of the partitions in the server HDD are running 100% full or nearing full.

Diagnosis

  • We've checked for total disk space utilization across all partitions using:
df -mh
  • Amongst the partitions, /mailstore partition is apparently running 100% full or nearing Full.
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda8              200G  200G  0G  100% /mailstore 

Cause

  • As all emails are stored in /mailstore partition on mail server, there is a possibility of server running out of storage space on that partition.
  • This problem arises when user's quota management is not configured accurately and old messages are occupying vital storage space in /mailstore partition.
  • In such case the server is unable to deliver any new emails to any user's mailbox as situated in /mailstore partition.

Resolution

Check the quota of all the users

  • Check if anyone is exceeding the mail quota
/mithi/mcs/bin/getquota.sh domain.com --all -mb > /root/userquota.csv
  • You can import this csv in excel and get the list of users exceeding quota OR having large mailboxes
  • Inform these users to reduce their mailstore.

Check if any particular user/folder is taking space in mailstore partition

  • Check the size of all folders in the mailstore partition
du -h --max-depth=4 /mailstore
  • Clear the unwanted folders.

Other than this you can clear the mailstore as follows

  • Clear Trash for all the users
/mithi/mcs/bin/agent_delete_old_messagesEX.sh --all localdomain.com trash 1
  • Clear mails older that 90 days from all user's inbox
/mithi/mcs/bin/agent_delete_old_messagesEX.sh --all localdomain.com inbox 90

The above command will delete all emails older than 90 days from inbox and trash folder of all the users. The no. of days can be modified as per your requirement.

  • Now re-check the disk utilization status using:
df -mh 
  • In case the /mailstore partition is yet not adequately free, then re-run above command to delete old emails over a larger period.
  • Sometimes Archive Folder may also contains emails. It is a good practice to check for .archive folder size as well.
du -sh /mailstore/<domain>/p001/postmaster/Maildir/.archive/
  • If the output is considerably large the re-run the following command to delete old archive emails:
/mithi/mcs/bin/agent_delete_old_messagesEX.sh --all localdomain .archive 90

Recommendation

  • Ensure that one monitors the Disk usage periodically. In case some partition exceeds 75%, then either clean the partition or extend storage.

To clear the mailstore regularly set an agent on the server:


 /mithi/mcs/bin/addagent.sh delete_user_mails -restartagents t -display_name "delete user mails" -status on -schedule '0 22 * * *'  -alert_send 1 -alert_mode 2 -alert_level 1 -agent_program_path /mithi/mcs/bin/agent_delete_old_messagesEX.sh -agent_params 'user1,user2 domain.com inbox 30'

If the quota policy is not set then configure the quota policy