1

Topic: Warning: autocreate plugin is deprecated, use mailbox { auto } setting

==== Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Linux/BSD distribution name and version: freebsd 9.2
- Related log if you're reporting an issue:
dovecot.log
Dec 18 18:03:07 imap-login: Info: Login: user=<don@alfaholicy.org>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=11792, secured, session=<VZblBNLtNAB/AAAB>
Dec 18 18:03:07 imap(don@alfaholicy.org): Warning: autocreate plugin is deprecated, use mailbox { auto } setting instead
Dec 18 18:03:07 imap(don@alfaholicy.org): Info: Disconnected: Logged out in=233 out=923
====

2 (edited by riverco 2013-12-19 03:21:36)

Re: Warning: autocreate plugin is deprecated, use mailbox { auto } setting

Hi,

here is my two cents am sure Zhang knows more :
first of all it is very odd this warning occurs if i am correct you had dovecot already installed before installing iredmail. Iredmail expects a clean system so it can perform a nice very good working system install. This is because there are so many versions out there of everything as is the case with dovecot. Your version of dovecot is different therefor you will need to make manual changes to the dovecot.conf file. (or ignore the warnings as it  still works just mentions this warning in the log as the function is deprecated and will be removed later)

the function mentioned that is deprecated as of 2.1+
http://wiki2.dovecot.org/Plugins/Autocreate

The entries to add to dovecot.conf
http://wiki2.dovecot.org/MailboxSettings

Also all references to auto-create must be removed or commented out.
(autocreate removed form mail_plugins and

find autocreate entries and comment them out as below.

# Plugin: autocreate. Create and subscribe to default IMAP folders.
    #autocreate = INBOX
    #autocreate2 = Sent
    #autocreate3 = Trash
    #autocreate4 = Drafts
    #autocreate5 = Junk
    #autosubscribe = INBOX
    #autosubscribe2 = Sent
    #autosubscribe3 = Trash
    #autosubscribe4 = Drafts
    #autosubscribe5 = Junk


However I highly suggest to do a clean build and build iredmail as it should  to avoid more issues and make it easily to support.

just my two cents smile
regards,

3

Re: Warning: autocreate plugin is deprecated, use mailbox { auto } setting

Thanks riverco for the helpful answer. Just my two cents:

*) First of all, it's a warning message, it doesn't impact your mail services.
*) Dovecot-2.2 deprecates plugin 'autocreate', and use "mailbox { auto }" instead. You can update your Dovecot config file to avoid this warning message if you want.

As @riverco mentions, you have to comment out all "autocreate =" and "autosubscribe =" lines, AND remove "autocreate" plugin name in "mail_plugins =" (both "protocol lda {}" and "protocol imap {}" blocks). Then, find below settings in dovecot.conf:

namespace {                                                                        
    type = private                                                                 
    separator = /                                                                  
    prefix =                                                                       
    #location defaults to mail_location.                                        
    inbox = yes
}

Now add below lines INSIDE this "namespace {}" block like below:

    mailbox Sent {
        auto = subscribe
        special_use = \Sent
    }
    mailbox Drafts {
        auto = subscribe
        special_use = \Drafts
    }
    mailbox Trash {
        auto = subscribe
        special_use = \Trash
    }
    mailbox Junk {
        auto = subscribe
        special_use = \Junk
    }

The final settings looks like below:

namespace {
    type = private
    separator = /
    prefix =
    #location defaults to mail_location.
    inbox = yes

    mailbox Sent {
        auto = subscribe
        special_use = \Sent
    }
    mailbox Drafts {
        auto = subscribe
        special_use = \Drafts
    }
    mailbox Trash {
        auto = subscribe
        special_use = \Trash
    }
    mailbox Junk {
        auto = subscribe
        special_use = \Junk
    }
}

Please let me know whether it works for you. You can test it with below steps:

*) Create a new testing mail user.
*) Configure your mail client like Outlook, Thunderbird to use this testing mail user. WARNING: Do NOT use Roundcube webmail, because it will create those default mail folders by default.
*) After you have mail client configured, check whether those mail folders (Sent, Trash, Drafts, Junk) are created automatically. If yes, that means your Dovecot config file was updated successfully. if not, please let me know, we have to fix it.