head 1.18; access; symbols LMTP2NNTP_0_9_6:1.17 LMTP2NNTP_0_9_5:1.16 LMTP2NNTP_0_9_4:1.11 LMTP2NNTP_0_9_3:1.11 LMTP2NNTP_0_9_2:1.9 LMTP2NNTP_0_9_1:1.8 LMTP2NNTP_0_9_0:1.7; locks; strict; comment @# @; 1.18 date 2001.09.13.12.18.21; author thl; state dead; branches; next 1.17; 1.17 date 2001.09.13.07.37.41; author thl; state Exp; branches; next 1.16; 1.16 date 2001.09.12.14.23.06; author thl; state Exp; branches; next 1.15; 1.15 date 2001.09.12.06.52.26; author thl; state Exp; branches; next 1.14; 1.14 date 2001.09.11.13.41.22; author thl; state Exp; branches; next 1.13; 1.13 date 2001.09.10.06.55.33; author thl; state Exp; branches; next 1.12; 1.12 date 2001.09.07.13.53.17; author thl; state Exp; branches; next 1.11; 1.11 date 2001.08.28.13.12.59; author thl; state Exp; branches; next 1.10; 1.10 date 2001.08.27.13.45.53; author thl; state Exp; branches; next 1.9; 1.9 date 2001.08.23.07.58.44; author thl; state Exp; branches; next 1.8; 1.8 date 2001.08.20.14.11.31; author thl; state Exp; branches; next 1.7; 1.7 date 2001.08.20.10.33.22; author rse; state Exp; branches; next 1.6; 1.6 date 2001.08.16.15.00.50; author thl; state Exp; branches; next 1.5; 1.5 date 2001.08.14.14.42.41; author thl; state Exp; branches; next 1.4; 1.4 date 2001.08.14.11.26.43; author thl; state Exp; branches; next 1.3; 1.3 date 2001.08.14.08.15.26; author thl; state Exp; branches; next 1.2; 1.2 date 2001.08.13.15.16.32; author thl; state Exp; branches; next 1.1; 1.1 date 2001.08.08.10.40.43; author thl; state Exp; branches; next ; desc @@ 1.18 log @revamped test/run.sh into test.sh @ text @#/bin/sh newmsg() { if [ -r testmessage.via${1} ] then awk " } /^Subject:/ { gotit = 1; print "Subject: [" pid "] " $2 } { if (gotit == 0) { print }; gotit = 0 } ' | tee 2>&1 >/dev/null ${STDIN} else echo "ERROR: file testmessage.via${1} not readable!" exit 1 fi } prolog () { H="0"; Z="0"; E="0"; #HZE used for mass-tests with uniq IDs for i in ${FILE} ${STDIN} ${STDOUT} ${STDERR} dmalloc.log do if [ -e ${i} ]; then rm -f ${i} fi touch ${i} chmod 666 ${i} done } epilog () { for i in ${FILE} ${STDIN} ${STDOUT} ${STDERR} dmalloc.log do if [ -r ${i} ]; then echo -n "press RETURN to see the contents of ${i}" read DUMMY less -S ${i} fi done } #main () LOG="notice" FILE="stdlog" STDIN="stdin" STDOUT="stdout" STDERR="stderr" LOCAL="0.0.0.0" HOST="0.0.0.0" GROUP="my.test" MFILT=".+@@(?:[^.]+\.)*cw\.com" NODE="gateway" # make check with automatic succeed/ fail message. # more samples and testing below. echo -n "check: -v verbose " # expected sample output: lmtp2nntp 0.9.4 (30-Aug-2001) prolog newmsg lmtp ../lmtp2nntp -v >${STDOUT} 2>${STDERR} RC=`cat ${STDOUT} | egrep 'lmtp2nntp[ ]+[0-9]+\.[0-9]\.[0-9][ ]+\([0-9]+-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-[0-9]{4}\)' | wc -l` if [ ${RC} -ne 1 -o -s ${STDERR} ]; then echo "ERROR (got ${RC})" exit 1; fi echo "succeeded" egrep >sum.dmalloc.log echo -n "check: -? usage " # expected typical output: USAGE: ../lmtp2nntp # lmtp2nntp [-b bindaddr[:port]] [-d deliverymode] [-g groupmode] [-h # host[:port][,host[:port], ...]] [-m mailfrom] [-n nodename] [-s size] [-l # level[:logfile]] [-v] [-w waittime] newsgroup [newsgroup ...] prolog newmsg lmtp ../lmtp2nntp -? >${STDOUT} 2>${STDERR} RC=`cat ${STDERR} | egrep -- '-b.*-d.*-g.*-h.*-m.*-n.*-s.*-l.*-v.*-w.*newsgroup' | wc -l` if [ ${RC} -ne 1 -o -s ${STDOUT} ]; then echo "ERROR (got ${RC})" exit 1; fi echo "succeeded" egrep >sum.dmalloc.log echo -n "check: -- valid fake posting " prolog newmsg lmtp ../lmtp2nntp <${STDIN} -b ${LOCAL} -d 250/2.0.0 -g arg -h ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1000 -w 1 ${GROUP} >${STDOUT} 2>${STDERR} ; RC=$ RC=""; if [ 1 -eq `egrep <${STDOUT} '^220[ -]LMTP Service ready' | wc -l` ]; then RC="${RC}init "; fi if [ 1 -eq `egrep <${STDOUT} '^250[ -].*pleased to meet you' | wc -l` ]; then RC="${RC}LHLO "; fi if [ 1 -eq `egrep <${STDOUT} '^250[ -]2.1.0 Sender ok' | wc -l` ]; then RC="${RC}MAIL "; fi if [ 3 -eq `egrep <${STDOUT} '^250[ -]2.1.5 Recipient accepted' | wc -l` ]; then RC="${RC}RCPT "; fi if [ 1 -eq `egrep <${STDOUT} '^354[ -]Enter mail' | wc -l` ]; then RC="${RC}DATA "; fi if [ 3 -eq `egrep <${STDOUT} '^250[ -]2.0.0 NNTP noop fake' | wc -l` ]; then RC="${RC}post "; fi if [ 1 -eq `egrep <${STDOUT} '^221[ -]2.0.0.+closing.+channel' | wc -l` ]; then RC="${RC}QUIT "; fi if [ "${RC}" != "init LHLO MAIL RCPT DATA post QUIT " ]; then echo "ERROR (got ${RC})" exit 1; fi echo "succeeded" egrep >sum.dmalloc.log echo -n "check: -m fake posting invalid sender " prolog newmsg lmtp ( MFILT=".*@@is.invalid" ; ../lmtp2nntp <${STDIN} -b ${LOCAL} -d 250/2.0.0 -g arg -h ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1000 -w 1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$? RC=""; if [ 1 -eq `egrep <${STDOUT} '^220[ -]LMTP Service ready' | wc -l` ]; then RC="${RC}init "; fi if [ 1 -eq `egrep <${STDOUT} '^250[ -].+pleased to meet you' | wc -l` ]; then RC="${RC}LHLO "; fi if [ 1 -eq `egrep <${STDOUT} '^550[ -]5.7.1.+not authorized' | wc -l` ]; then RC="${RC}MAIL "; fi if [ 3 -eq `egrep <${STDOUT} '^503[ -]5.5.0.+MAIL first' | wc -l` ]; then RC="${RC}RCPT "; fi if [ 1 -eq `egrep <${STDOUT} '^503[ -]5.5.0.+RCPT first' | wc -l` ]; then RC="${RC}DATA "; fi if [ 0 -lt `egrep <${STDOUT} '^500[ -]5.5.1.+unrecognized' | wc -l` ]; then RC="${RC}post "; fi if [ 1 -eq `egrep <${STDOUT} '^221[ -]2.0.0.+closing.+channel' | wc -l` ]; then RC="${RC}QUIT "; fi if [ "${RC}" != "init LHLO MAIL RCPT DATA post QUIT " ]; then echo "ERROR (got ${RC})" exit 1; fi echo "succeeded" egrep >sum.dmalloc.log echo -n "check: -s fake posting invalid size " prolog newmsg lmtp ../lmtp2nntp <${STDIN} -b ${LOCAL} -d 250/2.0.0 -g arg -h ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 100 -w 1 ${GROUP} >${STDOUT} 2>${STDERR} ; RC=$? RC=""; if [ 1 -eq `egrep <${STDOUT} '^220[ -]LMTP Service ready' | wc -l` ]; then RC="${RC}init "; fi if [ 1 -eq `egrep <${STDOUT} '^250[ -].*pleased to meet you' | wc -l` ]; then RC="${RC}LHLO "; fi if [ 1 -eq `egrep <${STDOUT} '^250[ -]2.1.0 Sender ok' | wc -l` ]; then RC="${RC}MAIL "; fi if [ 3 -eq `egrep <${STDOUT} '^250[ -]2.1.5 Recipient accepted' | wc -l` ]; then RC="${RC}RCPT "; fi if [ 1 -eq `egrep <${STDOUT} '^354[ -]Enter mail' | wc -l` ]; then RC="${RC}DATA "; fi if [ 3 -eq `egrep <${STDOUT} '^552[ -]5.2.3.+exceeds.+limit' | wc -l` ]; then RC="${RC}post "; fi if [ 1 -eq `egrep <${STDOUT} '^221[ -]2.0.0.+closing.+channel' | wc -l` ]; then RC="${RC}QUIT "; fi if [ "${RC}" != "init LHLO MAIL RCPT DATA post QUIT " ]; then echo "ERROR (got ${RC})" exit 1; fi echo "succeeded" egrep >sum.dmalloc.log echo -n "check: -b with invalid address " prolog newmsg lmtp ( LOCAL="127.0.0.255" ; ../lmtp2nntp <${STDIN} -b ${LOCAL} -d 250/2.0.0 -g arg -h ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1000 -w 1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$? RC=""; if [ 1 -eq `egrep <${STDOUT} '^220[ -]LMTP Service ready' | wc -l` ]; then RC="${RC}init "; fi if [ 1 -eq `egrep <${FILE} 'error.+binding.+49' | wc -l` ]; then RC="${RC}bind "; fi if [ "${RC}" != "init bind " ]; then echo "ERROR (got ${RC})" exit 1; fi echo "succeeded" egrep >sum.dmalloc.log echo -n "check: -g envelope with invalid group " prolog newmsg lmtp ( GROUP="foo.*" ; ../lmtp2nntp <${STDIN} -b ${LOCAL} -d 250/2.0.0 -g envelope -h ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1000 -w 1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$? RC=""; if [ 1 -eq `egrep <${STDOUT} '^220[ -]LMTP Service ready' | wc -l` ]; then RC="${RC}init "; fi if [ 1 -eq `egrep <${STDOUT} '^250[ -].*pleased to meet you' | wc -l` ]; then RC="${RC}LHLO "; fi if [ 1 -eq `egrep <${STDOUT} '^250[ -]2.1.0 Sender ok' | wc -l` ]; then RC="${RC}MAIL "; fi if [ 1 -eq `egrep <${STDOUT} '^550[ -]5.7.2 unmatched Group' | wc -l` ]; then RC="${RC}RCPT "; fi if [ 2 -eq `egrep <${STDOUT} '^250[ -]2.1.5 Group accepted' | wc -l` ]; then RC="${RC}RCPT "; fi if [ 1 -eq `egrep <${STDOUT} '^354[ -]Enter mail' | wc -l` ]; then RC="${RC}DATA "; fi if [ 2 -eq `egrep <${STDOUT} '^250[ -]2.0.0 NNTP noop fake' | wc -l` ]; then RC="${RC}post "; fi if [ 1 -eq `egrep <${STDOUT} '^221[ -]2.0.0.+closing.+channel' | wc -l` ]; then RC="${RC}QUIT "; fi if [ "${RC}" != "init LHLO MAIL RCPT RCPT DATA post QUIT " ]; then echo "ERROR (got ${RC})" exit 1; fi echo "succeeded" egrep >sum.dmalloc.log echo -n "check: -h fake posting to invalid host " prolog newmsg lmtp ( HOST="127.0.0.255" ; ../lmtp2nntp <${STDIN} -b ${LOCAL} -d 250/2.0.0 -g arg -h ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1000 -w 1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$? RC=""; if [ 1 -eq `egrep <${STDOUT} '^220[ -]LMTP Service ready' | wc -l` ]; then RC="${RC}init "; fi if [ 1 -eq `egrep <${FILE} 'warning.+connect.+failed' | wc -l` ]; then RC="${RC}conn "; fi if [ "${RC}" != "init conn " ]; then echo "ERROR (got ${RC})" exit 1; fi echo "succeeded" egrep >sum.dmalloc.log echo "CHECK COMPLETE AND PASSED" #epilog exit 0 @ 1.17 log @revamped test suite for public release @ text @@ 1.16 log @first self contained make check for release @ text @a2 41 # -h news-muc1.de.cw.net # -h news-ffm2.de.cw.net # -h news-dus2.de.cw.net # -h news.ecrc.de # -h dev16 post1000 () { for h in 0 1 2 3 4 5 6 7 8 9 do for z in 0 1 2 3 4 5 6 7 8 9 do for e in 0 1 2 3 4 5 6 7 8 9 do echo -n $h$z$e newmsg sendmail cat $STDIN \ | sendmail -i posting+$h$z$e@@dev12.dev.de.cw.net done done done } lmtp() { newmsg lmtp cat $STDIN \ | ../lmtp2nntp -l $1:$FILE -w 1 -d $2 -g $2 -b dev12 -h dev16,141.1.23.116:nntp -h dev16.de.cw.net:119 $3 >/dev/null; echo $? #| ../lmtp2nntp -l $1:$FILE -w 1 -d 255/2.5.5 -g $3 -b 127.0.0.1 $4 >/dev/null; echo $? #| ../lmtp2nntp -l $1:$FILE -w 1 -d $2 -g $3 -b 127.0.0.1 -h 127.0.0.2 $4 >/dev/null; echo $? } sendmaildup() { newmsg sendmail cat $STDIN \ | sendmail -i posting+cw.de.sd.apps.dev.test@@dev12.dev.de.cw.net cat $STDIN \ | sendmail -i posting+cw.de.sd.apps.dev.test@@dev12.dev.de.cw.net } d5 1 a5 1 if [ -r testmessage.via$1 ] d7 1 a7 1 awk &1 >/dev/null $STDIN d19 1 a19 1 echo "ERROR: file testmessage.via$1 not readable!" d26 1 a26 3 h="H" z="Z" e="E" d28 1 a28 1 for i in $FILE $STDIN $STDOUT $STDERR dmalloc.log d30 2 a31 2 if [ -e $i ]; then rm -f $i d33 2 a34 2 touch $i chmod 666 $i d40 4 a43 2 if [ -r $FILE ] then d45 1 a45 7 less -S $FILE fi if [ -r dmalloc.log ] then read DUMMY less -S dmalloc.log d47 1 d50 1 a50 7 # lmtp feed arg # lmtp post envelope '*.test.* cw.*.dev.*' # lmtp post header '*.test.* cw.*.dev.* *foo*' # lmtp feed envelope # lmtp post envelope # sendmaildup # post1000 d52 1 a52 1 LOG="trace" a64 1 newmsg lmtp d66 2 a67 2 # check -v option prints out version, typical output: lmtp2nntp 0.9.4 # (30-Aug-2001) d69 5 a73 4 ../lmtp2nntp -v >$STDOUT 2>$STDERR RC=`cat $STDOUT | egrep 'lmtp2nntp[ ]+[0-9]+\.[0-9]\.[0-9][ ]+\([0-9]+-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-[0-9]{4}\)' | wc -l` if [ $RC -ne 1 -o -s $STDERR ]; then echo "CHECK ERROR: version test failed $RC" d76 2 a77 1 echo "CHECK version test succeeded" d79 2 a80 1 # check -? option prints out usage, typical output: USAGE: ../lmtp2nntp d85 5 a89 4 ../lmtp2nntp -? >$STDOUT 2>$STDERR RC=`cat $STDERR | egrep -- '-b.*-d.*-g.*-h.*-m.*-n.*-s.*-l.*-v.*-w.*newsgroup' | wc -l` if [ $RC -ne 1 -o -s $STDOUT ]; then echo "CHECK ERROR: usage test failed" d92 2 a93 1 echo "CHECK usage test succeeded" d95 1 a95 2 # check dummy posting #set -v -x d98 1 a98 2 ../lmtp2nntp <$STDIN -b $LOCAL -d 250/2.0.0 -g arg -h $HOST -l $LOG:$FILE -m "$MFILT" -n $NODE -s 1000 -w 1 $GROUP >$STDOUT 2>$STDERR ; RC=$ set +v +x d100 9 a108 8 if [ 1 -eq `cat $STDOUT | egrep '^220[ ]+LMTP Service ready' | wc -l` ]; then RC="${RC}LHLO "; fi if [ 1 -eq `cat $STDOUT | egrep '^250 2.1.0 Sender ok' | wc -l` ]; then RC="${RC}MAIL "; fi if [ 3 -eq `cat $STDOUT | egrep '^250 2.1.5 Recipient accepted' | wc -l` ]; then RC="${RC}RCPT "; fi if [ 1 -eq `cat $STDOUT | egrep '^354 Enter mail' | wc -l` ]; then RC="${RC}DATA "; fi if [ 3 -eq `cat $STDOUT | egrep '^250-2.0.0 NNTP noop fake' | wc -l` ]; then RC="${RC}post "; fi if [ 1 -eq `cat $STDOUT | egrep '^221 2.0.0.+closing.+channel' | wc -l` ]; then RC="${RC}QUIT "; fi if [ "$RC" != "LHLO MAIL RCPT DATA post QUIT " ]; then echo "CHECK ERROR: fake post test failed" d111 2 a112 1 echo "CHECK fake post test succeeded" d114 51 a164 2 echo "CHECK COMPLETE AND PASSED" exit 0 d166 19 a184 9 # # BELOW ARE INTERAL TESTS. CONSIDER THEM AS EXAMPLE. # HOST="dev16,141.1.23.116:nntp -h dev16.de.cw.net:119" GROUP="cw.de.sd.apps.dev.test" newmsg lmtp ../lmtp2nntp <$STDIN -b $LOCAL -d post -g arg -h $HOST -l $LOG:$FILE -m "$MFILT" -n $NODE -s 1000 -w 1 $GROUP >$STDOUT 2>$STDERR ; RC=$ #./lmtp2nntp <$STDIN -b $LOCAL -d 250/2.0.0 -g arg -h $HOST -l $LOG:$FILE -m "$MFILT" -n $NODE -s 1000 -w 1 $GROUP >$STDOUT 2>$STDERR ; RC=$ /dev/null; echo $? d186 13 a198 2 #newmsg sendmail # sendmail -i <$STDIN -V nase123baer posting+$GROUP@@$LOCAL d200 2 a201 1 after a202 1 @ 1.15 log @relax hostname/ address dependencies for make check @ text @d19 1 a19 1 cat /tmp/testmessage \ d29 1 a29 1 cat /tmp/testmessage \ d38 1 a38 1 cat /tmp/testmessage \ d40 1 a40 1 cat /tmp/testmessage \ d58 1 a58 1 ' | tee /tmp/testmessage a62 1 echo ----------------------------------------------------------- d65 1 a65 1 before () a66 1 set -v -x d71 8 a78 17 if [ -e $FILE ]; then rm -f $FILE fi touch $FILE chmod 666 $FILE if [ -e /tmp/testmessage ]; then rm -f /tmp/testmessage fi touch /tmp/testmessage chmod 666 /tmp/testmessage if [ -e dmalloc.log ]; then rm -f dmalloc.log fi touch dmalloc.log chmod 666 dmalloc.log d81 1 a81 1 after () a95 2 # lmtp notice post arg cw.de.sd.apps.dev.test # newmsg sendmail; ls -l /tmp/testmessage && cat /tmp/testmessage d104 14 a117 7 LOG="notice" FILE="/tmp/tracing" GROUP="cw.de.sd.apps.dev.test" LOCAL="0.0.0.0" HOST="dev16,141.1.23.116:nntp -h dev16.de.cw.net:119" HOST="0.0.0.0" before d119 51 d171 3 a173 2 #./lmtp2nntp /dev/null; echo $? ../lmtp2nntp /dev/null; echo $? d176 1 a176 1 # sendmail -i /dev/null; echo $? @ 1.13 log @change test modifications and enable dmalloc debugging @ text @a8 18 before () { #set -v -x h="H" z="Z" e="E" if [ -e /tmp/tracing ]; then rm -f /tmp/tracing fi touch /tmp/tracing chmod 666 /tmp/tracing if [ -e /tmp/testmessage ]; then rm -f /tmp/testmessage fi touch /tmp/testmessage chmod 666 /tmp/testmessage } d30 3 a32 2 | ../lmtp2nntp -l debug:/tmp/tracing -w 1 -d $1 -g $2 -b 127.0.0.1 -h 127.0.0.1 $3 >/dev/null; echo $? #| ../lmtp2nntp -l debug:/tmp/tracing -w 1 -d $1 -g $2 -b dev12 -h dev16,141.1.23.116:nntp -h dev16.de.cw.net:119 $3 >/dev/null; echo $? d65 27 d94 1 a94 1 if [ -r /tmp/tracing ] d96 8 a103 2 less -S /tmp/tracing #tail -f /tmp/tracing d107 15 d124 5 a128 9 #newmsg sendmail; ls -l /tmp/testmessage && cat /tmp/testmessage #lmtp feed arg lmtp post arg cw.de.sd.apps.dev.test #ok lmtp post envelope '*.test.* cw.*.dev.*' #ok lmtp post header '*.test.* cw.*.dev.* *foo*' #lmtp feed envelope #lmtp post envelope #sendmaildup #post1000 @ 1.12 log @The -b option now works. L2 logging included. @ text @d16 1 a16 1 ssh -t -x root@@localhost exec rm -f /tmp/tracing d19 1 d21 1 a21 1 ssh -t -x root@@localhost exec rm -f /tmp/testmessage d24 1 d48 2 a49 1 | ../lmtp2nntp -l debug:/tmp/tracing -w 1 -d $1 -g $2 -b dev12 -h dev16,141.1.23.116:nntp -h dev16.de.cw.net:119 $3 >/dev/null; echo $? d86 1 a86 1 echo more /tmp/tracing @ 1.11 log @option -h now understands multiple hosts as comma separated list; .cvsignore test/dmalloc.log; program is now called "mail to news gateway" consequently - including case; parts of usage() and .pod can now be created from source; test suite and 00TODO updated; @ text @a44 1 set -x d46 1 a46 4 | ../lmtp2nntp -t /tmp/tracing -d $1 -g $2 -h dev16,141.1.23.116:nntp -h dev16.de.cw.net:119 $3 >/dev/null; echo $? set +x # cat /tmp/testmessage \ # | ../lmtp2nntp -t /tmp/tracing -d $1 -g $2 -h dev16 $3 >/dev/null; echo $? @ 1.10 log @worked out all FIXMEs in msg.c; renamed SPLITSPLITBODY to SPLITHEADBODY - this was a search'n'replace accident; major changes in the "fold headers" functionality in msg_join(); modified str_parse calls to (re)use the now fixed [^not] operator; made workarounds for missing str_parse() functionality "s//g" and "malloc optimization" permanent; reviewed "Path: not-for-mail" issue and kept it as is; the "testmessage.vialmtp" now contains very long headers to be wrapped/ folded; updated 00TODO; @ text @d45 1 d47 2 a48 2 | ../lmtp2nntp -t /tmp/tracing -d $1 -g $2 -h dev16 $3 >/dev/null; echo $? echo ../lmtp2nntp -t /tmp/tracing -d $1 -g $2 -h dev16 $3 @ 1.9 log @updated check/test environment @ text @d46 1 a46 1 | ../lmtp2nntp -t /tmp/tracing -d $1 -g $2 -h dev16 -h dev16.de.cw.net -h 141.1.23.116 $3 >/dev/null; echo $? @ 1.8 log @fixed GROUPMODE_ENVELOPE foo+bar@@quux.com notation prefix stripping where sendmail passes us already rewritten as argument to "RCPT To:" command @ text @d46 4 a49 3 | ../lmtp2nntp -t /tmp/tracing -d $1 -g $2 -h dev16 cw.de.sd.apps.dev.test cat /tmp/testmessage \ | ../lmtp2nntp -t /tmp/tracing -d $1 -g $2 -h dev16 cw.de.sd.apps.dev.test d93 8 a100 6 #ok newmsg sendmail; ls -l /tmp/testmessage && cat /tmp/testmessage #ok lmtp feed arg # lmtp post arg #ok lmtp feed envelope #ok lmtp post envelope sendmaildup @ 1.7 log @Autoconf phase 2 @ text @d15 1 a15 2 if [ -e /tmp/tracing ] then d19 4 d46 1 a46 1 | ./lmtp2nntp -t /tmp/tracing -d $1 -g $2 -h dev16 cw.de.sd.apps.dev.test d48 1 a48 1 | ./lmtp2nntp -t /tmp/tracing -d $1 -g $2 -h dev16 cw.de.sd.apps.dev.test d55 1 a55 1 | sendmail -i posting+$h$z$e@@dev12.dev.de.cw.net d57 1 a57 1 | sendmail -i posting+$h$z$e@@dev12.dev.de.cw.net d94 1 a94 1 lmtp post arg d97 1 a97 1 #sendmaildup @ 1.6 log @INN kludge, IHAVE feeding, -d deliverymode command line option, DEFER handing @ text @d91 1 a91 1 #ok lmtp post arg d94 1 a94 1 sendmaildup @ 1.5 log @connected LMTP and NNTP side, now featuring all three -g groupmodes, added post1000 articles burn-in @ text @d3 6 d11 4 d26 1 a26 1 for z in 0 1 2 3 4 5 6 7 8 9 d31 2 a32 5 awk \" } \ !/Message-ID/ { print \$0 } \ " \ d39 1 a39 1 postdup () d41 10 a50 10 echo ----------------------------------------------------------- #./lmtp2nntp -h news-muc1.de.cw.net -h news-ffm2.de.cw.net -h news-dus2.de.cw.net -h news-ecrc.de #clear ; ./lmtp2nntp \" } \ !/Message-ID/ { print \$0 } \ " \ >/tmp/testmessage echo ----------------------------------------------------------- d52 1 a52 2 | sendmail -i posting+x@@dev12.dev.de.cw.net echo ----------------------------------------------------------- d54 22 a75 1 | sendmail -i posting+x@@dev12.dev.de.cw.net a77 1 d82 2 a83 2 echo tail -f /tmp/tracing tail -f /tmp/tracing d88 9 a96 1 post1000 @ 1.4 log @run.sh now using -t /tmp/tracing option @ text @d3 32 a34 4 if [ -e /tmp/tracing ] then ssh -t -x root@@localhost exec rm -f /tmp/t fi d38 22 a59 11 clear echo ------------------------------------------------------------ awk \" } \ !/Message-ID/ { print \$0 } \ " \ | tee /tmp/reusetestmessage \ | ./lmtp2nntp -g envelope -h dev16 cat /tmp/reusetestmessage | ./lmtp2nntp -t /tmp/tracing -g envelope -h dev16 echo ----------------------------------------------------------- exit d61 4 a64 4 if [ -r /tmp/tracing ] then cat /tmp/tracing fi @ 1.3 log @cleanup msg.[ch], moved tracing to trace.[ch], added target to Makefile, added -t switch in lmtp2nntp.[c|pod], incorporated tracing into lmtp.[ch] and nntp.[ch], run.sh now using new tracing option @ text @d3 1 a3 1 if [ -e /tmp/t ] d18 1 a18 1 cat /tmp/reusetestmessage | ./lmtp2nntp -t /tmp/tx -g envelope -h dev16 d22 1 a22 1 if [ -r /tmp/t ] d24 1 a24 1 cat /tmp/t @ 1.2 log @first successful posting @ text @a6 1 echo ------------------------------------------------------------ d10 3 a12 2 clear ; awk