Email Service not working & no logs

Hello again,

I recently began using Rockstor as my NAS solution, this forum already helped me fix my first issue. I am having an issue with the email service not working correctly now.

I also run a Nextcloud server that is using identical SMPT settings and it works without an issue.

When I try to go check the logs at /var/logs/maillog it does not exist.

I want to add that, when I delete the SMTP settings, a successful email will go through. Then when I try to add the credentials again, it does not work.

These credentials work fine with other systems.

@m1dori I finally found some time to try to reproduce. I’ve use a yahoo mail account, but I am running into similar issues. Blanking out the credentials doesn’t make a difference, still the same error message (which I think has to do with the mail service, whether you can send without authentication or not).

After saving it with the password set, etc. and then trying to send a test mail from here (like you did in the end as well):

it gives the same success message like you displayed in your screenshot. I checked journalctl again (using journalctl -xe | grep postfix) and finally found some error messsage (when I was using the sent test mail during the setup, nothing seemed to show up in the journalctl log. the /var/mail/maillog never showed up.
I stripped the time stamp but all messages were within a second of each other. I also masked the email addresses:

 RockNAS postfix/smtpd[31662]: connect from localhost[127.0.0.1]
 RockNAS postfix/smtpd[31662]: EF7F1321A21: client=localhost[127.0.0.1]
 RockNAS postfix/cleanup[31665]: EF7F1321A21: message-id=<20230823145123.EF7F1321A21@localhost>
 RockNAS postfix/smtpd[31662]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 commands=4
 RockNAS postfix/qmgr[19557]: EF7F1321A21: from=<yahooUser1@yahoo.com>, size=773, nrcpt=1 (queue active)
 RockNAS postfix/smtp[31666]: SMTPS wrappermode (TCP port 465) requires setting "smtp_tls_wrappermode = yes", and "smtp_tls_security_level = encrypt" (or stronger)
 RockNAS postfix/smtp[31666]: warning: relayhost configuration problem
 RockNAS postfix/smtp[31666]: EF7F1321A21: to=<voodoo123@gmail.com>, relay=none, delay=0.16, delays=0.03/0.05/0.08/0, dsn=4.3.5, status=deferred (Host or domain name not found. Name service error for name=smarthost.corp.yahoodns.net type=A: Host found but no data record of requested type)

This setup has worked in the past (but I think the last time I had it set up and used it was before we moved from CentOS to OpenSuse, so that doesn’t mean anything really).

The above was using port 465 (because that was my previous setup). However, when I used the “default” 587 (which is also available for yahoo mail) I would still get the error during the test in the setup screen, however, after saving and then sending a test mail, it actually went through!

RockNas postfix/smtp[17140]: EF7F1321A21: to=<voodoo123@gmail.com>, relay=smtp.mail.yahoo.com[67.195.12.42]:587, delay=1494, delays=1491/0.05/1.5/1.5, dsn=2.0.0, status=sent (250 OK , completed)
RockNas postfix/qmgr[17137]: EF7F1321A21: removed
RockNas postfix/smtpd[29728]: connect from localhost[127.0.0.1]
RockNas postfix/smtpd[29728]: A0F36321D16: client=localhost[127.0.0.1]
RockNas postfix/cleanup[29730]: A0F36321D16: message-id=<20230823151656.A0F36321D16@localhost>
RockNas postfix/smtpd[29728]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 commands=4
RockNas postfix/qmgr[17137]: A0F36321D16: from=<yahooUser1@yahoo.com>, size=773, nrcpt=1 (queue active)
RockNas postfix/smtp[17140]: A0F36321D16: to=<voodoo123@gmail.com>, relay=smtp.mail.yahoo.com[66.218.88.167]:587, delay=3.4, delays=0.05/0/1.2/2.2, dsn=2.0.0, status=sent (250 OK , completed)
RockNas postfix/qmgr[17137]: A0F36321D16: removed
2 Likes

@Hooverdan Well that is very interesting, thank you for looking into this for me.

I also switched to the default port of 587 and it appears to be working, despite telling me it won’t before hitting submit.

I also received some of the previous emails, so I think when you don’t use the default port, something is causing the emails to be held up. Once I deleted it, they seemed to have gone straight through.

I appreciate your help and feedback and have a great rest of the week.

3 Likes

Reading more about this, 587 is the “official” port supporting TLS encryption with 465 being a backup (in my yahoo mail tests that obviously didn’t work). Since in this setup TLS is permanently activated, I guess that’s going to be the one to use. Other ports possibly make sense only when one uses a private mail server that’s configured differently to support another port with TLS.

When I ran the authentication test step-by-step directly in python, it mostly gave me a “server suddenly disconnected” (not the exact wording but something to that effect) message after it seemed to have a successful login … maybe that’s why it shows the error message during setup, but seems to work fine when sending a test message after the fact.

2 Likes