Sendmail not submitting Email on '.'

I have several HP/UX nodes running Sendmail 8.13 ...some work fine, some don't.

When an Email is coming in, the 'DATA' command never ends. The other side of the connection gets to the point where it enters the '.' on a line by itself, but sendmail doesn't accept it...if fact it keeps on holding the connection open like its expecting more data. Eventually the message times out and the system closes the connection. Of course, the big problem is that the other side thinks its successfully sent the message, when in fact the system aborted the message.

I've tried other characters, control characters...nothing seems to close the message for delivery.

When I compare the /etc/mail/sendmail.cf files from those nodes that do work and those nodes that don't, they are identical! ...so I'm guessing it has to be something else.

Anyone every run into this issue?? its a real head scratcher for us.
Thanks for your Help!
-- John

Something to do with users customisation? or bad .mailrc ?

Sendmail is not point-to-point, there is no direct connection to hold open.

If the sending side is a script, please post the script.

"there is no direct connection to hold open." ...Huh? I guess it depends on how you define things. If your Email server is going to transfer an Email to my Email server, it opens a TCP connection to port 25 on my server and using the SMTP protocol, holds that connection open until my server either closes the connection or yours does.

In this particular case, your server starts the process (I.E. MAIL FROM:... RCPT TO: ... DATA ...) but when you send the '.' on its own line to signal the end of the message, my server does nothing like its thinking the '.' is still part of the 'DATA' segment. Since your server thinks its already sent the message, its waiting to see the '250 OK' message back from my server, but my server is still accepting input for some reason. One side or the other times out and closes the connection. My server aborts the message and never sends it on. Your server (may) think its successfully sent the message and deletes it. Big problem for me :frowning: I hope that clarifies things.

How precisely are you creating the original email message?
When precisely does the hang take place.

The sendmail program will first put the complete message onto a queue on the source computer. It will then negotiate with the appropriate destination computer and open a connection.

This is for INBOUND emails. Here's my last test session:

host01:/home/jd $telnet localhost 25
Trying...
Connected to localhost.
Escape character is '^]'.
220 host01.xxxxxx.com ESMTP Sendmail @(#)Sendmail version 8.13.3 - Revision 2.001 - 2005/02/12/8.13.3; Wed, 8 Jul 2009 15:09:29 -0400 (EDT)
EHLO test.com
250-host01xxxxxx.com Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE 4096000
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
MAIL FROM: jd@test.com
250 2.1.0 jd@test.com... Sender ok
RCPT TO: jd@blatt.com
250 2.1.5 jd@blatt.com... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
this is a test message

.

.

at this point, nothing happens...the connection will eventually timeout and close the connection. I've tried it from three different hosts and two different terminal programs...no change in results. Using different FROM: and TO: addresses also have no effect.

Thanks for the help :slight_smile:

Try

QUIT

BTW: This is a very strange way to use sendmail.

BTW: This is a very strange way to use sendmail. 

If you mean using telnet, then yes...its only for testing the server.

"QUIT" only works after the message is accepted by the server...and that's the whole point: The server is not accepting the message when it sees the '.' on a line by itself, which is what the 354 line says to do.

I've used telnet to read email from a server, delete huge messages etc., but never to actually send an email.

This type of script will send a test mail using sendmail with basic diagnostics. Notice that the "." is optional in this context.

#!/bin/ksh
(
echo "From: `uname -n` ${LOGNAME}"
echo "Subject: Mail Test from `uname -n` `date`"
echo "Test text portion"
) | /usr/lib/sendmail -v myname@domain.com