hey how do I change the default location of the user (or default new users) maildir?
currently at
/home/$domain/homes/$user/Maildir
I want to change it to
/Thisdir/$domain/homes/$user/Maildir
Please note I do not want to simply change /home/ to /thisdir/ - as it would upset the webhosting side of things. I just want to put email in a separate place, is this poss?
Hrm… I unfortunately don’t think there’s a way to do that.
The way Virtualmin is designed, it assumes all users go into /home/$domain, and that email users go into a subdirectory underneath that dir.
The best I can think of is that you may be able to write up a bit of a hack to get around that, but it wouldn’t be pretty
I believe that in System Settings -> Module Config -> Actions upon Server and User creation, that “Command to run before making changes to a server” is triggered whenever creating a user. You could always write up a script to manually make the changes you’re after – as what you’d essentially need to do is change the email user’s home directory.
That’ll require some custom shell scripting and perhaps a little bit of luck
I think this works if I do it manually, so yeah I think a script somewhere in “Actions upon Server and User creation” to run just after user creation may do the trick.
Manual Steps
Create /$nfs-share/$domain/homes/$user
Change user home directory to above in LDAP database
To help anybody else having an issue with trying to host the mail on an S3 bucket rather than their EC2 instance there are issues with timestamps between the 2 filesystems which causes “Warning: Created dotlock file’s timestamp is different than current time” errors. So close, but no cigar.