SMTP Authentication Failed Error

1,540 views
Skip to first unread message

Woody

unread,
Aug 25, 2011, 8:32:48 AM8/25/11
to Railo
Hi all.

I have an application which requires notification emails to be sent at
certain points. I have set up the smtp server with appropriate
details as per our corporate server and the connection verifies, but
mail connections fail.

Manually connecting via telnet on port 25 from my machine to the SMTP
server as issuing commands results in successful test mails being
generated, but taking a packet trace when the application runs shows
some unusual commands being issued.

After the mail server sends its identifing details and the railo app
sends an EHLO command with the subsequent mail server response railo
appears to send an AUTH LOGIN command which is not understood by thse
server, responsing with a 334 unknown code.

The railo app then sends a further command which in turn gets another
334 response and finally the railo app sends an empty line.

At this point the mail server response with a 501 Authentication
Failed message and the client railo app finally sends a QUIT

Railo version is 3.3.0.024 rc as I'm using hibernate functionality

I have another server set up virtually identically other than it is
running 3.2.3.000 rail release and that works as expected.

The mail server is unauthenticated but restricted to an access list of
IP addresses which my local machine is in.

Any pointers on where to look next would be gratefully received. (I've
also tried updating to 3.3.0.026 rc with no change in behaviour).

Woody

unread,
Aug 25, 2011, 8:39:46 AM8/25/11
to Railo
As some additional information -if I manually key the commands that
appear to be sent in the packet trace I get the same error results, so
the issue appears to be the sequence of SMTP commands being generated
by the railo application and not an issue with the SMTP server.

Thanks

GX

unread,
Aug 25, 2011, 11:20:59 PM8/25/11
to Railo
Hi Wood

What settings are required by the mail server? Did you try ssl tls?
are you using cfmail or manually creating a java session?
How would you setup an email account in another email client? Perhaps
use thunderbird to detect the settings so it can give some hints.

Regards

GX

Rani

unread,
Aug 28, 2011, 4:24:55 PM8/28/11
to Railo
Hi, woddy

still do not know how your settings are but here is my testcase:

edit manually railo-web.xml from your application WEB-INF directory
like :

1. edit /path_to_your_app/WEB-INF/railo/railo-web.xml
2. after <scope client-directory=" ..... > edit mail settings:

<mail log="{railo-web}/logs/mail.log" spool-enable="yes" spool-
interval="5" timeout="30">
<server port="25" smtp="your_corporate_server"
username="valid_username_to send" password="username_password"/>
</mail>

3. restart railo so that changes here to take effect.

4. in your app pages it is enough to send email just writing simple
cfmail tag like:
<cfmail from="my...@myadomain.com" to="some@clients" ...>

text or formated html

</cfmail>


best regards,

Woody

unread,
Aug 30, 2011, 3:18:43 AM8/30/11
to Railo
Hi - sorry for the delay in replying.

I'm using cfmail rather than a java session (but that at least
potentially gives me an option).

I've set up this server in the same way as another railo instance with
no username or password requirements. The older instance 3.2.3.000
has no issues with this attempt to authenticate. The 3.3.0.024
instance exhibits the login auth behaviour.

I've tried both with and without TLS and SSL in all combinations with
no success on the new version (the older version has neither set).

I'm just about to try the latest 3.3.0.027 patch to see if that makes
any significant difference.

There is another factor that differs between the working and non-
working instances - the older release is on JBoss 5.1.0GA, the non-
working later release is on JBoss 6.0.0.Final. I want to start
looking at HornetQ at a later point in development hence my decision
to go with the JBoss 6 release.

Thanks

Woody

unread,
Aug 30, 2011, 8:52:39 AM8/30/11
to Railo
No change in behaviour with the 3.3.0.027 patch release - I get
repeated errors of this form ...

13:44:13,852 ERROR [STDERR] failed to connect
13:44:13,852 ERROR [STDERR] at
javax.mail.Service.connect(Service.java:322)
13:44:13,852 ERROR [STDERR] at
railo.runtime.net.smtp.SMTPSender.run(SMTPSen
der.java:39)
13:44:13,977 ERROR [STDERR] failed to connect
13:44:13,977 ERROR [STDERR] at
javax.mail.Service.connect(Service.java:322)
13:44:13,977 ERROR [STDERR] at
railo.runtime.net.smtp.SMTPSender.run(SMTPSen
der.java:39)

I also made the amendments to the railo-web.xml.cfm and added in empty
strings for username and password but still have a connection failure.

The relevent mail.log file is filling up with the following type of
error message:-

"ERROR","web-0","08/30/2011","13:47:29","mail spooler","failed to
connect"
"ERROR","web-0","08/30/2011","13:48:29","mail spooler","failed to
connect"


Is anyone else using JBoss 6.0.0.Final with Railo 3.3.0.n and mail
successfully?

Thanks

Woody

unread,
Aug 30, 2011, 2:48:13 PM8/30/11
to Railo
I've now tried this on my home machine setup with a completely
different smtp non-authenticated setup and it also fails with the same
errors.

This looks to be related either to the Railo release or JBoss
6.0.0.Final or some combination of the two.

Should this be raised as a JIRA error - and if so, can someone point
me in the correct dorectoin to log please?

Thanks

Robert Zehnder

unread,
Aug 30, 2011, 2:57:09 PM8/30/11
to ra...@googlegroups.com
https://issues.jboss.org/browse/RAILO
--
Robert Zehnder
Volunteer Community Manager
Railo Server - Open Source

Woody

unread,
Aug 31, 2011, 4:23:27 AM8/31/11
to Railo
Thanks Robert.

I'll log as soon as time allows.

Cheers
Reply all
Reply to author
Forward
0 new messages