SMTP emails not being sent with defined domain

Description

There is a strange behaviour with emails being sent with SMTP method. If I define the hostname uranus.lan, everything is functional. However this breaks the mDNS authentication in a Mac.

Hostname is not correctly defined but X-TrueNAS-Host had the correct hostname, so emails work:

# cat /etc/resolv.conf nameserver 192.168.1.1 # hostname uranus.lan # hostname -f uranus.lan. # cat /var/log/mail.log # echo 'This is a test.' | mail -s 'Hello World' hello@domain.com Nov 26 02:50:45 uranus middlewared[1086]: sending mail to hello@domain.com Content-Type: multipart/mixed MIME-Version: 1.0 Subject: Hello World From: Uranus <mail@icloud.com> To: hello@domain.com Date: Sat, 26 Nov 2022 07:50:44 -0000 Message-ID: <truenas-20221126.075044.617651.b'-jhK'@uranus.lan> Content-Transfer-Encoding: 8bit X-Mailer: TrueNAS X-TrueNAS-Host: uranus.lan

If I define correctly the hostname, mDNS authentication is fixed, but emails are not being sent anymore:

# cat /etc/resolv.conf domain lan nameserver 192.168.1.1 # hostname uranus # hostname -f uranus.lan # echo 'This is a test.' | mail -s 'Hello Broken' hello@domain.com # cat /var/log/mail.log Nov 26 02:59:12 uranus middlewared[1086]: sending mail to hello@domain.com Content-Type: multipart/mixed MIME-Version: 1.0 Subject: Hello Broken From: Uranus <mail@icloud.com> To: hello@domain.com Date: Sat, 26 Nov 2022 07:59:10 -0000 Message-ID: <truenas-20221126.075910.998769.b'U1UN'@uranus> Content-Transfer-Encoding: 8bit X-Mailer: TrueNAS X-TrueNAS-Host: uranus

As you can see, X-TrueNAS-Host is not looking for the full hostname as it should, which makes the email to fail being sent.

Problem/Justification

None

Impact

None

Activity

Show:

FlorenNovember 30, 2022 at 6:46 PM

Thank you ! I’ll wait for the 22.12.0 release.

Automation for JiraNovember 30, 2022 at 5:55 PM

This issue has now been closed. Comments made after this point may not be viewed by the TrueNAS Teams. Please open a new issue if you have found a problem or need to re-engage with the TrueNAS Engineering Teams.

CalebNovember 30, 2022 at 5:55 PM

Thanks for the report, we found that we weren't properly setting the hostname on SCALE early on and have since fixed this particular problem. It should be fixed in 22.12-RC.1. Trying that version (or waiting for 22.12.0 which is going through final QE tests) that would be great.

FlorenNovember 28, 2022 at 11:41 PM

Thanks !

Bonnie FollweilerNovember 28, 2022 at 2:51 PM

Thank you for your ticket submission .
I have moved this ticket into our queue to review now.
An engineering representative will update with any further questions or details in the near future.

Duplicate

Details

Assignee

Reporter

Labels

Impact

Medium

Components

Affects versions

Priority

More fields

Katalon Platform

Created November 26, 2022 at 8:10 AM
Updated May 8, 2024 at 6:07 PM
Resolved November 30, 2022 at 5:55 PM