Hi All, does anyone know of a way to automatically create user folder(s)? Like creating a Spam folder on login if not already there. I've googled a bit but couldn't find anything relevant. Any advice appreciated R /Lars
Thomas Mueller wrote:> hi larsHi.> if you're using PAM as pass-db: have a look at pam_mkhomedir.soI will.> if not -> maybe this is for you:http://wiki.dovecot.org/PostLoginScriptingEven better. Thanks /Lars PS. Please keep on list.> Lars Stavholm schrieb: >> Hi All, >> >> does anyone know of a way to automatically create user folder(s)? >> Like creating a Spam folder on login if not already there. >> I've googled a bit but couldn't find anything relevant. >> >> Any advice appreciated >> >> R >> /Lars
On Wed, 2007-09-26 at 18:10 +0200, Lars Stavholm wrote:> does anyone know of a way to automatically create user folder(s)?You can run a script at login by making the imap executable a script that does something and then executes the imap executable. Search the list archives, should turn up something. johannes -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 190 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070926/706ba99c/attachment-0002.bin>
On 9/26/2007, Lars Stavholm (stava at telcotec.se) wrote:>> if not -> maybe this is for >> you:http://wiki.dovecot.org/PostLoginScripting> Even better.But then this would happen for every user, at every login, when all you need is to do it once, when the new user is created... Postfixadmin does this automatically when the account is created, and this is the ideal time to do such things, no? -- Best regards, Charles
Charles Marcus wrote:> On 9/26/2007, Bill Landry (bill at inetmsg.com) wrote: >> These folders could easily be create dynamically by maildrop, if used >> as your MDA. I use it as my MDA between Postfix and Dovecot to >> automatically create spam folders for new accounts and also for >> delivering mail that exceeds our spam thresholds into the spam folder >> for end user review. > > So it sounds like this is a good candidate for an enhancement to the > dovecot LDA... >Why? Is this not available via sieve? -- Daniel
F?bio M. Catunda wrote:> Bill Landry escreveu: >> Lars Stavholm wrote: >> >>> Charles Marcus wrote: >>> >>>> On 9/26/2007, Lars Stavholm (stava at telcotec.se) wrote: >>>> >>>>>> if not -> maybe this is for >>>>>> you:http://wiki.dovecot.org/PostLoginScripting >>>>>> >>>>> Even better. >>>>> >>>> But then this would happen for every user, at every login, when all you >>>> need is to do it once, when the new user is created... >>>> >>> Very true. >>> >>> >>>> Postfixadmin does this automatically when the account is created, and >>>> this is the ideal time to do such things, no? >>>> >>> It is the ideal time, you're right about that. However, to my >>> understanding, Postfixadmin is a web interface for managing >>> postfix config and users in a mysql db. Not very automated. >>> Our users are normal unix users (we do use LDAP) and are not >>> stored in mysql. We use webmin/LDAP for user maintenance. >>> >> >> These folders could easily be create dynamically by maildrop, if used >> as your >> MDA. I use it as my MDA between Postfix and Dovecot to automatically >> create >> spam folders for new accounts and also for delivering mail that >> exceeds our spam >> thresholds into the spam folder for end user review. >> >> Bill >> >> > But with maildrop you still run the process of creating/checking on > every delivery, same thing as dovecot, right?Correct. If the folder does not exist, maildrop will create it on first delivery. If the end user deletes the folder, maildrop will recreate the folder on the next message delivery to that account. Bill
Daniel L. Miller wrote:> Charles Marcus wrote: >> On 9/26/2007, Bill Landry (bill at inetmsg.com) wrote: >>> These folders could easily be create dynamically by maildrop, if used >>> as your MDA. I use it as my MDA between Postfix and Dovecot to >>> automatically create spam folders for new accounts and also for >>> delivering mail that exceeds our spam thresholds into the spam folder >>> for end user review. >> >> So it sounds like this is a good candidate for an enhancement to the >> dovecot LDA... >> > Why? Is this not available via sieve?How do you create folder(s) using sieve? /L
On Wed, 2007-09-26 at 18:10 +0200, Lars Stavholm wrote:> Hi All, > > does anyone know of a way to automatically create user folder(s)? > Like creating a Spam folder on login if not already there. > I've googled a bit but couldn't find anything relevant.Since several people have asked already, I implemented a simple plugin for it. Works with both imap and deliver: http://dovecot.org/patches/1.0/autocreate-plugin.c A bit different for v1.1 (if you haven't defined namespaces, it doesn't work unless you use today's hg version): http://dovecot.org/patches/1.1/autocreate-plugin.c -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070930/8c784444/attachment-0002.bin>