<<< Date Index >>>     <<< Thread Index >>>

Lost connection when scripted



Hello everyone,

I've been trying to use Mutt to help me with some simple status monitoring on a 
server I'm running. The idea is fairly simple: use a shell script to parse the 
output from a disk status report, and if there's a problem then send me an 
email with the report attached.

When running this script at the command line everything works as expected - I 
get the mail in my inbox with the report as the body of the mail, about 8KB in 
size. However, when I execute the same script via cron I experience a "lost 
connection after DATA" error on the mail server.

The relevant code is as follows:

if [ -s disk_status_failure_not_no.out ] ; then
        mutt -d 5 -s "Disk Failure Predicted" admin@xxxxxxxxxxx < 
disk_status.out
fi

When run through cron the server reports:

Jul 29 15:28:01 mymailserver postfix/smtpd[17110]: connect from 
unknown[123.45.67.89]
Jul 29 15:28:01 mymailserver postfix/smtpd[17110]: 538141C29E: 
client=unknown[123.45.67.89]
Jul 29 15:28:01 mymailserver postfix/smtpd[17110]: lost connection after DATA 
(1374 bytes) from unknown[123.45.67.89]
Jul 29 15:28:01 mymailserver postfix/smtpd[17110]: disconnect from 
unknown[123.45.67.89]

The .muttdebug0 output does not report any error - it just stops dead:

.....
4> Manufacture Week          : Not Available
Updating progress: 1251
4> Manufacture Year          : Not Available
Updating progress: 1293
4> SAS Address               : 1221000000000000
Updating progress: 1338
4> 
Updating progress: 1339

...that's it.

I'm running Ubuntu Hardy AMD64 on both machines, postfix 2.5.1-2ubuntu1 on the 
mail server, mutt 1.5.17+20080114-1ubuntu1 on the client machine. I've amended 
.muttrc to include the following lines at the bottom:

# Settings for sending mail
#
set smtp_url="smtp://mymailserver.mydomain.com"
set ssl_starttls=no

Am I missing something here, or is this a flea? :-)

Thanks in advance for any help you can give me.

Chris

_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE