alfresco outbound email behind firewall - email

I'm trying to configure the outbound mail service on alfresco behind a firewall, I add the mail configuration on alfresco-global.properties but it can connect to the remote smtp server, there's a connection timed out error in the log. I guess I need to open the correct port but which one?

Related

Query reg SMTP port

Hi am having a confusion reg SMTP ports. I have configured an application in my local machine to use gmail's smtp server by getting the details from here - https://www.siteground.com/kb/google_free_smtp_server/ and am able to trigger emails without any issues.
When I set the same application in a windows server and use the same smtp settings the emails aren't going and I keep getting errors like "unable to connect to smtp port 465". So is the port being mentioned here - 465 - is this port being used from my machine to connect to gmail's smtp server or is this port being referred to the port in the machine where gmail's smtp server is hosted?

SMTP errors from web server

I am having issues with SMTP from one of my web servers. I've verified firewall connectivity over port25 to the SMTP relay and the exchange servers is good to go. I can hit the SMTP relays and exchange server from my web server via telnet. Whenever I drop a mail in Pickup it sits in the queue.
In Event Viewer I get:
Message delivery to the host 'IPADDDRESS' failed while delivering to the remote domain 'MYDOMAIN' for the following reason: The connection was dropped by the remote host.
I checked SMTPDiag and it comes back:
Error: Expecting "220". Server is not accepting connections.
Failed to submit mail to "server.domain.com"
I checked and my connection control is set to allow and the domains are listed in SMTP.. I am losing my mind trying to figure out why mail is failing at this point..
Are you hitting a rate limit or is your outbound ip on a blacklist? Try the blacklist search here: https://mxtoolbox.com/supertoolmobile.aspx

Telnet works but email doesn't

I'm setting up an Alfresco AWS instance and trying to configure inbound email.
As per the documentation I've configured it, hosted the Alfresco mail server on port 1025, set up an iptable rule to forward port 25 --> 1025, set up an folder in Alfresco with the alias 'dropoff' and added my work email as an allowed user for sending emails. I've also ensured all the ports are open on the EC2 instance
So far so good. If I test everything from my local computer with telnet:
helo mywork.com
mail from:myname#mywork.com
rcpt to:dropoff#alfresco.mywork.com
data
From: adinihan#mywork.com
Subject: test mail from command line
this is test number 1
sent from linux box
.
Then it works. I look in the Alfresco folder and there's the test email document. However, if I use Gmail and sign into myname#mywork.com and send an email through Gmail, then it doesn't work. It sends alright and there's nothing in Alfresco logging, however the document just never appears in the Alfresco folder. The from/to address is the same as the telnet command's one.
Since I can telnet from my local computer to the instance I assume it's not an issue with ports on the EC2 instance. Why would telnet work but sending it via Gmail not?
EDIT: got an email back from Google about an hour after I sent it with the error message TLS Negotiation failed: generic::failed_precondition: starttls error (0): protocol error
EDIT 2: here are my inbound emai settings in the global properties file
# Inbound #
email.inbound.unknownUser=anonymous
email.inbound.enabled=true
email.server.enabled=true
email.server.hideTLS=false
email.server.enableTLS=true
email.server.requireTLS=false
email.server.port=1025
email.server.domain=alfresco.amritmro.com
imap.server.enabled=true
imap.server.port=1143
imap.server.host=0.0.0.0

CentOS iptables and port configuration for using external SMTP server

I have a web server running CentOS and a separate mail server running Microsoft Exchange. I have the web server connecting to the mail server via SMTP on port 587 to send emails.
Sometimes the connection to the mail server refuses, but it's rare. Could an intermittent failure be related to port settings? I would have thought it's all or nothing.
For the CentOS web server, what rules should I be looking to configure in the iptables if any? Do I need to add an entry for port 587 on this server? Or do I just need to allow incoming connections on the mail server for 587?
Thanks in advance.
You don't need to set up any iptables rules on your webserver, since outgoing connections are allowed by default. Your occasional drops won't have anything to do with the webserver's firewall, so you'll want to look at tuning your Exchange server, if the error is impactful enough to worry about it.

Grails mail plugin configuration for MS Exchange server

I am able to send email using my gmail account from my grails application but when I use MS exchange server account I am getting this error
Message: Mail server connection failed; nested exception is com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.exg6.exghost.com/, 25; timeout -1;
Configuration I used is :
mail {
host = "smtp.exg6.exghost.com"
port = 25
username = "xxxx"
password = "xxxx"
props = ["mail.smtp.auth":"true",
"mail.smtp.socketFactory.port":"25",
"mail.smtp.socketFactory.class":"javax.net.ssl.SSLSocketFactory",
"mail.smtp.socketFactory.fallback":"false"]
I am not sure what configuration to use. I tried changing port to 465 & 993 but that didn't work too. Please help
There are several things wrong with your setup. First of all, you are submitting mail to a Microsoft Exchange server (presumably), not Outlook. Outlook is a mail client and only provides end user functionality by connecting to the same server that you are trying to get the Mail plugin to connect to.
Your host name must be a valid Internet DNS host name -- therefore it must be "smtp.exg6.exghost.com". This might be all you have to do depending on the submission/relay policies in your SMTP server. Most likely you need to read on.
The SMTP protocol supports authentication and security for mail submission (new message injection) using either SSL or SASL. If you are using SSL, the default port to connect to is 465 (SMTPS port). If you are using SASL, then most servers are configured to accept new mail with authentication on port 587 (submit service port). Most SMTP servers will not accept mail submission on port 25.
In your case it looks like you are trying to connect with SSL, so you probably want to configure it using the SMTPS setup. To make sure that you have a proper setup, use a mail client like Thunderbird to try to make an SMTP connection to the server. It actually has a discovery algorithm in it that will try the common setups and report success when it has found one. Once you know what the connection parameters are, then you can proceed with configuring the Mail plugin.
I finally got this working. Turns out Microsoft provide a separate API / web-services to send email and perform all other mail related operations. This API gives developers programmatic access to Exchange Online, Exchange Online as part of Office 365, and versions of Exchange starting with Exchange Server 2007 Service Pack 1 (SP1). Click here for details.
exg6.exghost.com is host for Exchange Server 2007
And I am not sure but I think Exchange server 2007 and onwards don't use SMTP.