我有以下 Postfix 配置文件来将电子邮件映射到其自身(所有凭证都是虚构的):
user = db_mailuser
password = mailuser_password
hosts = 127.0.0.1
dbname = mailserver
query = SELCET email FROM virtual_users WHERE email='%s'
当我这样做时(重新启动 postfix 后):
postmap -q [email protected] mysql:/etc/postfix/mysql-email2email.cf
然后 Postfix 转发以下 MySQL 消息:
postmap: warning: mysql 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 'SELCET email FROM virtual_users WHERE email='[email protected]'' at line 1
但此时我真的很困惑,因为语法没问题。我可以去 mysql 进行查询:
mysql> SELECT email FROM virtual_users WHERE email='[email protected]'
上面写着:
+-------------------------+
| email |
+-------------------------+
| [email protected] |
+-------------------------+
1 row in set (0.00 sec)
我的 Postfix 配置可能出了什么问题?
先感谢您...
答案1
如果这是真正的复制和粘贴,那么您拼写错误了。它的选择沒有選擇
哎呀!(我经历过这种事)