我的 MySQL Courier + Postfix 电子邮件服务器有问题
这是错误日志:
warning: mysql:/etc/postfix/mysql-virtual_domains.cf: query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'virtual FROM `domains` WHERE domain='domain.example'' at line 1
和代码mysql-virtual_domains.cf
:
user = mail_admin
password = mypassword
dbname = mail
query = SELECT domain AS virtual FROM `domains` WHERE domain='%s'
hosts = 127.0.0.1
该怎么办?
VIRTUAL 是 MySQL 中的关键字。
使用不同的别名,使用反引号转义标识符.. 或完全跳过
AS [alias]
部分:配置的映射virtual_alias_domains
仅用于检查是否有结果,而不是结果是什么: