Full Mail Server Solution w/ Virtual Domains & Users (Debian Etch)

Discussion in 'HOWTO-Related Questions' started by SirLancelot, Feb 29, 2008.

  1. SirLancelot

    SirLancelot New Member

    I thought I'd have a stab at building this on 2 xen boxes. All was going swimmingly until I came to configure the mx servers. I'm not sure if it's something that I've overlooked or if there are a couple of small errors in the guide, or a combination of both. I'll explain.
    When I try to mount the /var/vmail NFS volume from the file server onto the mx servers the volume mounts just fine, but if I try to cd to /var/vmail I get

    -bash: cd: /var/vmail: Permission denied

    The volume is mounted though as can be seen from :

    :~# mount
    /dev/sda1 on / type ext3 (rw,errors=remount-ro,usrquota,grpquota)
    tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
    udev on /dev type tmpfs (rw,mode=0755)
    192.168.1.9:/var/vmail on /var/vmail type nfs (rw,addr=192.168.1.9)

    In exports on the file server I have :

    /var/vmail 192.168.1.12(ro,insecure,subtree_check) 192.168.1.4(ro,insecure,subtree_check) 192.168.1.7(rw,no_root_squash,subtree_check) 192.168.1.5(rw,no_root_squash,subtree_check)

    and on the mx servers and the file server I have created the vmail user and directory with :

    # useradd -r -u 150 -g mail -d /var/vmail -s /sbin/nologin -c "Virtual Mailbox" vmail
    # mkdir /var/vmail
    # chmod 770 /var/vmail/
    # chown vmail:mail /var/vmail/

    and also when configuring postfix I changed the line :

    # postconf -e 'virtual_mailbox_base = /vmail'

    to read :

    # postconf -e 'virtual_mailbox_base = /var/vmail'

    Any help would be most appreciated. As I've tried various different combinations of above to no avail.
    Many thanks.
     
    Last edited: Feb 29, 2008
  2. SirLancelot

    SirLancelot New Member

    OK I figured it out. A bad case of unable to see the wood for the trees I think.
    It's working perfectly as it is. I'd forgotten the fact that I had applied chmod 770 so only the user vmail could brows the directory. I temporarily set to 775 to test and all was fine. then set back to 770.
     
  3. binjured

    binjured New Member

    This may be a stupid question, but here goes:

    This solution seems very thorough, but my only question is, can I use to manage mail for multiple domains? It seems like it was written in a manner to only accept/send mail via one domain, "example.com" in the how-to. I thought that using postfix w/ mysql and virtual domains lets me add multiple domains to this solution... is that still accurate? Is it as simple as creating the proper database entries after all is said and done?
     
  4. falko

    falko Super Moderator ISPConfig Developer

    You can use it for as many domains as you like. :)

    Yes.
     

Share This Page