Drupal (7 and 8) does not send mail from password reset form and I can not find any bug or failure. More interesting is that it does send mail notification that there is new drupal version.

I have checked following with positive results:

  • send mail from system
  • send mail from PHP CLI
  • send mail from PHP CLI as wwwrun user
  • send mail from php script in standard php webpage with mail() function.

I have separate /etc/msmtprc config file for apache and only apache can read it.

Apache php.ini contains:

error_log = /var/log/php_errors.log
sendmail_path = "/usr/bin/msmtp -C /etc/msmtprc_apache -t"
mail.log = /var/log/php_mail_errors.log

settings.php contains

$conf['error_level'] = 2;

Successful mails are logged in mail log. No failures. Apache error log and php log shows no errors. There are no significant entries in drupal database log.

If I change something in apache msmtprc configuration none of the mails from php are successful. Msmtp correctly relays on gmail with tls.

There is absolutely no indication of error. It seems that everything is OK from the system side but drupal still fails to send the password reset message. (Message is not in the spam nor sent items folder.)

Probably important note is that drupal is migrated to fresh openSUSE installation and that mail worked on old installation for all drupal sites (2x d7 and 1x d8). SELinux and AppArmor are currently not enabled.

Any help is appreciated...

1 Answer 1


Long answer in short: mod_rewrite was not active in apache :(

Failure drove me crazy so I finally started to think outside of the box :) Misleading point was initial error with msmtp configuration (owner of the config file must be wwwroot (in openSUSE case))...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.