v0idnull writes:
How would one manually setup folders on the creation of a new mailbox?Essentially I'm running a virtual user only mail server and would want default mail folders created for each new box. I've been experimenting with this by just creating a Sent and Trash folder. I've created a very dirty shell script to accomplish this task but there are no results and I'm not sure what I'm missing:#!/bin/sh # make initial mailbox cd /usr/local/virtual maildirmake $1 # make Sent and Trash mailbox folders cd $1 maildirmake .Sent maildirmake .Trash # subscribe to the Sent and Trash folders echo -e "INBOX\nINBOX.Sent\nINBOX.Trash" >> courierimapsubscribed # misc cd .. chown -R postfix:postdrop $1 chmod -R 700 $1 cd $1 # Sent folder setup touch .Sent/maildirfolder touch .Sent/courierimapacl touch .Sent/courierimapuiddb mkdir .Sent/courierimapkeywords chmod 700 .Sent/courierimapkeywords chmod 644 .Sent/courierimapacl chmod 644 .Sent/courierimapuiddb chown -R postfix:postdrop .Sent # Trash folder setup touch .Trash/maildirfolder touch .Trash/courierimapacl touch .Trash/courierimapuiddb mkdir .Trash/courierimapkeywords chmod 700 .Trash/courierimapkeywords chmod 644 .Trash/courierimapacl chmod 644 .Trash/courierimapuiddb chown -R postfix:postdrop .TrashThis script works fine, but I still don't see the folders in any email client.
A lot of the manual stuff you're doing can be done by the -f flag to maildirmake, but I see nothing wrong with the above.
pgppOPBNsRYDA.pgp
Description: PGP signature
