JavaMail and 503s

D

Duane Morin

We're using the java mail api (get a session, get a transport, etc...)
so I'm not exactly in full control of the sequence of commands that
are getting sent to the servers. But I'm seeing a surprising number
of 503 messages that I did not think were errors. They are:

count | errormsg
-------+------------------------------------------------------
2 | 503 bad sequence of commands (specify mail first)
6 | 503 already got a from: - psmtp
6 | 503 error: nested mail command
11 | 503 originator already specified
28 | 503 sender already specified
64 | 503 5.0.0 need rcpt (recipient)
136 | 503 bad sequence of commands
313 | 503 5.5.0 sender already specified

Since I'm not getting these for every mail I send out, it seems like
it must involve a configuration on the receiver's side, no? But since
I'm not sending the raw SMTP commands I don't quite know what to do
about the problem. From my perspective, I'm sending out the same
sequence of commands to everybody and some are just responding with
these errors.

I'm also assuming that if I ran the exact same code against these
servers, I would get the exact same errors (i.e. it is not a temporary
problem).

Anybody got suggestions on things I can do from the javamail side of
things that might allow me to track it down? Just blindly turning on
a full-blown debugging output is not my best option since 99% of my
messages are going through just fine.

Duane
 
G

GaryM

(e-mail address removed) (Duane Morin) wrote in
Anybody got suggestions on things I can do from the javamail side of
things that might allow me to track it down? Just blindly turning on
a full-blown debugging output is not my best option since 99% of my
messages are going through just fine.

Put it in debug mode and you will see the raw commands that are send to
the server and the raw reply. Should shine some light on the matter.
Debug mode is part of the session properties. See property list here:

http://java.sun.com/products/javamail/1.3/docs/javadocs/index.html
 
D

Dave Monroe

We're using the java mail api (get a session, get a transport, etc...)
so I'm not exactly in full control of the sequence of commands that
are getting sent to the servers. But I'm seeing a surprising number
of 503 messages that I did not think were errors. They are:

count | errormsg
-------+------------------------------------------------------
2 | 503 bad sequence of commands (specify mail first)
6 | 503 already got a from: - psmtp
6 | 503 error: nested mail command
11 | 503 originator already specified
28 | 503 sender already specified
64 | 503 5.0.0 need rcpt (recipient)
136 | 503 bad sequence of commands
313 | 503 5.5.0 sender already specified

Since I'm not getting these for every mail I send out, it seems like
it must involve a configuration on the receiver's side, no? But since
I'm not sending the raw SMTP commands I don't quite know what to do
about the problem. From my perspective, I'm sending out the same
sequence of commands to everybody and some are just responding with
these errors.

I'm also assuming that if I ran the exact same code against these
servers, I would get the exact same errors (i.e. it is not a temporary
problem).

Anybody got suggestions on things I can do from the javamail side of
things that might allow me to track it down? Just blindly turning on
a full-blown debugging output is not my best option since 99% of my
messages are going through just fine.


Check out:
http://www.faqs.org/rfcs/rfc821.html

That's the authoritative source for SMTP commands and sequences.

Dave Monre
 
T

Thomas Schodt

Anybody got suggestions on things I can do from the javamail side of
things that might allow me to track it down? Just blindly turning on
a full-blown debugging output is not my best option since 99% of my
messages are going through just fine.

I would look into doing tracing.
You could write a small TCP/IP proxy (relay) with limited
knowledge about SMTP - to record everything except DATA
in a log file.

From the log you should be able to see what's going on.
 
G

GaryM

I would look into doing tracing.
You could write a small TCP/IP proxy (relay) with limited
knowledge about SMTP - to record everything except DATA
in a log file.

From the log you should be able to see what's going on.

Javamail will do this in debug mode.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top