[CLUE-Tech] exim and /etc/aliases

Jim Ockers ockers at ockers.net
Mon Apr 5 19:50:11 MDT 2004


Hi Brandon,

Eric Jorgensen wrote:
> 
> Brandon,
> 
> I'm not sure about the second example (I suspect that
> it can't be done with aliases), but the first, you
> need a comma between the entries.  It should look
> like:
> 
> bills: brandon, christina

Eric is correct.  I'm not sure but in my own /etc/aliases file there
are no spaces between the entry1,entry2,etc.

> --- Brandon N <bneill at yahoo.com> wrote:
> > Does anyone know of any good documentation on exim's
> > use of
> > /etc/aliases.  I have been trying to do a couple of
> > things, and I can't
> > seem to get it to work.  Maybe I'm using the wrong
> > file altogether, any
> > suggestions would be appriciated.
> > 
> > I'm trying to set up an alias that points to to
> > users, ie:
> > 
> > bills: brandon  christina
> > 
> > and I'm trying to point an entire domain to one
> > user:
> > 
> > *@denvertaoist.net: brandon

Unfortunately this won't work from /etc/aliases.  You need to use the
virtuser function.  Here is what to do to make it work on a Red Hat 7.x
system - YMMV on other systems.

1. Delete the above *@denver... entry from /etc/aliases.  Rebuild the
aliases file by running newaliases .
2. Add "denvertaoist.net" to /etc/mail/local-host-names .
3. Add the following to /etc/mail/virtusertable :

@denvertaoist.net		brandon

Alternatively, you could do this, which is what I recommend.

username at denvertaoist.net	brandon
username2 at denvertaoist.net	brandon
@denvertaoist.net		error:nouser No such user here

Unless you have a very large valid address list, you will want to
remap the mail in the second way.  You will find out why as soon as
some spammer decides to do a dictionary spam attack against addresses
at that domain name.

I'll spare you the puns about enlarging your inbox.

You could change the error:nouser message to be a "special" message for
spammers.  It won't do any good but might make you feel better.

4. Recreate the virtusertable file.  Usually doing "cd /etc/mail ; make"
is sufficient on Red Hat systems.

5. Restart sendmail.  /etc/rc.d/init.d/sendmail restart
6. Test the mail to make sure the old stuff and new stuff all work OK.

Hope this helps,
Jim

PS If you don't know what a dictionary attack is, consider this:

a at denvertaoist.net aa at denvertaoist.net aaa at denvertaoist.net
b at denvertaoist.net bb at denvertaoist.net bbb at denvertaoist.net 
and so forth are all valid e-mail addresses, and they all map back
to your user "brandon."

-- 
Jim Ockers, P.Eng. (ockers at ockers.net)
Contact info: please see http://www.ockers.net/



More information about the clue-tech mailing list