SUMMARY: aliases faq

From: Steve_Kilbane (steve@gec-epl.co.uk)
Date: Thu Oct 07 1993 - 04:42:24 CDT


I wrote:

[start of message]

two aliases questions, actually.

        1)
        yet again, someone (forget who) asked the "aliases" question: how do i
        get my mail messages to say "full_name@site" instead of "username@site".
        apart from the fact that this should probably be in the faq, i have a
        question for the sun staff who read this list - is there any chance that
        this reverse lookup could be incorporated into sendmail - or at least,
        incorporated more easily than hacking the .cf file? this is probably the
        sort of thing that should be in the sendmail tool that's gonna get added
        to admintool in solaris 2.999...

        2)
        (real question, this)
        i've got a user who wants to send mail to both people and files. he can set
        up aliases which store the messages in files, singularly, that works. however,
        when he mixes these aliases with others, something barfs with "cannot mail
        to files". are we doing something wrong, or is this a sendmail limitation?
        [ background: the idea is to send the mail to those who have email links, and
        for those who don't, it goes into a file for faxing. ]

Steve

--
<Steve_Kilbane@gec-epl.co.uk>			"What happened to pizzatool?"

[end of message. why can't mailtool allow you to use a *real* editor?]

There were a number of responses to both questions, so i'll do them in order. On the full.name problem, hal stern wrote:

the full_name stuff happens within sendmail already if you're using NIS.

[ i'm not. i'm on solaris 2.2, so naturally i'm using /etc files :-) ]

it takes the aliases file, and does a reverse lookup, that is, an alias like

hal.stern: stern@sunne

causes mail from stern@sunne to go out as hal.stern@mailhub. note that the alias must point to a deliverable address, that is, you can't put in hal.stern: stern if there's no "stern" on the mailhub.

[ hmm. what if you have mail forwarded to machine x, and nfs-mount it's mail directory? most users aren't sending mail from x, then... ]

the key lines in the sendmail.cf that do this are:

# put this up near the top DZmail.byaddr # # put this in the ruleset that gets called for mail that # leaves the local domain. usually this is the ruleset that's # in the S= clause of the mailer definition. R$-<@$-> $:$>3${Z$1@$2$} invert aliases

that last piece of sendmail glop says: take an address of the form a@b. feed a@b into mail.byaddr (the "Z" macro) as a key; see if you get something back. if you do, feed the whole thing into ruleset 3 for cleanup.

Steve Simmons <scs%lokkur.dexter.mi.us@gec-epl.co.uk> wrote that sun sendmail couldn't do this, but that IDA sendmail does.

On the mail-to-file question, hal wrote:

you can't send mail directly to a file. send it to a program, which then does a cat >> to the file. Pat Cain (Denver) <pjc%denver.ssds.COM@gec-epl.co.uk>: The files that are being written to CANNOT have execute/search permission on them. (-rw-rw-rw- works, but -rwx------ does not!).

terralyn%carbon.cor2.epa.gov@gec-epl.co.uk (Terralyn Vandetta):

On #2) We had the same problem with mixing aliases...we ended up just making another level of indirection to get the silly thing to work.

example:

local-sun-managers:terralyn,danno_file danno_file:/dsk/danno/sun.managers

Steve Simmons <scs%lokkur.dexter.mi.us@gec-epl.co.uk> and Patrick O'Callaghan <poc%usb.ve@gec-epl.co.uk> both suggested piping to procmail, which Patrick was kind enough to send to me. I'll have a look at it when there's time....

finally, Kevin Sheehan wrote: [ Regarding "aliases faq", steve@gec-epl.co.uk writes on Oct 4: ]

> <Steve_Kilbane@gec-epl.co.uk> "What happened to pizzatool?"

pizzatool lives, NeWS is dying...

steve "anyone for currytool?"



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:22 CDT