[Solved] Email Notifications Require Auth Settings

Unimus support forum
Post Reply
mackov83
Posts: 7
Joined: Mon Oct 12, 2020 12:23 pm

Mon Mar 15, 2021 4:48 pm

Hi,

I have been using email notifications for some time now, but due to recent mail server change have only recently changed the settings. As a result I have noticed some strange behaviour. FYI unimus is the server name - unimus@domain.com.

Notifications send fine if I enter credentials (user@domain.com and password), but without credentials the Unimus error is:
Failed messages: javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 504 5.5.2 <unimus>: Helo command rejected: need fully-qualified hostname[/b
]

My mail server shows:
postfix/smtpd[228586]: NOQUEUE: reject: RCPT from unimus.domain.com[10.83.10.30]: 504 5.5.2 <unimus>: Helo command rejected: need fully-qualified hostname; from=<unimus@domain.com> to=<user@domain.com> proto=ESMTP helo=<unimus>

Any ideas why this issue exists?
mackov83
Posts: 7
Joined: Mon Oct 12, 2020 12:23 pm

Mon Mar 15, 2021 4:58 pm

FYI - after submitting this issue, I also worked out that by changing the hostname to FQDN that it worked as expected. I expect this may be a workaround as opposed to a fix.
User avatar
Tomas
Posts: 1206
Joined: Sat Jun 25, 2016 12:33 pm

Mon Mar 15, 2021 6:38 pm

Hello,

This error "Helo command rejected: need fully-qualified hostname" comes from your email server - it's the mail server telling Unimus that with your current configuration it can't forward the email.

You can see your email server is not properly resolving Unimus to a full FQDN (it does say "helo=<unimus>").

Likely your email server is configured to validate FQDNs when not using SMTP authentication, and this is why it works with auth, but doesn't work without auth.

There is not much we can do in Unimus here, you will have to fix this on your email server configuration, sorry.
mackov83
Posts: 7
Joined: Mon Oct 12, 2020 12:23 pm

Wed Mar 17, 2021 12:50 pm

Hi Tomas,

Thanks very much for the information and apologies for wasting your time. I am no SMPT expert, therefore other parts of the error led me to think it was a Java mail error.

For anybody reading this I was able to solve it quite easily. Details of the environment and fix:
Email server: Ubuntu 20.04, Modoboa email server, with Postfix MTA (SMTP relay)
Fix:
  • sudo vi /etc/postfix/main.cf
  • edit 'my networks 127.0.0.0/8' to be 'my networks 127.0.0.0/8, 10.83.0.0/16'
  • sudo systemctl restart postfix.service
This whitelisted anything I send locally from the LAN, but still applied the default setting to deny anything from non-FQDN - I believe this check is worth keeping.
Post Reply