On Wed, Aug 13, 2003 at 04:55:44PM +0200, Alexander Haderer wrote:
 
> Just for curiousity: Is there a place in /etc/mail where I can tell my 
> sendmail daemon that:
> - it should use [EMAIL PROTECTED] when sending mail
> - it maps local users like "jd" to [EMAIL PROTECTED] for this -f thing

That's the function of genericstable -- it will map a system username
'jd' to an appropriate e-mail address '[EMAIL PROTECTED]'.

See /usr/share/sendmail/cf/README for details, but essentially you
need to add:

    FEATURE(genericstable, `hash -o /etc/mail/genericstable')dnl

to your `hostname`.mc file -- note that this probably won't work as
part of a `hostname`.submit.mc, although I haven't done any sort of
definitive test of that.  I also like to use:

    FEATURE(generics_entire_domain)dnl
    GENERICS_DOMAIN(`infracaninophile.co.uk')dnl

which causes the genericstable transformation only to be applied to
addresses where the domain part matches one of the listed domains.
(Otherwise, all outgoing addresses are candidates for genericstable
matching).

You may also find useful:

    FEATURE(always_add_domain)dnl

To set up the genericstable database itself, edit the file
/etc/mail/genericstable and add the names you want transformed in the
LHS column with the target addresses in the RHS column:

    jd    [EMAIL PROTECTED]

Then run 'make' in /etc/mail to build genericstable.db -- sendmail
will pick up changes to the genericstable.db without having to be
restarted.

        Cheers,

        Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to