*BSD News Article 55942


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!chi-news.cic.net!newsfeed.internetmci.com!howland.reston.ans.net!Germany.EU.net!Hanover.Germany.EU.net!Hamburg.Germany.EU.net!nuki.NetUSE.de!Kiel.Germany.EU.net!tpki.toppoint.de!mistral!not-for-mail
From: kai@mistral.toppoint.de (Kai Voigt)
Newsgroups: comp.unix.bsd.freebsd.misc,comp.unix.questions
Subject: Re: Mail Answering Program? (info@system.com?)
Date: 3 Dec 1995 14:00:08 +0100
Organization: Gottes eigenes Newssystem: INN
Lines: 33
Message-ID: <49s70o$emc@mistral.toppoint.de>
References: <dhawkDIz5Gu.8L6@netcom.com>
NNTP-Posting-Host: mistral.toppoint.de
X-Newsreader: NN version 6.5.0 #5 (NOV)
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:9697 comp.unix.questions:73487

dhawk@netcom.com (David H) writes:

>Is there a program for FreeBSD that can be set up in /etc/aliases
>to answer requests for information (like email to info@netcom.com)?

You will need a program alias in your aliases file, like

info:	|/usr/local/bin/sendinfo

Then run "newaliases" and create the /usr/local/bin/sendinfo
program which could look like this:

#!/bin/sh
# get From-Address from received mail
FROM=`grep "^From: "`
# create mail and send it off
(echo "From: info@my.machine"
 echo "To: $FROM"
 echo "Subject: automatic reply to your info request"
 echo ""
 cat /usr/local/lib/info-file-to-sent.txt) | /usr/libexec/sendmail -t

I didn't verify that this works but you should have gotten an idea.

BTW, this is a general Unix topic, so you should post such articles
to comp.unix.questions or something.

Kai
-- 
Kai Voigt, Werftstrasse 2, 24148 Kiel, Germany, +49 431 7209309
``Für die einen ist es ein ganz normales ISC mit NetGW X.25 Software,
für die anderen die miserabelste IP-Implementierung des ausgehenden
20. Jahrhunderts...'' - ingo@ipge.toppoint.de (Ingo Prochaska)