# First, add the global entry in aliases
cat << EOF > /etc/aliases.minimalist-sample

# minimalist global entry:
minimalist:	"|/usr/sbin/minimalist.pl -d /etc/minimalist" 
#
# sample mailing list:
list-sample:	"|/usr/sbin/minimalist.pl -d /etc/minimalist list-sample"
list-sample-owner:	owner@myhost.mydomain.myzone
EOF

# Create config files directory
mkdir -p /etc/minimalist						&&

# Copy sample files
cp ./sample/lists.lst /etc/minimalist/lists.lst-sample			&&
cp -r ./sample/sample /etc/minimalist/					&&
cp ./minimalist.conf-sample /etc/minimalist/				&&

# Copy the progam file...
cp -v ./minimalist.pl /usr/sbin						&&

# Make spool dir
mkdir -p /var/spool/minimalist						&&
mkdir -p /var/spool/minimalist/list-sample				&&
echo "user@domain.zone" > /var/spool/minimalist/list-sample/list	&&
chown nobody.nogroup /var/spool/minimalist/list-sample			&&
chown nobody.nogroup /var/spool/minimalist/list-sample/list		&&

# Copy the help files
mkdir -p /usr/doc/minimalist						&&
cp -r ./docs /usr/doc/minimalist
