Re: [Exim] qualify_domain is also a hostname

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Peter Radcliffe
Dátum:  
Címzett: exim users
Tárgy: Re: [Exim] qualify_domain is also a hostname
Randy Bush <randy@???> probably said:
> on further thought, i think the cause of what i perceive as a problem is
>   o on the local host, roam.psg.com, i address mail to either
>     - randy, or
>     - foo@???
>     - bar@???

>
>   o exim seems to change the randy to randy@??? when there is a local
>     user named randy

>
>   o i need all mail to appear to be From: randy@???, i.e. no hostname,
>     and have no Sender: line

>
> a rewrite rule does not seem to address this.


I do several varients of this on various machines.
If you read the basic configuration file comments and some of the
example configs you should be able to put together pretty much whatever
you want, but;

Unqualified email addresses are evil. This isn't the days of lone
hosts with people sending little mail offsite anymore.
You have to decide what you want unqualified recipients to be qualified
with, be it the local hostname or the domain.

If you don't set primary_hostname and qualify_recipient they'll both be
set to your local hostname, so if you send mail to "randy" it will be
qualified with the local host and delivered locally (assuming the local
host is in local_domains). If you send mail to "randy@domain" it will
go to randy@domain.

If you set qualify_domain to be "domain" then unqualified source email
addresses will be qualified with "domain".

If you want localhost mail to be delivered locally, put the localhost
in local_domains (I tend to use local_domains = "@", the @ is replaced
with the contents of primary_hostname).
I'm a great beliver in maskerading everything if I have a domain or
subdomain to use. Everything qualified with a domain and no local
delivery on random machines (too easy to lose/miss mail on random
machines that way).

If you want mail sent to foo@primary_hostname where foo doesn't exist
to be sent to foo@domain, set up a new last director that will pass
everything on to a smarthost, like;
# If its unknown and in the listed domains, move it into ${qualify_domain}
unknownto:
no_verify
domains = "${primary_hostname}"
driver = smartuser
new_address = ${local_part}@${qualify_domain}

If you want all from lines that are set to the local hostname (and
presumably replyto lines if they exist) to get rewritten to dom.ain, use
a rewriting rule.

*@@ $1@??? Ffr

I tend to use macros when I use the same domain lots of times ina config
file to make it easier to change.

This isn't rocket science, specifiy where you want mail to go and set
the appropriate options/director/rewrite rules.

P.

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