Robert Nickel | 15 May 10:10

Nullclient with root aliased and user accounts masqueraded...

Sorry for the subject, it's a strange nut I'm trying to deal with here.

Background:
  Two domains are in play, foo.com and bar.com
  Client machines are of the form host.foo.com and host.bar.com in fairly
    equal numbers.
  Unqualified email sent from a any host should have one of two things happen
    depending on the address:
      1. If it's root, use /etc/aliases (or virtual_aliases) to expand
         recipient to root+hostfqdn <at> bar.com and the from should remain as
         root <at> hostfqdn.
      2. All other email for local user accounts should be masqueraded to
         user <at> bar.com.

As an example, take my workstation with a fqdn of coin.foo.com.

If I send unqualified email as root to root, it should send email that looks
like this:

  From: root <at> coin.foo.com
  To: root+coin.foo.com <at> bar.com
  Subject: ....

Email sent from the same host as root to user robert should look thusly:
  From: root <at> coin.foo.com
  To: robert <at> bar.com
  Subject: blah

I've been poking around for several days and tried a number of different
configs up to and including using recipient_cannonical_maps to no avail.
(Continue reading)

mouss | 15 May 17:46

Re: Nullclient with root aliased and user accounts masqueraded...

Robert Nickel wrote:
> Sorry for the subject, it's a strange nut I'm trying to deal with here.
>
> Background:
>   Two domains are in play, foo.com and bar.com
>   Client machines are of the form host.foo.com and host.bar.com in fairly
>     equal numbers.
>   Unqualified email sent from a any host should have one of two things happen
>     depending on the address:
>       1. If it's root, use /etc/aliases (or virtual_aliases) to expand
>          recipient to root+hostfqdn <at> bar.com and the from should remain as
>          root <at> hostfqdn.
>       2. All other email for local user accounts should be masqueraded to
>          user <at> bar.com.
>
> As an example, take my workstation with a fqdn of coin.foo.com.
>
> If I send unqualified email as root to root, it should send email that looks
> like this:
>
>   From: root <at> coin.foo.com
>   To: root+coin.foo.com <at> bar.com
>   Subject: ....
>
> Email sent from the same host as root to user robert should look thusly:
>   From: root <at> coin.foo.com
>   To: robert <at> bar.com
>   Subject: blah
>
> I've been poking around for several days and tried a number of different
(Continue reading)

Robert Nickel | 15 May 22:21

Re: Nullclient with root aliased and user accounts masqueraded...

On 2008.05.15 17:46:45 +0000, mouss wrote:
> Robert Nickel wrote:
> >Sorry for the subject, it's a strange nut I'm trying to deal with here.
> >
> >Background:
> >  Two domains are in play, foo.com and bar.com
> >  Client machines are of the form host.foo.com and host.bar.com in fairly
> >    equal numbers.
> >  Unqualified email sent from a any host should have one of two things 
> >  happen depending on the address:
> >      1. If it's root, use /etc/aliases (or virtual_aliases) to expand
> >         recipient to root+hostfqdn <at> bar.com and the from should remain as
> >         root <at> hostfqdn.
> >      2. All other email for local user accounts should be masqueraded to
> >         user <at> bar.com.
> >
> >As an example, take my workstation with a fqdn of coin.foo.com.
> >
> >If I send unqualified email as root to root, it should send email that 
> >looks like this:
> >
> >  From: root <at> coin.foo.com
> >  To: root+coin.foo.com <at> bar.com
> >  Subject: ....
> >
> >Email sent from the same host as root to user robert should look thusly:
> >  From: root <at> coin.foo.com
> >  To: robert <at> bar.com
> >  Subject: blah
> >
(Continue reading)

mouss | 15 May 22:55

Re: Nullclient with root aliased and user accounts masqueraded...

Robert Nickel wrote:
> I don't insist on it, it's just an artifact of the services running on the
> system.  I have been reading the docs on myorigin and just about everything
> else I can.  I would not dream of bothering the list if I hadn't.
>
> A note of the scale of the problem.  I have thousands of machines spread over
> two separate domain names (the foo.com and bar.com above).  One domain
> (bar.com above) has valid email addresses user <at> bar.com for all of the users
> that would be using the system (save service accounts).
>
> I want alias maps to work so that the service accounts created by packages
> will actually forward to the correct email account (usually root).  I want
> root email to be subject to local alias expansion as well so that the alias
> file can forward the mail to the appropriate person.
>   

if you want to use alias_maps, then you must make the mail go via local. 
if you only want this for root for example, just use a virtual alias:

root <at> example.com      root <at> localhost.example.com

where localhost.example.com is delivered via local (which is the case if 
it is listed in mydestination).
> The core issue is that different users on different machines running cron
> jobs.  If the user (robert in the example above) has a cron job without
> setting MAILTO (or forgets to redirect stderr to stdout), cron will send email
> to the unqualified address robert.  I would like this email to forward to
> robert <at> bar.com without having to enumerate all of the users in my domain on
> each machine. 
>   
(Continue reading)


Gmane