I am using Nextcloud 29.0.4 with msmtp to send e-mails.
Nextcloud is correctly sending all e-mails like those test e-mails, e-mails for new account creation, or for Suspicious IP connection, …
The only thing that is not working is when users using the “Forgotten password” feature they do not receive an e-mail to reset their password.
Nextcloud log is not saying anything about e-mails.
msmtp log shows that the message was properly sent.
When testing to send e-mails straight from msmtp from my server, the mail is properly sent and received.
As mentionned, all other e-mails sent by Nextcloud are properly sent and received.
several of my users have tested this, including myself.
Unfortunately you ignored the support template and didn’t provide any valuable information, like server, network, email server setup, etc., which would allow to analyze the issue. One shot in the dark:
Nextcloud is not delivering email, only handing it over to your email tool. If msmtp logs that email has been delivered you should be able to see if it has been addressed correctly.
Beside that you have not written how you have tested sending an email from the server. Nextcloud is running under the webserver user, e.g. wwwrun or www-data, and therefore there are several possible reasons what could have gone wrong.
Nextcloud runs on a Linux Mint 21.3 Cinnamon.
Mails are sent through msmtp.
Nextcloud runs under the user www-data
I’ve tested sending message with this command (for root)
sudo -u www-data sendmail my_address@gmail.com
And I receive messages in my gmail mailbox.
Test mails sent from Nextcloud are well receive in my e-mail @telenet.be
the config for msmtp is:
# Telenet
account default
host smtp.telenet.be
# use IP address to force usage of IPv4
#host 195.130.132.10
# When using IP instead of domain name, the certificate verification fails
#tls_certcheck off
# source_ip also allows to force IPv4 - It is a better option
source_ip 192.168.12.4
port 587
tls on
tls_starttls on
auth on
user my_address@telenet.be
from my_address@telenet.be
password *********
Here is what typically appears in msmtp log file when sending messages. Such a line is there everytime I click on “Forgot password” providing either a valid username or know e-mail from Nextcloud.
Aug 13 16:48:25 host=smtp.telenet.be tls=on auth=on user=my_address@telenet.be from=my_address@telenet.be recipients=my_address@yahoo.fr mailsize=20359 smtpstatus=250 smtpmsg='250 2.0.0 Message accepted for delivery (zSoQ2C00G4FKC2M01SoRKQ)' exitcode=EX_OK
(I have replaced real addresses with my_address)
I have created a test user in Nextcloud, logged in once manually an logged out. Then asked to reset password from Nextcloud logon page. Neither my test user nor other users are receiving this message.
I guess that Nextcloud is sending this message the same way it is sending other e-mails. I do not understand why theses password reset messages are not received.
I do not understand what you mean exactly by sending directly to smtp.telenet.be.
I believe this is what msmtp is doing, using my_address@telenet.be as from field for the e-mail to be sent.
You could use Send mode: SMTP instead of sendmail in the webUI, as in the screenshot here, and then enter the same credentials you use in msmtp.
For system/OS messages you can still leave msmtp in place, but Nextcloud would then connect directly to the smtp server instead of sending the message through msmtp.
I get the exact same result:
All e-mails generated by Nextcloud are received (test, new account, e-mail address change, etc…), but the expected mail that Nextcloud should send when the user clics “Forgot Password” never comes.
I am using version Nextcloud Hub 8 (29.0.4). Are any of you using the same version without that issue ?
Do you send the password forgotten mails of test-user to the same mail domain as the test mails?
Many mailservers reject mails, if the sender’s origin cannot be found via reverse-DNS or if the sender’s mail-origin does not fit to the resolved maildomain.
Yes, I am on 29.0.4 as well, and I just tested it with both the username and the email address, and I received both password reset emails immediately. So unfortunately I’m not sure what could be causing this issue.
The only thing I can think of is that the messages may be classified as spam or phishing by the spam filters of some providers and then be either rejected or end up in the spam folders of the respective users. However, since you wrote that other notification emails are being received, I would find it rather odd if that were actually the case, so still not sure unfortunately…
But to summarize it, the email is successfully sent with both mechanisms but not arriving in the recipients inbox. In this case I would normally say that Nextcloud should be out of the game, because the message has successfully been handed-over to the remote email server.
If anything would be wrong with an email Google would directly reject it or return it to the sender account again (that’s at least my experience). BTW, if Google tries to return it to the sender, it should most likely pop-up in the inbox of the user whos account you have configured as From address.
Indeed, by enabling the DEBUG logging in nextcloud, I can see that Nextcloud is indeed sending the e-mail (or at least is says so )
And as I receive the other message types sent by Nextcloud, I am also coming to the conclusion that the message is indeed sent, and filtered by something at the level of the mail servers…
Depending on the kind of spam a mailserver can discard “Spam” without rejecting or notification, specially, if it recognizes the sender’s mailaddress as bogus.
Maybe you can find in the mails you received more information in the mail-header. Read the header from bottom to top.