Send email in FusionAuth with STARTTLS - email

I am setting email configuration in FusionAuth but is not working and I receive a reject in relay. I found the problem is the email server we are using, need to set the properties starttls to true.
properties.put("mail.smtp.starttls.enable", "true");
But I can not see how to set up this properties in fusionauth
I tried in additional properties of email in setting/advanced/SMTP settings to set up some options but there is not documentation of how to do it.
I am receiving this error inside fusionAuth audit log
Invalid Addresses Cause: com.sun.mail.smtp.SMTPAddressFailedException Message: 454 4.7.1 : Relay access denied

Fix it, setting some properties in Settings/Settings/Advanced/SMTP Settings
mail.smtp.ssl.trust=*
mail.smtp.starttls.required=true
mail.smtp.starttls.enable=true
mail.smtp.starttls.checkserveridentity=false

Related

moodle email configuration error

I have been trying to configure SMTP in order to send an confirmation email to email based self-registration users but each time an error message appear saying that
Tried to send you an email but failed!
this is my moodle email configurations
this is the error message I get when I run a test email
when searched the error I found that Moodle does not connect to email server.
is there any other configurations that I should check?
since this did not work I tried to connect through outlook.
I tried to configure outlook but it also failed.
this is the configuration for outlook
this is the error I get
please help..!!!
I'm not entirely sure what the problem is, we are using our own mailserver..
However, there are some restrictions to Gmail usage, which can require you to make some changes on your Gmail account.
Have a look at this to allow a new service access to your Gmail account:
https://www.lifewire.com/unlock-gmail-for-a-new-email-program-or-service-1171974
And here to allow your Gmail access to less secure services and programs:
https://myaccount.google.com/lesssecureapps?pli=1

Unable to send email using Jenkins and SES

I am running Jenkins version 1.554.1 on Amazon EC2 Instance
I am using mailer plugin and currently trying to configure sending emails on failed job builds.
Hitting "test configuration" button gives me "javax.mail.AuthenticationFailedException: 501 Input line length is too long!" error.
Screenshot of settings is attached. I also tried to check "Use SSL" checkbox, but result was equal.
What do I miss?
The problem was that I was trying to use my AWS credentials (AWS access key ID and secret access key). This document describes how to create SES credentials: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html?icmpid=docs_ses_console
So, solution was to open SES SMTP Settings, create new credentials and use them.
Amazon SES requires Transport Layer Security (TLS) connection. This is different than an SSL connection.
I would check the instance OS documentation on setting up TLS.
Here's an SO post about Jenkins and TLS

How to fix the error «Access denied - Invalid HELO name»?

I have exim on server №1 (1.1.1.1). A mailbox info was created, and email was sending and receiving successfully. But when I perform sending from server №2 (2.2.2.2), using an email and password for authentication, the mail server does not let me, giving the following error:
H=mailer.server2.com (1.1.1.1) [2.2.2.2] rejected MAIL : Access denied
- Invalid HELO name (See RFC2821 4.1.3)
How can I adjust the resolution to be sent from any server with any HELO №2 (2.2.2.2)?
Ubuntu was installed on all servers.
It seems that there is an issues with your mail client setting, Please try to update SMTP authentication setting on your mail client and check this again.

Using authsmtp from a Grails server

This is quite a specific question, and I have had no luck on the grails nabble forum, so I thought I would post here. I am using the grails mail plug-in, but I think my question is a general one about using authsmtp as an email gateway from my server.
I am having trouble sending mail from my app using authsmtp. I have installed and configured the mail plugin and was originally using my ISP's SMTP server to send mails. However when I deployed to AWS EC2 this failed because my elastic IP was blocked by the SMTP host. So I bought myself an authsmtp account and set up my server email address as an accepted one at authsmtp.
I then changed my configuration in SecurityConfig.groovy to point to the authsmtp server that I had been designated...
mailHost = "mail.authsmtp.com"
mailUsername = "myusername"
mailPassword = "mypassword"
mailProtocol = "smtp"
mailFrom = "valid-authsmtp-address#mydomain.com"
mailPort = 2525
...and I'm just trying to get this to work locally before I deploy back up to AWS. Sending mail fails and in my log I have this exception:
2010-02-13 10:59:44,218 [http-8080-1] ERROR service.EmailerService - Failed to send emails: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 513 5.0.0 Your email system must authenticate before sending mail.
org.springframework.mail.MailSendException; nested exception details (1) are:
Failed message 1:
com.sun.mail.smtp.SMTPSendFailedException: 513 5.0.0 Your email system must authenticate before sending mail. at
com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
I'm a bit lost since the username and password I provide in the
configuration are definitely correct.
A terse and not very helpful conversation with authsmtp support suggests
that I need to MD5 and/or base64 encode my credentials before sending, so my
question is in three parts...
1) any idea what's going on with the failure and why that message is
appearing?
2) how would I encode the credentials to pass to authsmtp and how would I
configure that for the mail plugin
3) has anyone successfully connected and sent mail through authsmtp from the
mail plugin and specifically from AWS EC2?
When sending Email using the Acegi plugin, under the hood a Spring JavaMailSenderImpl is used. Looking at its docs:
Note that the underlying JavaMail Session has to be configured with the property "mail.smtp.auth" set to true, else the specified password will not be sent to the mail server by the JavaMail runtime. If you are not explicitly passing in a Session to use, simply specify this setting via setJavaMailProperties(java.util.Properties).
So append to your SecurityConfig.groovy the following:
javaMailProperties = [ "mail.smtp.auth": true]
I didn't find a solution to this using the Grails mail plugin, so I'm still interested in an answer, however I did find a workround. It may be useful in case anyone else follows me down this lonely path.

Dotproject

I Have install dot project on linux machine. using ssmtp for gmail account to sending emails for mails notifications . but when i create any user it doesn't send mails to user email ID for account creation. but i send maail form shell prompt.the error i am getting is Failed to send email: 530 5.7.0 Must issue a STARTTLS command first. 22sm11794837wfd.6 added :( . Please help me if any one have solution....
Gmail requires a secure connection (TLS or SSL).
You need to configure SSMPT (not dotProject) to talk securely with Google's SMTP server.
I think you can just add the following to your ssmtp.conf file and (assuming your SSMTP package was compiled with SSL support) it should then work:
UseTLS=YES
Or perhaps:
UseSTARTTLS=YES
More info here.
I assume "530 5.7.0 Must issue a STARTTLS command first." means that you have to connect with TLS (Transport Layer Security). Does dot project support that?