Default imap folders

Create default imap folders for Trash, Drafts and Sent.
This commit is contained in:
Javier Picado Ladrón de Guevara 2016-02-11 14:00:59 +01:00
parent dfd3a486d1
commit aa2ae98b2a

View file

@ -27,6 +27,12 @@ if [ -f /tmp/postfix/accounts.cf ]; then
mkdir -p /var/mail/${domain} mkdir -p /var/mail/${domain}
if [ ! -d "/var/mail/${domain}/${user}" ]; then if [ ! -d "/var/mail/${domain}/${user}" ]; then
maildirmake "/var/mail/${domain}/${user}" maildirmake "/var/mail/${domain}/${user}"
maildirmake "/var/mail/${domain}/${user}/.Sent"
maildirmake "/var/mail/${domain}/${user}/.Trash"
maildirmake "/var/mail/${domain}/${user}/.Drafts"
echo -e "INBOX\nINBOX.Sent\nINBOX.Trash\nInbox.Drafts" >> "/var/mail/${domain}/${user}/courierimapsubscribed"
touch "/var/mail/${domain}/${user}/.Sent/maildirfolder"
fi fi
echo ${domain} >> /tmp/vhost.tmp echo ${domain} >> /tmp/vhost.tmp
done < /tmp/postfix/accounts.cf done < /tmp/postfix/accounts.cf