Search code examples
emailchef-infracentos6exim

chef server doesn't send mails


I have Chef-server 12 installed on CentOS 6.6. When I want to remind me a password for user on page https://ip/password-reset/new I don't get any mail and in exim logs I see

2016-04-27 14:52:17 1avQp7-0001iP-0U <= <> R=1avQp6-0001iO-Om U=exim P=local S=1611
2016-04-27 14:52:17 1avQp7-0001iP-0U => opscode <opscode@non_resorvable_fqdn> R=localuser T=local_delivery
2016-04-27 14:52:17 1avQp7-0001iP-0U Completed
2016-04-27 14:53:23 Start queue run: pid=6616
2016-04-27 14:53:23 End queue run: pid=6616

but when I send mail with xmail everything is fine

2016-04-27 14:45:05 1avQi9-0001g2-DL <= user@non_resorvable_fqdn U=ec2-user P=local S=611
2016-04-27 14:45:05 1avQi9-0001g2-DL gmail-smtp-in.l.google.com [2a00:1450:4013:c00::1a] Network is unreachable
2016-04-27 14:45:08 1avQi9-0001g2-DL => [email protected] R=dnslookup T=remote_smtp H=gmail-smtp-in.l.google.com [173.194.65.27] X=UNKNOWN:ECDHE-RSA-AES128-GCM-SHA256:128
2016-04-27 14:45:08 1avQi9-0001g2-DL Completed
2016-04-27 14:49:44 1avQme-0001hE-4B <= <> R=1avQme-0001hD-2t U=exim P=local S=1611
2016-04-27 14:49:44 1avQme-0001hE-4B => opscode <opscode@non_resorvable_fqdn> R=localuser T=local_delivery
2016-04-27 14:49:44 1avQme-0001hE-4B Completed

And I got this mail


Solution

  • Check your chef logs and MTA (exim, postfix, etc) logs and config. In my case, after instaling chef-manage, on Web UI after clicking "reset password" in log /var/log/chef-manage/web/current I found:

    [date] INFO -- :   Rendered password_reset_mailer/password_reset.text.erb (1.2ms)
    [date] sh: 1: /usr/sbin/sendmail: not found
    

    I installed postfix, and now mails are sent as they should. So I think that in your case exim is problem.