[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[leafnode-list] leafnode2 + mail gatway?



i set up a couple of local newsgroups in our student hostel with leafnode2

some users seem to prefer a web interface, so i set up newsportal
some users prefer a mailing list ( and especially for newsgroups with almost no traffic this might be a good idea ), so i tried to set up a small mailing list and connect it to leafnode. especially news2mail.

All solutions i found were not satisfying at all.

ok, 

Since my C++ skills are a bit... rusted... i didn't try to code some news2mail interface into leafnode, but wrote this ugly hack:
( This watches the news spool for new news and then feeds the new files to the mailing list. )
------------------------
#!/bin/sh

group="$1" # the mailing list (minimalist) group name
spool="$2" # the leafnode2 spool dir

while { inotifywait -e close_write ${spool}/.overview; }; do
  sleep 1
  files=$(find ${spool}/ -newer ${spool}/.last.posting.mailinglist -type f -name "[123456789]*")
  touch ${spool}/.last.posting.mailinglist
  for file in $files; do
    cat $file | /usr/sbin/minimalist.pl -c /etc/news2mail.conf ${group}
  done
done
------------------------

( requires inotify-tools )

so, what do you guys thing about that?
can one offer some alternative that is not that ugly? :)

and i didn't yet look into the other direction (mail2news), can one recommend something?

-- 
Wolfgang Scheicher
"If we knew what it was we were doing,
 it would not be called research, would it?" (Albert Einstein)
-- 
_______________________________________________
leafnode-list mailing list
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
https://www.dt.e-technik.uni-dortmund.de/mailman/listinfo/leafnode-list
http://leafnode.sourceforge.net/