Re: Sendmail configuration
> FEATURE(genericstable)dnl ?
yep, if genericstable is actually the feature you want. you can read all
about the options either in the bat book (highly recommended if you're
gonna be screwing around with sendmail) or in the file:
/usr/doc/sendmail/cf.README
> Right: my machine is pick.sel.cam.ac.uk University Computing Service
> (UCS) rules say that *@pick.sel.cam.ac.uk are not allowed to be valid
> email addresses. I therefore tell sendmailconfig that my mail hostname
> is cam.ac.uk {This is because when using exim, my mail smarthost would
> just bounce things with a cannot route to sender:
> mcv21@pick.sel.cam.ac.uk even if I had set the From: line correctly}.
>
> Internal mail, therefore needs the hostname bit changed to
> pick.sel.cam.ac.uk, so that people replying to local mail reply to the
> sender locally rather than trying to send to username@cam.ac.uk (which
> is a valid external mail address in many cases).
>
> External mail, however, needs to substitute peoples @cam.ac.uk email
> addresses. For example, user emma needs to have
> elb30@hermes.cam.ac.uk, mcv21 needs to become matthew@sel.cam.ac.uk
> and so on.
this is gonna be the hard part to do. it's feasible, but i'm not sure
exactly how.
> I don't have very many users, and so re-running some sort of database
> generator would be OK, but I can't figure out sendmail at all :(
i'd read up on the user database then. it's been a long time since i read
about it but i think it might do what you want, in combination with
genericstable ...
adam.
ps. from the cf.README it looks like you an do what you want... see
below:
genericstable This feature will cause certain addresses originating
locally (i.e. that are unqualified) or a domain listed in
$=G to be looked up in a map and turned into another
("generic") form, which can change both the domain name
and the user name. This is similar to the userdb
functionality. The same types of addresses as for
masquerading are looked up, i.e. only header sender
addresses unless the allmasquerade and/or
masquerade_envelope features are given. Qualified
addresses must have the domain part in the list of names
given by the by the macros GENERICS_DOMAIN or
GENERICS_DOMAIN_FILE (analogously to MASQUERADE_DOMAIN and
MASQUERADE_DOMAIN_FILE, see below).
The argument of FEATURE(genericstable) may be the map
definition; the default map definition is:
hash -o /etc/genericstable
The key for this table is either the full address or the
unqualified username (the former is tried first); the
value is the new user address. If the new user address
does not include a domain, it will be qualified in the
standard manner, i.e. using $j or the masquerade name.
Note that the address being looked up must be fully
qualified. For local mail, it is necessary to use
FEATURE(always_add_domain) for the addresses to be
qualified.
Reply to: