1836579 Members
1675 Online
110102 Solutions
New Discussion

sendmail script

 
Gabriel Valdez_1
Occasional Advisor

sendmail script

We changed machines recently and upgraded to HP-UX 11.i
this script used to work but now it get this error.
Though SAM I can send out to my gmail account so the relay is working is this my script.

#!/bin/ksh
# This script takes a list of patch ids and sends an e-mail to sos to
# retrieve the documentation. EXPL does not automate this piece of the
# patch process.
#
# 10/2/02 - Created. jso
#
for PATCH in $(cat /datatel/development/CDEV17.471/INSTALL/SAVEDLISTS/PATCHES000)
do
echo "Sending $PATCH ..."
/usr/sbin/sendmail -v -fgvaldez@alvincollege.edu sos@datatel.com <Subject: DOC A31 $PATCH

EOM
sleep 5
done
exit

Sending C04384-48_ST_17014_U ...
WARNING: Group writable directory /var/spool
sos@datatel.com... Connecting to network3.alvincollege.edu. via relay...
220 network3.alvincollege.edu SMTP service ready
>>> EHLO hp2.alvincollege.edu
500 Syntax error, command unrecognized
>>> HELO hp2.alvincollege.edu
250 Requested mail action okay, completed.
>>> MAIL From:
250 Requested mail action okay, completed.
>>> RCPT To:
250 Requested mail action okay, completed.
>>> DATA
354 Start mail input; end with .
>>> .
451 Requested action aborted: local error in processing
sos@datatel.com... Deferred: 451 Requested action aborted: local error in processing
Closing connection to network3.alvincollege.edu.
>>> QUIT
221 network3.alvincollege.edu closing transmission channel

anything would be great
5 REPLIES 5
john korterman
Honored Contributor

Re: sendmail script

Hi,
it says that /var/spool is world writable; this directory should have the permissions
drwxr-xr-x

but check also the permissions of /etc itself - should be:
dr-xr-xr-x

regards,
John K.
it would be nice if you always got a second chance
Gabriel Valdez_1
Occasional Advisor

Re: sendmail script

Sending C10615-22_HR_17014_U ...
sos@datatel.com... Connecting to network3.alvincollege.edu. via relay...
220 network3.alvincollege.edu SMTP service ready
>>> EHLO hp2.alvincollege.edu
500 Syntax error, command unrecognized
>>> HELO hp2.alvincollege.edu
250 Requested mail action okay, completed.
>>> MAIL From:
250 Requested mail action okay, completed.
>>> RCPT To:
250 Requested mail action okay, completed.
>>> DATA
354 Start mail input; end with .
>>> .
451 Requested action aborted: local error in processing
sos@datatel.com... Deferred: 451 Requested action aborted: local error in processing
Closing connection to network3.alvincollege.edu.
>>> QUIT
221 network3.alvincollege.edu closing transmission channel

Ok that takes care of one error what about the 451 aborted
Mark Greene_1
Honored Contributor

Re: sendmail script

Send a test e-mail like this:

sendmail -v -d0 -d1 -d0.4 -d1.5 -d2 -d6 -d6.5 -d10 -d11 -d30 -d45 valid_address@valid.domain /tmp/maildebug.log 2>&1

(substitute a real e-mail address and put a test message in /tmp/testmail)

and then look in /tmp/maildebug.log for errors from sendmail.

mark
the future will be a lot like now, only later
Steven E. Protter
Exalted Contributor

Re: sendmail script

Does your sendmail.cf setting have a DS directive telling it to foward all mail?

If so, the forwarding server must explicitly allow relay from the hp server.

mailq

Outbound mail queing up

sendmail -v -q

try and process the queue verbose to get better diagnostics.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
john korterman
Honored Contributor

Re: sendmail script

Hi,
it could still be permission problems in affected directories. Check in /var/spool/mqueue and /etc/mail

regards,
John K.
it would be nice if you always got a second chance