Java Web application not sending Email on Ubuntu server - email

My play framework web application sends automatically emails to user using Apache commons email library, everything works fine on my machine, but when I deploy it on an Ubuntu server it is unable to send email.
It throws exceptions like org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.googlemail.com:465 (I also tried different configuration with smtp.google.mail port 465,25 and 587 with or without ssl and tls)
and connection timed out.
I starting to believe that is a problem of some configuration of my ubuntu server.
Any suggestion?
If i type ufw status command I receive status disabled.
Thanks

I am going to close this question, because I found the solution. Basically my Server provider (Scaleway) has a security configuration where SMTP is blocked. I asked them to unlock It.

Related

Failed to connect to localhost/127.0.0.1:7443

Hi i am using openfire as my im server to my mobile app client, I have added the Httpfileupload plugin to openfire and enabled the http bind settings, when I try to upload a file it shows me this error Failed to connect to localhost/127.0.0.1:7443 ,
and the servers send me this XML message <get url="https://localhost:7443/httpfileupload/45726202-5e69-4b5c-a533-00d82f6d1121/4add76e7f15b6b4f.png"/>
I’ve tried to access this uri but it doesn’t work
please help me with this issues
i am using the latest smack version and the latest openfire version also
You appear to have set up Openfire using the value 'localhost' as its XMPP domain and/or fully qualified domain name for the server that is running Openfire. This is a recipe for disaster. Openfire is broadcasting the address of the content that is managed by its HTTP File Upload plugin, and uses the value that was configured, 'localhost'. Clients, which typically run on different machines, will try to connect to this host. As they're instructed to connect to 'localhost', they'll never be able to reach Openfire.
My advise is to setup Openfire again, and use proper, network-reachable addresses for values of the XMPP domain name and FQDN (these are asked for in the second page of the setup wizard, if memory serves).

Connect to C++ REST sdk SERVER on Windows from LAN

I have a server written on C++ REST SDK.
There's http_listener which listens to "http://localhost:34568".
When I try to send a request in browser or from the client to localhost it works fine and I get the responses from my server. But the point is to use the application in network. And here where the problem comes.
When I try to request the server from the other PC using IP(192.168.1.103:34568) I get "HTTP Error 400. The request hostname is invalid."
I'm aware that that could be some firewall issues but it's turned off. Also I tried to set port rules in brandmauer and it didn't help.
And even more! I got XAMPP running Apache server and when I do the same thing but with (192.168.1.103:80) I do get the response from Apache and have an access.
Anybody had something similar or somebody knows what the problem is about?
Listen to local ip address or to your network name (dns):
"http://xxx.xxx.xxx.xxx:34568" or
"http://your_network_name:34568"
So, if you have multiple network adapters, you can choose which one.

Mail sending but not receiving on Plesk server

I am having some PLESK Mail receiving issues.
I just setup a dedicated server with 1and1. The server console is PLESK 12. I am using 1and1 nameserver which are pointed correctly from the domain registrars. I am able to send mail using webmail but not able to receive it.
When I do a mail server check it I get the following error:
Error connecting to mailserver: No route to host
If anyone is aware of some missing SMTP settings that need to be set up in the initial Plesk configuration it would be appreciated.

Cannot send/receive mail on plesk server

I have just had to re-image my server and for some reason, when I do a test connection in outlook, it errors on both send/receive with could not connect to server.
I have checked that both postfix and courier-imap are running on the server and have restarted both just to make sure. I am using plesk 12 and have setup users for the email system, so would appreciate some guidance as to how I can troubleshoot this. Many thanks
SOLVED
Reset iptables all good now

Jenkins SMTP connection refused. What am I missing?

I've got Jenkins ver 1.524 installed on a Windows 7 box and I'm trying to configure email but the "Test configuration" is reporting errors. Jenkins is running as a service under my own domain account.
My settings are as follows:
SMTP server: smtp.corpdomain.com
Default user email suffix: #corpdomain.com
Not using authentication
Not using SSL
SMTP port: 25
Reply-To Address: tools#corpdomain.com
Charset: UTF-8
When I test the configuration, I usually get the following exception:
javax.mail.MessagingException: Could not connect to SMTP host: smtp.amazon.com, port: 25;
nested exception is:
java.net.ConnectException: Connection timed out: connect
Yet every once in a while I receive the following instead:
com.sun.mail.smtp.SMTPSendFailedException: 553 5.1.8 <nobody#nowhere>... Domain of sender address nobody#nowhere does not exist
;
nested exception is:
com.sun.mail.smtp.SMTPSenderFailedException: 553 5.1.8 <nobody#nowhere>... Domain of sender address nobody#nowhere does not exist
However, I am able to send mail from the command line without errors via both python script and java (using javax.mail) without authentication, and I'm able to telnet to the SMTP server on port 25, so I don't see how it could be a firewall issue.
One other note that may be related: When I try to install a plug-in via the Jenkins web interface, I receive a 403 response for the URL "http://updates.jenkins-ci.org/update-center.json?uctest". However, I'm able to connect to that URL from a browser on the same machine.
Could this be a Tomcat configuration issue? I'm not familiar with Tomcat so I'm not sure where to even start looking. Maybe a Jenkins configuration that I've missed? Any other ideas?
Thanks in advance!
FWIW The nobody#nowhere address is the default address Jenkins comes with for the system admin email address (which is used as the from address when sending emails)
you can change it at
Manage Jenkins > Configure System > Jenkins Location
first, use port 465
second, get your email verified in AWS SES, and change your default sending email from here:
Jenkins -> Configure System -> Jenkins Location -> System Admin e-mail address
Still looks to me like your firewall is blocking Jenkins' service from accessing those ports -
especially as the connection times-out, which is typical for such cases.
Suggest you try to disable the firewall completely and see if there is any change.
Cheers
To check for conectivity problems from Jenkins, I would go to the Script Console at Manage Jenkins -> Script Console, and there, try to connect to the port you want to test (25 in your case), with a Groovy script like:
s = new Socket()
s.setSoTimeout(200)
s.connect(new InetSocketAddress("smtp.corpdomain.com", 25), 200)
s.close()
If you don't receive any kind of IOError, then there is no problem with the conectivity.
Note: I could have used simply new Socket("smtp.corpdomain.com", 25) but it will try forever to connect if the Firewall ignores your attempts.
For the SMTPSendFailedException you eventually receive, as #paul-henry mention:
The nobody#nowhere address is the default address Jenkins comes with for the system admin email address (which is used as the from address when sending emails)
you can change it at
Manage Jenkins > Configure System > Jenkins Location
Resources:
Networking with Groovy
Add a timeout when creating a new Socket
Thanks for submitting an edit. It is only visible to you until it’s been approved by trusted community members
first, use port 465 second, get your email verified in AWS SES, and change your default sending email from here: Jenkins -> Configure System -> Jenkins Location -> System Admin e-mail address
Thanks. It helps me!
My problem was "550-Verification failed for "