mail2news for only 1 newsgroup

Peter Ekowicki pekowicki at spf.fairchildsemi.com
Tue Jul 18 19:31:18 UTC 2000


Thanks for the info Scott.  I went ahead and just created a script
(don't laugh at my scripting abilities) that sends mail to a mailing
list and also to mailpost.  Gets the job done.
#!/bin/sh
grep -v zzssyyzz > /tmp/msgstore
cat /dev/null > /tmp/formsg
cat /dev/null > /tmp/lineread
cat /dev/null > /tmp/sendmsg
cat /tmp/msgstore | grep Subject: > /tmp/formsg
cat /tmp/msgstore > /tmp/lineread

# Strips email headers
COUNT=0
LINENUM=1
LINE=xxx
while [ "$LINE" ]
do
 read LINE < /tmp/lineread
 tail +$LINENUM /tmp/msgstore > /tmp/lineread
 COUNT=`expr $COUNT + 1`
 LINENUM=`expr $LINENUM + 1`
done
##

echo "To: tpmgroup-test at www-fmis" > /tmp/sendmsg
cat /tmp/formsg >> /tmp/sendmsg
tail +$COUNT /tmp/msgstore >> /tmp/sendmsg
cat /tmp/sendmsg | /usr/lib/sendmail -f
tpm.test at fmnews.fairchildsemi.com -t
cat /tmp/msgstore | /opt/inn-2.2.2/bin/mailpost tpm.test





> From: 
>          Scott Russell <scottrus at raleigh.ibm.com>
>                                                                                 Mon 18:26
> 
>  Subject: 
>          Re: mail2news for only 1 newsgroup
>       To: 
>          inn-workers at isc.org
> 
> 
> 
> 
> Peter -
> 
> I found the same problem and ended up ditching the script INN provides and
> using the newsgate package, but not without problems as well. Eventually I
> used mailpost from the INN contrib to do mail -> news and the news2mail C
> program from newsgate to do the news -> mail gateway.
> 
> The mailpost script from INN will have to hacked a bit since the -r and -f
> command line options fail to work and you need something unique in your
> Path: header or new2mail will send the message back to the mailing list
> creating a mail loop.
> 
> The news2mail C program from the newsgate package works fine. Here's my
> newsfeeds for the two lists I gated. (Nothing else is needed)
> 
> linux.ibm.com/ltcgate:\
>         !*,mailinglists.internal.ltc-test:Tp:\
>         /usr/bin/news2mail ltc-test ltc-test ltc-test-request\
>         linux.ibm.com
> 
> linux.ibm.com/ltcgate:\
>         !*,mailinglists.internal.ibm-linux-tech:Tp:\
>         /usr/bin/news2mail ibm-linux-tech ibm-linux-tech\
>         ibm-linux-tech-request linux.ibm.com
> 
> It was 4 days of pain to learn INN and setup a bidirectional gate for
> these two groups but it appears to be working as of 2pm today. I am
> however expecting to have to tweak stuff more.
> 
> BTW, who maintains the newsgate package hosted at isc.org??? It needs some
> seirous help and all though I don't have the time to maintian it I would
> like to contribute to it.
> 
> -- 
> Regards,
>  Scott Russell (scottrus at raleigh.ibm.com)
>  Linux Technology Center, System Admin
>  Red Hat Certified Engineer
>  T/L 441-9289 / External 919-543-9289
>  Pager 800-946-4645 pin 6106543
> 
> 




-- 
Peter Ekowicki
Unix Administrator
Fairchild Semiconductor
ph 207.775.4518



More information about the inn-workers mailing list