RE: Masquerade sender's domain from sendmail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Tee Yen Ng
> Sent: Saturday, April 19, 2003 9:13 PM
> Subject: Re: Masquerade sender's domain from sendmail
> 
> 
> On Sat, Apr 19, 2003 at 04:07:31PM -0500, Brad Alpert wrote:
> > 
> > I'm using domain masquerade in sendmail now to make mail from any
> > host appear to come from the main domain, so that part works.  I
> > want to specify per-user domain originations, though.
> > 
> > Hmmm..
> 
> I think you might be wanting to use the generics table. I think it's
> something along the lines of adding,
>   
>   FEATURE(`genericstable',`hash -o /etc/mail/genericstable.db')
> 
> to your sendmail.mc, and then adding lines like,
> 
>   username	    username@xxxxxxxxxxxxxxxxxxxxxxxx
> 
> to /etc/mail/genericstable.  Then creating the genericstable.db (there
> should be a makefile in there to do it for you :))
> 
> username should then get mapped to username@xxxxxxxxxxxxxxxxxxxxxxxx
> 
> Disclaimer: I'm pulling this out of an old sendmail config I had lying
> around, so I'm not sure it really works

In most cases, for genericstable to work properly, you will want to add the
domains to rewrite to class {G}. Or... GENERICS_DOMAIN_FILE. (i.e. Add the
following to sendmail.mc)

FEATURE(`genericstable',`hash /etc/mail/genericstable.db')dnl
GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')dnl 

Now re-create sendmail.cf and restart sendmail.

To test... add the canonical name obtained from:

sendmail -bt -d0.1 </dev/null

to /etc/mail/generics-domains

Since the generics-domains file is not a database, sendmail will have to be
restarted.

Example:

[scowles@xxxxxxx mail]$ /usr/sbin/sendmail -bt -d0.1 </dev/null

Version 8.12.8
 Compiled with: DNSMAP HESIOD HES_GETMAILHOST LDAPMAP LOG MAP_REGEX
                MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET
NETINET6
                NETUNIX NEWDB NIS PIPELINING SASL SCANF STARTTLS TCPWRAPPERS
                USERDB USE_LDAP_INIT
 
============ SYSTEM IDENTITY (after readcf) ============
      (short domain name) $w = voyager
  (canonical domain name) $j = voyager.infohiiway.com
         (subdomain name) $m = infohiiway.com
              (node name) $k = voyager
========================================================
 
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>

[scowles@xxxxxxx mail]$ cat genericstable
scowles steve@xxxxxxxxxxxxxxx

[scowles@xxxxxxx mail]$ cat generics-domains 
voyager.infohiiway.com

Now send yourself an e-mail...
[scowles@xxxxxxx mail]$ mail scowles 
Subject: Test
Test



[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux