Create Xen DomU Mailserver

# set domU parameter
[ -z $DOMAIN_NAME ] && DOMAIN_NAME=mx
[ -z $DOMAIN_MAC ] && DOMAIN_MAC=00:11:22:7E:7E:7E
[ -z $DOMAIN_RAM ] && DOMAIN_RAM=512Mb
[ -z $DOMAIN_HDD ] && DOMAIN_HDD=4Gb

# create domU
##http://www.panticz.de/Xen-domU-ubuntu-jaunty
http://www.panticz.de/DomU-Debian-Wheezy

# add to autostart (optional)
ln -s /etc/xen/${DOMAIN_NAME} /etc/xen/auto

# create lvm for home
lvcreate --name ${DOMAIN_NAME}-home --size 128G vg0
mkfs.ext4 /dev/vg0/${DOMAIN_NAME}-home

# configure domU
vi /etc/xen/${DOMAIN_NAME}
(add)
'phy:/dev/vg0/mx-home,sda3,w'

# post config domU
mount /dev/vg1/${DOMAIN_NAME}-disk /mnt/
echo "/dev/sda3 /home ext4 defaults 0 0" >> /mnt/etc/fstab
umount /mnt

# start domU
xm create -c ${DOMAIN_NAME}

# install mailserver
http://www.panticz.de/install_mx