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

Re: Forwarding mail to news



Tim Thomson <tim.thomson@usa.net> writes:

> Hi,
> I am subscribed to a number of different mailing lists, but find it easier
> to read using a news reader. Also, I am at different systems that connect
> to the internet using a dial-up connection.

I just put my mailing lists into such a form.

> Is there a way to automaticaly post mail from a mailing list to a
> local news group?

Yes, I use fetchmail for it.  Here is my /etc/fetchmailrc which is
used by calling "fetchmail -f /etc/fetchmailrc" as root:

defaults 
	mda "/usr/bin/procmail -d %s"
	fetchlimit 50

poll pop.combox.de 
	protocol pop3 
	user Torsten.Hilbrich there 
	is torsten here password xxxxxxxxx

This file calls procmail as delivery agent for every incoming message.
I have (as user torsten) an .procmailrc file in my home directory:

# The default destination is my normal mailbox
DEFAULT=/var/spool/mail/torsten
PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin:.
MAILDIR=$HOME/Mail      # You'd better make sure it exists
LOGFILE=$MAILDIR/from
LOCKFILE=$HOME/.lockmail

:0w
* ^Resent-From.*debian-user@lists.debian.org
| /usr/local/bin/mail2news local.debian.user

:0w
* ^To.*bugtraq@netspace.org
| /usr/local/bin/mail2news local.bugtraq

:0w
* ^To.*DANTE-EV@RELAY.URZ.UNI-HEIDELBERG.DE
| /usr/local/bin/mail2news local.dante-ev


For example, mails with the Resent-From: header are from the debian
list and are posted to my local newsserver (INN, but that shouldn't
matter) using the mail2news script.  This is derived from the
mail2news.pl from the Mail2News mini-howto but heavily modified to fit
my needs.  It simply takes the mail coming from stdin, rewrites some
headers, add some neccessary headers and uses (in my case) rpost to
post the message to the news server.

The only remaining thing is the create the local newsgroup as
moderated newsgroup and add a line to the moderators file to get
articles posted to this group sent out as email.

If someone is interessted in this script, send me an email.  My
message is already much to long ;-)

You can find more information in the already mentioned Mail2News mini
howto.  It uses the aliases mechanism for redirecting the mail, but
this will not work with dialup accounts.

Feel free to ask me about my setup,

        Torsten

--
I haven't lost my mind -- it's backed up on tape somewhere.
                                            Fortune Cookie
PGP Public key available


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: