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

Re: [seul-edu] OT: address service on email



On Sat, Dec 11, 1999 at 08:34:26PM +0100, Petr Vicherek wrote:
> Bill Ries-Knight wrote:
> 
> > I just had a strange returned mail...
> > the header from the bounce gave a "forwarding address" for the original
> > recipient.  (Copied below)  I was wondering how easy these are to
> > configure.  In a school setting they could be quite useful as the
> > students move around, especially with the oddities of multi-track
> > year-round schools.
> >
> > Anyone experienced it before?
> 
>    No, but on Linux or any other Unix the best way around it is to put
> into your home directory ".forward" file with your new address.
> 
>   However, if you want to erasse the home directory, simply put the
> new address to the /etc/aliases and run "newaliases" to create the
> /etc/aliases.db used by sendmail.
> 
>    However, I never arranged the automatic reply. I would also be
> interested, what it takes to arrange it.

I use exim(8) instead of sendmail(8),  and with exim you can make your
.forward file into a exim filter file,  where you can filter e-mail and
do different things with it based on the headers, and even the first n
characters (n is configurable,  I think it defaults to 500) of the
body.  One of the things is to send specified e-mail to an address
extracted in some way from the headers. 

If you use good old sendmail(1),  you can specify in your .forward file
that you want to pipe the email messages to some program.  You can then
use procmail(1) to do the same kind of filtering as with exim.  Another
handy program is formail(1),  which can extract various pieces of
information from an e-mail message and create an auto-reply message.

Look at the man pages for instructions and example.  I think that exim
configuration is much simpler,  but if you run sendmail and cannot or do
not want to replace it,  procmail will give you the same (and possibly
eben more) functionality.  

I don't know how to do it if you use qmail or smail or other MTA's,  but
i think procmail should help there,  too. 

All these programs should be included with most distros,  as they are
pretty much standard unix utilities.  I can confirm that they are in
debian slink.

All these solutions require that you have a home directory.  I don't
know from the top of my head how to do it without it,  you would
probably have to edit sendmail's or exim's (or whatever you are using)
configuration files.  I think in exim you could define a new director or
use the `smartuser' director or something.   Check on
http://www.exim.org/

-- 
Jan Hlavacek                                            (219) 434-7566
Department of Chemistry                               Jhlavacek@sf.edu
University of Saint Francis               http://www.sf.edu/Jhlavacek/