Unknown internal error doing a GET to /api/email

Brief description of the problem

Email alerts is not working. Trying to go back to the Email Alerts page after configuration triggers this error.

Detailed step by step instructions to reproduce the problem

I configured the parameters in the “Email Alerts” section/page, everything seemed correct.
I sent a test email, that never got through. So I checked the /var/log/maillog as instructed, only to find that there was no maillog file in /var/log.
So I went back to the “Email Alerts” page and got this error.

Web-UI screenshot

Error Traceback provided on the Web-UI

empty

Sorry, apparently the error page was just a random error.
Every page was giving that error until I did a logout/login.
Unfortunately BTW the Email Alerts functionality is actually not working, and the maillog file is not present.

I’m using Rockstor 5.0.14.0 on openSuse Leap 15.6, updated today from the “Testing Updates” channel.

hello again @Cris70
did you get a chance to look at the Rockstor log after attempting to send your test mail in
/opt/rockstor/var/log?
Maybe that will give some additional insights on whether Rockstor runs into problems even before it attempts to send the mail?

2 Likes

I finally had time to test email alerts on a 5.0.14-0 version, and while it took a while for the mail(s) - I sent a few ones, since they didn’t seem to come through) to be delivered, I did receive it.

I checked the postfix service configuration under

/etc/postfix/main.cf

and at the end of that file I could find the Rockstor initiated configuration:
highlighted by the bookends of:

####BEGIN: Rockstor section####
...
####END: Rockstor section####

Depending on the mail stmp server defined, I had to set up an app specific password (this was yahoo mail) to get it to work.

3 Likes

Thank you @Hooverdan for your replies.
I tried looking at the /opt/rockstor/var/log/rockstor.log file, but it does not show anything after the initial boot messages (I just did a reboot just in case…).
I also looked at the other log files present in that directory, but I find no trace of the several test emails that I tried to send.
I also took a look at the /etc/postfix/main.cf file: I found the Rockstor configuration as shown in your message above. Everything seems correct, but even if it was not I would expect to find an error in a log somewhere, or at least an error popup in the web GUI.
Instead, it’s as if nothing was actually done in response to my click on the “Send a test email” button, even if I do get a popup saying that the email was successfully sent.

Ok, I finally found something in /var/spool/mail /root:

Reporting-MTA: dns; dc-rockstor.<AMENDED>
X-Postfix-Queue-ID: 3952845AF
X-Postfix-Sender: rfc822; root@dc-rockstor.<AMENDED>
Arrival-Date: Fri, 25 Oct 2024 16:50:54 +0200 (CEST)

Final-Recipient: rfc822; <AMENDED>
Original-Recipient: rfc822;root@dc-rockstor.<AMENDED>
Action: delayed
Status: 4.4.2
Diagnostic-Code: X-Postfix; lost connection with smtps.aruba.it[62.149.156.218]
while receiving the initial server greeting
Will-Retry-Until: Wed, 30 Oct 2024 15:50:54 +0100 (CET)

I have only found one such error, despite several attempts at sending test emails, but this may be due to the delay with which postfix notifies the errors, I don’t know.

Anyway, at least this error gives me something to investigate.

I’ll keep you posted.

1 Like

Got it!
In the output from postfix.service I found this:

Oct 27 22:17:36 dc-rockstor.<AMENDED> postfix/smtp[21874]: SMTPS wrappermode (TCP port 465) requires setting "smtp_tls_wrappermode = yes", and "smtp_tls_security_level = encrypt" or stronger.

Configuring those two settings in main.cf fixed the problem, and all the past messages finally came through!

3 Likes

Great you found the resolution. So, you had to add smtp_tls_wrappermode and update smtp_tls_security_level in the main.cf?

For other’s reference, here’s a short blurb on what you seemed to have run into:

https://www.postfix.org/postconf.5.html#smtp_tls_wrappermode

2 Likes

Hi @Hooverdan !
Yes, that’s exactly what I had to do!

2 Likes