>After examining other parts of code I decided to go for changing env_init procedure and ensure, that myHomeDir will be set up to point not to real home dir, but /data/mail/<user>.
The entire reason why there are separate myhomedir() and mymailboxdir() routines are to eliminate the need to do this.
The only files which are in myhomedir() instead of mymailboxdir() are those files which MUST be in the home directory. So making that change actually breaks something.
Well ... Requirement to change default location of directories for mail services is caused by specific environment. It requires no files in home directory that are not tied with a specific services. So all usual home directory files, related with mail services, in this environment must exists not in home directory (including INBOX, .imaprc, .mailboxlist and etc.). Otherwise I would probably go for linking mailsubdir directory where would I like it to be and do not look for any deeper changes in code.
So what I am really looking for is to change home directory returned by default in getpwnam() - not only IMAP folders directory. For other mail related services I am doing this too. So is it really a difference if ALL files will exists in /data/mail/<user> instead of directory, that is in /etc/passwd for a user ?
With best regards Martynas
