我正在配置 Postfix 以使用外部 smtp。为此,我使用了本教程
跟踪之后,在日志中发现/etc/postfix/sasl_passwd.db无法读取。该文件不存在。我使用 postmap hash:/etc/postfix/sasl_passwd ( http://postfix.state-of-mind.de/patrick.koetter/smtpauth/smtp_auth_mailservers.html ) 作为 root,但我得到:
postmap: fatal: open database /etc/postfix/sasl_passwd.db: Permission denied
Run Code Online (Sandbox Code Playgroud)
为什么我会得到这个?
OS: Fedora 14
User "postfix" exists.
Run Code Online (Sandbox Code Playgroud)
更新:
sudo ls -l /etc/postfix/sasl_passwd.db ls:
cannot access /etc/postfix/sasl_passwd.db: No such file or directory
touch /etc/postfix/sasl_passwd.db
chmod 640 /etc/postfix/sasl_passwd.db
chown postfix:root /etc/postfix/sasl_passwd.db
sudo ls -l /etc/postfix/sasl_passwd.db
-rwxr--r--. 1 postfix root 0 Feb 19 04:16 /etc/postfix/sasl_passwd.db
-rw-r-----. 1 postfix root 0 Feb 19 04:16 /etc/postfix/sasl_passwd.db
postmap hash:/etc/postfix/sasl_passwd
postmap: fatal: cannot remove zero-length …Run Code Online (Sandbox Code Playgroud)