自升级以来的 Dovecot.conf 帮助

自升级以来的 Dovecot.conf 帮助

我一直在关注这个网站上的指南:

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

在 Linux 服务器上安装带有 dovecot 和 mysql 的 postfix。一切顺利。唯一的问题是以下代码(取自步骤 8)引用了旧版本的 Dovecot。我设法按照错误消息更新了我能更新的内容,但我在套接字声明时遇到了错误,我不知所措。以下是建议的代码:

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
        }
    }
}

我已设法将其更新为:

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
    }
}

错误是在“套接字监听”函数快结束时抛出的。我查看了 Dovecot 文档,但还不知道该用什么来替换它。

我收到的错误是:

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

有人可以解释一下这个问题吗?

答案1

我认为我已经解决了这个问题。我在 Dovecot 文档中找到了此页面(我必须承认,它没有很好地突出显示!我完全错过了页面顶部的选项卡):

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

我恢复了网站上最初记录的原始代码块:

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
}

由于 global_script_path 是一个更旧的函数,因此必须将其更改为以下内容:

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
}

然后进行转换。转换成功了(有一些错误,但似乎正在应用修复)并且重新启动 Dovecot 也没有问题。

希望现在就这样!

相关内容