On 5/27/2015 12:48 AM, Wietse Venema wrote:
Wietse:
A domain-less address will get @$myorigin appended. A domain
is delivered locally only if is listed in $mydestination.

Sharon Stahl:
In the .forward file, I was expecting that the "username only"
would get delivered because the aliases file shows that the
alias for the username is   username@thatsamemachine

A domain-less address in .forward will get @$myorigin appended.
Only if that domain is listed in mydestination, the address is given
to the local(8) delivery agent which does the aliases lookup.

        Wietse



Sorry.  I forgot to send this yesterday.
Here are some pertinent entries from my main.cf

myhostname = server.domain.com
mydomain = domain.com
myorigin = $mydomain
mydestination = $myhostname, localhost.$mydomain, localhost,/etc/postfix/local-host-names
relay_domains = $mydestination $mydomain
relayhost = [192.168.1.5]
alias_maps = hash:/etc/aliases, nis:mail.aliases
transport_maps = hash:/etc/postfix/transport
masquerade_domains = $mydomain
masquerade_exceptions = root

We have three mail servers that deliver local mail for 3 buildings. We have one machine that all mail comes through and goes out of our network for filtering (relayhost) and valid recipient. DNS entries for everyone only have the relayhost as MX. What I am trying to do is if mail comes to a server either from inside or outside (redirected from our filtering relayhost), I want it to utilize the local-host-names, aliases and .forward files to see if it is supposed to keep mail for that person/machine or send it on. In sendmail is worked with
just a username in the .forward,  not username@machine .

From what you wrote, the username only is getting converted to
usern...@domain.com
If it would then check the aliases, postfix would know that it is to be kept locally. aliases shows "username usern...@thisserver.domain.com

I guess part of my problem is not understanding the order in which all
things get read.   I see that what is happening is the aliases is not
checked and the server is sending the address to the relayhost which is
causing a "loop backs to me".

If I change the mydomain = $myhostname
instead of mydomain = domain.com will that solve the problem? Will that cause any other problems concerning mail that would need to be
sent to another server inside our school?

Aloha, Sharon

Reply via email to