changing /var/vmail path to /mnt/VMAIL

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

  1. Member


    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 ISPConfig Developer Staff Member ISPConfig Developer

  3. 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. 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

  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    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:
    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.
 likes this.
  7. ISPConfig Developer ISPConfig Developer

    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 likes this.
  8. Member

    There are two columns ...

    maildir and homedir

    can I simply edit it?
  9. ISPConfig Developer ISPConfig Developer

    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. Member

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

    Can I change it ispconfig source files?
  11. ISPConfig Developer ISPConfig Developer

    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. 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. ISPConfig Developer ISPConfig Developer

    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. ISPConfig Developer ISPConfig Developer

    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