changing /var/vmail path to /mnt/VMAIL

Discussion in 'Installation/Configuration' started by florix.net, May 3, 2018.

  1. florix.net

    florix.net Member

    Hi,

    I have added a new volume in my linode. Mounted it on /mnt/VMAIL

    Can i change few high use email clients to this directory?
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

  3. florix.net

    florix.net Member

    I want move it partially ... Don't want to move all emails.
    Can we make some domains to move on new mounted directory?
     
  4. florix.net

    florix.net Member

    I have this entry in fstab

    /dev/disk/by-id/scsi-0Linode_Volume_VMAIL /mnt/VMAIL ext4 defaults 0 2

    Should I bind /var/vmail to /mnt/VMAIL?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    no.
     
  6. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    You should be able to use multiple bind mounts to accomplish that, you just can't do it through the ispconfig interface. Eg. something like:
    Code:
    mv /var/vmail/domain1 /mnt/VMAIL
    mkdir /var/vmail/domain1
    chown 770 /var/vmail/domain1
    chmod vmail:vmail /var/vmail/domain1
    bindfs /mnt/VMAIL/domain1 /var/vmail/domain1
    
    That assumes "mv" works across filesystems on your system, which it may or may not (if not, use tar or something to copy, then delete the original). Then add an entry to /etc/fstab to bind mount /var/vmail/domain1 at boot, and repeat all steps for domain2, etc.
     
    ztk.me likes this.
  7. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    maybe, in addition, ease filesystem access more by changing [dbispconfig] mail_user.maildir entry for specific accounts ( no guarantee there are no downsides ) thus saving a few lookups
     
    Last edited: May 9, 2018
    florix.net likes this.
  8. florix.net

    florix.net Member

    There are two columns ...

    maildir and homedir

    can I simply edit it?
     
  9. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    yes, you can change both, even if it gets changed back for whatever reason, it shouldn't matter much - there's no open_basedire restriction like in php or suexec prefix needed like for apache.

    just if you happen to remove the mountpoint/symlink ... one would need to revert the change for obvious reasons.
     
  10. florix.net

    florix.net Member


    Works like charm ... I think add new user will be default to /var/vmail

    Can I change it ispconfig source files?
     
  11. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    oh yeah absolutely, no source change needed.
    go to system -> server configuration -> choose your server -> E-Mail tab and you see two template paths
     
  12. florix.net

    florix.net Member

    ohh .. we have this configuration ... then we can simply move /var/vmail to /mnt/vmail and then change the path.

    If I make the change in config, will it also change already existing entries in maildir and homedir?
     
  13. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    no, it won't change existing - maybe when using resync feature, but I don't know / wouldn't assume it.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    I recommend using what Jesse posted in #2 instead. This will cause the least trouble.
     
  15. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    my intention was an addition, create the bind to keep the expected file structure but to save some fs-lookups set the final path where possible.
     
    till likes this.

Share This Page