Oracle cloud email as relay doesn't works

I have the same problem sending emails with hestia and the oracle cloud email. Its NOT a free tier account!
An: exinext [email protected] shows:
Transport: :587 error -42: authentication required but no common mechanisms were found
I read this instruction several times:
and I can send Emails with the Python script named
But when I place my data into hestia Global relay it doesn’t send emails.
Any ideas how to fix that problem?

1 Like

I assume you already posted it here:

I have no idea how to fix it.

Hi Eris! Yes you are right - I posted it also on github because Im very desperate to find a solution for this problem. :sob:
But it could not be that Im the only one with this problem?! :face_with_spiral_eyes:

I have tried it and even contacted their support about it. Wasn’t able to get it working…

After a few hours wasted I killed the test server…

To send emails on a Oracle Free Tier server is not possible. You have to switch to a “registered” one. Its also free but gives the possibility to send emails.
What I dont unterstand ist this error in the logfile
authentication required but no common mechanisms were found
because TLS has been enabled in hestia. Or is it an exim4 problem?

I do have a registered account and have the same issue…

But had the same error / issue but I have no idea.

Have no issues with other smtp providers

Strange. I tested it also with a freenet accountas relay - same problem.
[email protected] R=send_via_smtp_relay T=smtp_relay_smtp defer (-54): retry time not reached for any host for ''
There must be an resolver problem. What SMTP hoster are you taking?

That is because port 25 is blocked

I have used SMTP2GO but with my other VPS servers. I mainly use Oracle Cloud for building Hestia at the moment …

Ill try it out. We are not alone with the problem:

Any common issue is Oracle Cloud…

I thought that hestia send emails via TLS Port 587 - why we need Port 25? Im wondering about that because I can send emails outside to any recipient with this python script from oracle. There must be a problem on hestia side… :face_with_monocle:

# python script for sending SMTP configuration with Oracle Cloud Infrastructure Email Delivery
import smtplib 
import email.utils
from email.message import EmailMessage
import ssl

# Replace [email protected] with your "From" address.
# This address must be verified.
# this is the approved sender email
SENDER = '[email protected]'
SENDERNAME = 'Blog Test Sender'
# Replace [email protected] with a "To" address. If your account
# is still in the sandbox, this address must be verified.
RECIPIENT = '[email protected]'
# Replace the USERNAME_SMTP value with your Email Delivery SMTP username.
USERNAME_SMTP = 'my_smtp_credential_username'
# Put the PASSWORD value from your Email Delivery SMTP password into the following file.
PASSWORD_SMTP_FILE = 'ociemail.config'
# If you’re using Email Delivery in a different region, replace the HOST value with an appropriate SMTP endpoint.
# Use port 25 or 587 to connect to the SMTP endpoint.
HOST = ""
PORT = 587
# The subject line of the email.
SUBJECT = 'Email Delivery Blog Test'
# The email body for recipients with non-HTML email clients.
             "This email was sent through the Email Delivery SMTP "
             "Interface using the Python smtplib package."
# get the password from a named config file ociemail.config
with open(PASSWORD_SMTP_FILE) as f:
    password_smtp = f.readline().strip()

# create message container
msg = EmailMessage()
msg['Subject'] = SUBJECT
msg['From'] = email.utils.formataddr((SENDERNAME, SENDER))
msg['To'] = RECIPIENT

# make the message multi-part alternative, making the content the first part
msg.add_alternative(BODY_TEXT, subtype='text')

# Try to send the message.
    server = smtplib.SMTP(HOST, PORT)
    # most python runtimes default to a set of trusted public CAs that will include the CA used by OCI Email Delivery.
    # However, on platforms lacking that default (or with an outdated set of CAs), customers may need to provide a capath that includes our public CA.
    server.starttls(context=ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=None, capath=None))
    # smtplib docs recommend calling ehlo() before & after starttls()
    server.login(USERNAME_SMTP, password_smtp)
    # our requirement is that SENDER is the same as From address set previously
    server.sendmail(SENDER, RECIPIENT, msg.as_string())
# Display an error message if something goes wrong.
except Exception as e:
    print(f"Error: {e}")
    print("Email successfully sent!")

So Im investigating that problem an I placed my oracle SMTP data into thunderbird.
And I can send emails via oracle cloud. So now Im sure that it must be an hestia / exim4 bug.
Or what do you think?

I have no idea it might be an issue with Exim4 as we use it.

But my exim4 knowledge is not a lot … And really don’t know where to start debugging. And as Oracle cloud smtp server is the only issue I don’t plan to put a lot of time into it…

… ok Ill ask the oracle support because SMTP2GO is a little bit to expansive for me :wink:

Free for the first 1000 email?

Then 10 euro for the 10000 email / month ?

thats cheap!

The free account only limitation is max 5 sending domains…

Nevertheless, it is a challenge for me to figure out how to configure exim correctly

After googling many hours i found solution, meybe just workaround.
I change smt_relay_login in authentication section in file /etc/exim4/exim4.conf.template
(panel->server settings->edit exim4 or http:///edit/server/exim4/) to:

  driver = plaintext
  public_name = PLAIN
  hide client_send = ^SMTP_RELAY_USER^SMTP_RELAY_PASS

… and it starts works.
Thanks to this document 33. SMTP authentication
Good Luck.


Look at my post.
Good Luck

1 Like