问题描述
从maillog日志中,查看错误日志如下:
Oct 17 20:43:43 cent6-test postfix[21948]: error: to submit mail, use the Postfix sendmail command
Oct 17 20:43:43 cent6-test postfix[21948]: fatal: the postfix command is reserved for the superuser
解决过程
把config/environments/production.rb中的关于sendmail的配置修改为如下:
ActionMailer::Base.delivery_method = :sendmail
ActionMailer::Base.sendmail_settings = {
:location => '/usr/sbin/sendmail.postfix',
:arguments => '-i -t'
}
号外
在解决的过程中尝试过如下的命令:
grep TrustedUser /etc/mail/*cf #查看信任的用户
网友评论