[Mailman-Users] scripts/answer_majordomo_mail
Todd Pfaff
pfaff at edge.cis.mcmaster.ca
Thu Dec 2 23:17:09 CET 1999
On Thu, 2 Dec 1999, Pioppo wrote:
> Il Thu, 02 Dec 1999, Paul Tomblin ha scritto:
>
> > > I tried to setup the $prefix/scripts/answer_majordomo_mail
> > > tool but with no success.
>
> > I couldn't get it to work either, so I replaced it with:
> >
> > #!/bin/sh
> > (formail -rt; cat /usr/home/mailman/misc/majordomo.answer.txt) | /usr/lib/sendmail -oi -t
>
> Very good!
> Following your example:
>
> #!/bin/sh
> FROM="mailman at ferrara.linux.it"
> TMPFILE=`mktemp /tmp/$0.XXXXXX`
> if [ $? -ne 0 ]; then
> echo "$0: Can't create temp file, exiting..."
> exit 1
> fi
> cat > $TMPFILE
> (
> echo "From: $FROM"
> cat $TMPFILE | formail -rt
> echo
> echo "Hi."
> echo "This is an autogenerated reply to your message."
> echo "We non longer run majordomo here - we use Mailman."
> echo "To subscribe to our lists please visit:"
> echo "http://ferrara.linux.it/mailman/listinfo"
> echo "Your original request follows."
> echo
> cat $TMPFILE | formail -k -X From: -X Subject: -X Date: \
> -X To: | awk '{print "> "$0}'
> )|/usr/sbin/sendmail -t
> rm -f $TMPFILE
here's a similar but slightly easier method that i use on our
soon-to-be-history listproc server...
i put this script in ~mailman/autoreply, mode 755, and call it from an
alias like this as i remove a list from listproc:
listname: "|IFS=' ';exec /usr/local/info/server/autoreply listname"
#!/bin/sh
LISTNAME=$1; export LISTNAME
(
/usr/local/bin/formail -rt -A"Precedence: junk" -A"X-Loop: listproc at listserv.mcmaster.ca"
cat << EOF
This is an automatic reply.
Our listproc mailing list service will be removed January 1 2000.
We are now running a new mailman mailing list service.
If you are trying to use a listproc list, it may have already been
moved to our mailman server.
Please visit the URL:
http://mailman.mcmaster.ca/mailman/listinfo/$LISTNAME
for information about the $LISTNAME mailing list and mailman.
You can also get help with the $LISTNAME mailing list by sending a
message to $LISTNAME-request at mailman.mcmaster.ca with only the word
help in the Subject line and an empty message body.
EOF
) | /usr/lib/sendmail -oi -t -f listproc at listserv.mcmaster.ca
--
Todd Pfaff \ Email: pfaff at mcmaster.ca
Computing and Information Services \ Voice: (905) 525-9140 x22920
ABB 132 \ FAX: (905) 528-3773
McMaster University \
Hamilton, Ontario, Canada L8S 4M1 \
More information about the Mailman-Users
mailing list