Blame tests/p_exim/30_exim_mta_ehlo-test.sh
|
Christoph Galuschka |
d05160 |
#!/bin/sh
|
|
Christoph Galuschka |
d05160 |
# Author: Christoph Galuschka <christoph.galuschka@chello.at>
|
|
Christoph Galuschka |
d05160 |
|
|
Christoph Galuschka |
d05160 |
t_Log "Running $0 - exim can accept and deliver local email using ESMTP/PIPELINING."
|
|
Christoph Galuschka |
d05160 |
|
|
Christoph Galuschka |
d05160 |
if [ $centos_ver == '5' ]
|
|
Christoph Galuschka |
d05160 |
then
|
|
Christoph Galuschka |
d05160 |
MAILSPOOL=/var/spool/exim/input/
|
|
Christoph Galuschka |
d05160 |
|
|
Christoph Galuschka |
d05160 |
# make shure spool dir is empty
|
|
Christoph Galuschka |
d05160 |
rm -rf $MAILSPOOL*
|
|
Christoph Galuschka |
d05160 |
ret_val=1
|
|
Christoph Galuschka |
d05160 |
|
|
Christoph Galuschka |
d05160 |
# send mail to localhost
|
|
Christoph Galuschka |
d05160 |
./tests/p_exim/_helper_exim_ehlo.expect | grep -q "250 OK"
|
|
Christoph Galuschka |
d05160 |
if [ $? = 0 ]
|
|
Christoph Galuschka |
d05160 |
then
|
|
Christoph Galuschka |
d05160 |
t_Log 'Mail has been queued successfully'
|
|
Christoph Galuschka |
d05160 |
MTA_ACCEPT=0
|
|
Christoph Galuschka |
d05160 |
fi
|
|
Christoph Galuschka |
d05160 |
|
|
Christoph Galuschka |
d05160 |
sleep 1
|
|
Christoph Galuschka |
d05160 |
grep -q 't_functional test' $MAILSPOOL*
|
|
Christoph Galuschka |
d05160 |
if [ $? = 0 ]
|
|
Christoph Galuschka |
d05160 |
then
|
|
Christoph Galuschka |
d05160 |
t_Log 'previously sent mail is in '$MAILSPOOL'*'
|
|
Christoph Galuschka |
d05160 |
SPOOLFILE=0
|
|
Christoph Galuschka |
d05160 |
fi
|
|
Christoph Galuschka |
d05160 |
|
|
Christoph Galuschka |
d05160 |
if ([ $MTA_ACCEPT = 0 ] && [ $SPOOLFILE = 0 ])
|
|
Christoph Galuschka |
d05160 |
then
|
|
Christoph Galuschka |
d05160 |
ret_val=0
|
|
Christoph Galuschka |
d05160 |
fi
|
|
Christoph Galuschka |
d05160 |
else
|
|
Christoph Galuschka |
d05160 |
t_Log t_Log "This is not a C5 system - skipping"
|
|
Christoph Galuschka |
d05160 |
ret_val=0
|
|
Christoph Galuschka |
d05160 |
fi
|
|
Christoph Galuschka |
d05160 |
|
|
Christoph Galuschka |
d05160 |
t_CheckExitStatus $ret_val
|