Date: Tue, 02 Jul 1996 11:32:20 -0400 From: "Jordyn A. Buchanan" <jordyn@bestweb.net> To: "Christian" <PLAZAS_CHRISTIAN@mercury.csg.peachnet.edu>, questions@freebsd.org Subject: Re: question about mail -- mail gurus please help Message-ID: <2.2.32.19960702153220.006a5354@pop.bestweb.net>
next in thread | raw e-mail | index | archive | help
At 10:23 AM 7/2/96 EST, Christian wrote: >Hi, > > I would like to know if it is possible, using any tools available >in UNIX - FreeBSD in particular, to set up a system that would >automatically answer mail sent to any user on the system with a stock >message. [stuff ommitted] >Ideally the user should not need to have an account on the system >that does this forwarding. What I mean is, that any and all mail >sent to any name @cc.csg.peachnet.edu be sent this message, wether or >not the user's name exists on the host. i.e. I can send a message to >cplazas@cc.csg.peachnet.edu or mickey_mouse@cc.csg.peachnet.edu and >both would get the same reply even if mickey_mouse was not a user on >the system. Is this possible? I would use sendmail's mailertable feature for this. This requires: * Sendmail 8.7.X (preferably 8.7.5) * Procmail Make sure you add the mailertable feature to your sendmail.cf file. Create a file called /etc/mailertable with this line in it: cc.csg.peachnet.edu procmail:/etc/procmailrcs/cc.csg.peachnet.edu (Note, once you creat the text mailertable file, you need to make a hash of it with a command like: 'makemap hash /etc/mailertable.db < /etc/mailertable'.) This sets things up so that inbound mail to addresses @cc.csg.peachnet.edu are processed through the procmail recipe file /etc/procmailrcs/cc.csg.peachnet.edu. For example, you could insert something like this into that file (this is a slightly modified version of the really simply autoresponder from the procmailex man page; there is also a more complex example that you can modify to suit your needs): :0 h c * !^FROM_DAEMON * !^X-Loop: postmaster@cc.csg.peachnet.edu | (formail -r -A"Precedence: junk" \ -A"X-Loop: postmaster@cc.csg.peachnet.edu" \ -I"From: postmaster@cc.csg.peachnet.edu"; \ cat /etc/autoreply) | $SENDMAIL -t Theoretically, that should respond with the contents of the file /etc/autoreply, but I haven't tested this to make sure I'm not an idiot and telling you something completely wrong. Mailertables are great. You can have all sorts of fun with them. Jordyn ------------------------------------------------------------------------- Jordyn A. Buchanan jordyn@bestweb.net BestWeb Corporation +1 914 271 4500 Senior Systems Administrator
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2.2.32.19960702153220.006a5354>