Difference between revisions of "Create Missing tmp maildir folders"
From James Dooley's Wiki
(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...") |
|||
| Line 6: | Line 6: | ||
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: | 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: | ||
| − | < | + | <source lang='bash'> |
mkdir tmp | mkdir tmp | ||
chown $user. tmp | chown $user. tmp | ||
chmod 700 tmp | chmod 700 tmp | ||
| − | </ | + | </source> |
==Script== | ==Script== | ||
| − | < | + | <source lang='bash'> |
for dir in $(find -type d -maxdepth 1 | grep "\./\."); do mkdir $dir/tmp; chown $user. $dir/tmp; chmod 700 $dir/tmp;done | for dir in $(find -type d -maxdepth 1 | grep "\./\."); do mkdir $dir/tmp; chown $user. $dir/tmp; chmod 700 $dir/tmp;done | ||
| − | </ | + | </source> |
==What to change== | ==What to change== | ||
Latest revision as of 14:23, 25 March 2014
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:
mkdir tmp
chown $user. tmp
chmod 700 tmp
Script
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/