Re: [Exim] /etc/aliases used after qualify_domain

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Peter Radcliffe
Fecha:  
A: exim-users
Asunto: Re: [Exim] /etc/aliases used after qualify_domain
Philip Hazel <ph10@???> probably said:
> > I need to qualify most unqualified users with @zurich.ibm.com, but if I
> > use qualify_domain, local users, such as root and postmaster, get the
> > domain appended before /etc/aliases is processed. As the delivery rules
> > for all these administration users is there, it does not work. And I don't
> > want my anacron output sent to root@???.


That isn't very clear. There is a lot of difference between
qualifying unqualified recipients with qualifying unqualified
senders. "unqualified users" is ambiguous.

You can do practically anything you want with exim, without changing
anything within exim, but you have to be able to define what you want.

> This seems to me to be a logical problem. How do you define "most"? You
> want some addresses qualified one way and some another way? How is Exim
> to know which are which? How do you know which are which? How do these
> unqualified addresses originate?
>
> If the difference is that one set are senders and another set are
> recipients, you can make use of qualify_recipient as well as
> qualify_domain to do different things.


I have quite a few machines where I want random addresses to be
qualified with pir.net but a few system addresses to be qualified with
the FQDN so I can easily see which machine those system messages come
from.

I realise I'm working on the sender addresses and you appear to want
to change the recipients, but this idea can be used either way. I
qualify unqualified recipients with my main domain. If I want
something to stay local and the main domain isn't local I use
qualified addresses. Unqualified addresses are often evil.

o Qualify everything with the primary_hostname

o Have a rewrite rule to qualify everything apart from the addresses
you care about to the domain you want to masqerade as.

The problem with rewriting any user that comes through the machine
with wildarded FQDNs is that a relay can rewrite things you may not
want rewritten, this way only things with the local FQDN will get
rewritten.


# comment out qualify_domain so the primary_hostname is used to qualify
# senders
#qualify_domain =

# set qualify recipient to be where you want mail to go by default
qualify_recipient = MDOM

[...]

# HERE. Set your domain(s) or comment these out depending if you
# want full masqerading and your qualify_domain setting.
# If its from any of the admin addresses, leave the from side alone.
^(?i)(root|postmaster|exim|news|usenet|uucp|daemon|lp|sys|adm|cyrus|auth)@ * Ff
# otherwise, rewrite the froms.
*@@ $1@${qualify_recipient} Ffr


The first rewrite rule does nothing to the address and the second only
operates on things the first didn't rewrite.

If you can define the list of users you want to be qualified (sender
or recipient) you can rewrite (or not) as appropriate.


This is something I could never get working with sendmail and I was
pleased (all those years ago ;) to be able to do it so easily in exim.

P.

-- 
pir                  pir@???                    pir@???