Mysql

由於配置中的特殊字元,dovecot mysql-connection 錯誤

  • November 14, 2015

我使用 froxlor 等成功設置了我的伺服器,但現在我的郵件傳遞代理出現錯誤,因為我在 mysql-pw 中使用了“#”。我試圖用’'來逃避它,但它似乎不起作用。:(

如何更改 /etc/dovecot/covecot-sql.conf.ext 以使其使用帶有特殊字元的密碼(讓我們以 pw“test#this 為例)?

我的目前配置:

driver = mysql
connect = host=127.0.0.1 dbname=froxlor user=froxlor password=test#test
default_pass_scheme = CRYPT

這是錯誤消息:

dovecot: auth: Warning: Configuration file /etc/dovecot/dovecot-sql.conf.ext line 2: Ambiguous '#' character in line, treating it as comment. Add a space before it to remove this warning.

鴿舍維基

# Use "host= ... pass=foo#bar" if your password has '#' character

所以你/etc/dovecot/dovecot-sql.conf.ext應該是

driver = mysql
connect = "host=127.0.0.1 dbname=froxlor user=froxlor password=test#test"
default_pass_scheme = CRYPT

引用自:https://unix.stackexchange.com/questions/121465