2

I've been following a guide on this site:

http://oskarhane.com/setup-your-own-mail-hosting-with-linux-postfix-dovecot-and-mysql/

To install postfix with dovecot and mysql on a Linux server. All going swimmingly. The only problem is that the following code (taken from Step 8) refers to an older version of Dovecot. I've managed to follow the error messages enough to update what I can, but I'm getting an error on the declaration of the socket, and I'm stumped. Here's the proposed code:

protocols = imap imaps pop3 pop3s
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n/Maildir

ssl_cert_file = /etc/ssl/certs/dovecot.pem
ssl_key_file = /etc/ssl/private/dovecot.pem

namespace private {
    separator = .
    prefix = INBOX.
    inbox = yes
}

protocol lda {
    log_path = /home/vmail/dovecot-deliver.log
    auth_socket_path = /var/run/dovecot/auth-master
    postmaster_address = [email protected]
    mail_plugins = sieve
    global_script_path = /home/vmail/globalsieverc
}

protocol pop3 {
    pop3_uidl_format = %08Xu%08Xv
}

auth default {
    user = root

    passdb sql {
        args = /etc/dovecot/dovecot-sql.conf
    }

    userdb static {
        args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
    }

    socket listen {
        master {
            path = /var/run/dovecot/auth-master
            mode = 0600
            user = vmail
        }

        client {
            path = /var/spool/postfix/private/auth
            mode = 0660
            user = postfix
            group = postfix
        }
    }
}

What I've managed to update this to is:

protocols = imap pop3
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n/Maildir

ssl_cert = /path/to/cert
ssl_key = /path/to/cert

namespace {
    type = private
    separator = .  
    prefix = INBOX. 
    inbox = yes
}

protocol lda {
    log_path = /home/vmail/dovecot-deliver.log
    auth_socket_path = /var/run/dovecot/auth-master
    postmaster_address = [email protected]
    mail_plugins = sieve
    sieve = /home/vmail/globalsieverc
}

protocol pop3 {
    pop3_uidl_format = %08Xu%08Xv
}

service auth {
    user=root
}

passdb {
    driver=sql
    args=/etc/dovecot/dovecot-sql.conf
}

userdb {
    driver=static
    args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
}

socket listen {
    master {
        path = /var/run/dovecot/auth-master
        mode = 0600
        user = vmail
    }

    client {
        path = /var/spool/postfix/private/auth
        mode = 0660
        user = postfix
        group = postfix
    }
}

The error is being thrown on the "socket listen" function in towards the end. I've been through the Dovecot documentation but I've not been able to work out what I've got to replace it with.

The error I'm getting is:

doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:108: sieve has been moved into plugin {} section
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 129: Unknown setting: socket

Can anyone shed any light on this?

1 Answer 1

2

I think I actually worked it out. I found this page in the Dovecot documentation (not well highlighted I must admit! I completely missed the tab at the top of the page):

http://wiki2.dovecot.org/Upgrading/2.0?highlight=%28unix_listener%29

I reverted to the original code block originally documented on the website:

protocol lda {
    log_path = /home/vmail/dovecot-deliver.log
    auth_socket_path = /var/run/dovecot/auth-master
    postmaster_address = [email protected]
    mail_plugins = sieve
    global_script_path = /home/vmail/globalsieverc
}

As the global_script_path is an even older again function, had to change it to the following:

protocol lda {
    log_path = /home/vmail/dovecot-deliver.log
    auth_socket_path = /var/run/dovecot/auth-master
    postmaster_address = [email protected]
    mail_plugins = sieve
} 

plugin {
    sieve_global_path = /home/vmail/globalsieverc
}

And then do the conversion. It worked (with some errors, but appeared to be applying the fixes) and restarting Dovecot worked without an issue.

Hopefully that's it now!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .