TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:10449] Majordomo and Gernal Mailing List Junk



You can probably do this with a nice little sendmail hack.  Have
sendmail check - if the recipient is whoever@wherever.com it should be
passed to a special mailer.  The special mailer could be a shell/C/awk
script that will extract the from=<> from the e-mail and drop that into
a textfile, and then pass the message on to the standard mailer.  The
regular SMTP mailer will take everything on the command line, and the
message as stdin.  After your script runs, it can just pass the message
on to your local delivery agent.  You just need to write a ruleset that
will detect e-mail going to the proper address, and then write a
pseudo-mailer that will do the above.

You could be fancy and add a macro or a hashed map of such e-mail
addresses:
Kemaillist hash /etc/mail/emaillist

and then in sendmail, 
R$+ < @ $=w . >         $: < $(emaillist $1 @ $2 $@ $1 $: @ $) > $1 < @
$2 . >

then define:
Memaillist,       P=/usr/bin/emaillist.sh, F=lsDFMShP, S=10, R=20/40,
                  A=vdeliver $u $h

Alternatively you could edit the source to the local delivery agent
(usually procmail, and the source is VERY ugly - {}'s and ;'s where they
needn't be, and poorly formatted) and hard-code the functionality in. 
We were able to do some nifty things with procmail to get it to deliver
to special /var/spool/mail/mail0...15 subdirectories without much
difficulty.

Mike Nielsen wrote:
> 
> Howdy all...
> 
> I got 6 hours to come up with a solution to this little problem.
> 
> The powers that be want to be able to have the general public
> send off an email to  info@mugabucks.com  and have a nicely
> pretyped list sent back to them.
> 
> As a kicker or bonus they would like to have all the
> respondant's email address recorded in a file somewhere.
> 
> I thought I could squish (I'm a pretty lousy hacker) Majordomo
> into doing something like this by autosubscribing  ....
> 
> I'm taking all ideas and thoughts as you have them.
> 
> On a side note I was wondering is sendmail had anything built
> in that would have something like the .forward file...
> Maybe something like a .reply
> 
> I have some documentation to sort through but as I said, any
> ideas would be appreciated
> 
> --
> ---------------------------------------------------------------
> Mike Nielsen            http://www.public.iastate.edu/~mnielsen
> mnielsen@iastate.edu
> "Linux, why use a Window when you have a door."
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-list-help@mn-linux.org

-- 
Adam Maloney
Systems Administrator
Internet Exposure, Inc.

You're not a real Vikings fan unless you're @vikesfan.com
E-mail, news, humor, and FREE TICKETS at www.vikesfan.com