Difference between revisions of "Create Missing tmp maildir folders"

From James Dooley's Wiki
Jump to: navigation, search
(Created page with "Category:One Liners ==Overview== If a customer has an issue where mail is not showing up in their mailboxes but it does look like the server has the mail, and mailperms h...")
(No difference)

Revision as of 15:22, 4 April 2012


Overview

If a customer has an issue where mail is not showing up in their mailboxes but it does look like the server has the mail, and mailperms has not solved the problem, it may be due to the tmp directory being missing.

From the users mail directory you can run this script to generate tmp directories. Keep in mind that right now it is only set for a single user and will only fix sub directories. You can manually create tmp folders also using:

[bash,n] mkdir tmp chown $user. tmp chmod 700 tmp

Script

[bash,n] for dir in $(find -type d -maxdepth 1 | grep "\./\."); do mkdir $dir/tmp; chown $user. $dir/tmp; chmod 700 $dir/tmp;done

What to change

You will need to change $user to the actual account owner.

Also this script must be run in /home/$user/mail/.user@domain.com/