Re: resolve local domain with MX records

2016-05-29 Thread Zalezny Niezalezny
Perfect! Thank You very much!

On Sun, May 29, 2016 at 9:15 AM, Wietse Venema  wrote:

> Zalezny Niezalezny:
> > Hallo Wietse,
> >
> > yes I understand Your point.
> >
> > In my internal host, dns lookup is disabled. I simply would like to know
> > how may I specified some additional hosts in case of accidents one of
> them.
>
> IF you can't rely on DNS, list all gateway IP addresses in /etc/hosts.
>
> /etc/postfix/main.cf:
> relayhost = [gateway]
> smtp_host_lookup = native
>
> /etc/hosts:
> gateway 10.0.0.1
> gateway 10.0.0.2
> gateway 10.0.0.3
> gateway 10.0.0.4
>
> /etc/host.conf:
> multi on
>
> Wietse
>


Re: resolve local domain with MX records

2016-05-29 Thread Wietse Venema
Zalezny Niezalezny:
> Hallo Wietse,
> 
> yes I understand Your point.
> 
> In my internal host, dns lookup is disabled. I simply would like to know
> how may I specified some additional hosts in case of accidents one of them.

IF you can't rely on DNS, list all gateway IP addresses in /etc/hosts.

/etc/postfix/main.cf:
relayhost = [gateway]
smtp_host_lookup = native

/etc/hosts:
gateway 10.0.0.1
gateway 10.0.0.2
gateway 10.0.0.3
gateway 10.0.0.4

/etc/host.conf:
multi on

Wietse


Re: resolve local domain with MX records

2016-05-29 Thread Zalezny Niezalezny
I`m sorry, I sent my last email too fast.

example.com:[192.168.2.10, 192.168.2.11]

Will it be possible something like this ?


Thanks in advance for Your support.

Zalezny

On Sun, May 29, 2016 at 10:44 AM, Zalezny Niezalezny <
zalezny.niezale...@gmail.com> wrote:

> Hallo Wietse,
>
> yes I understand Your point.
>
> In my internal host, dns lookup is disabled. I simply would like to know
> how may I specified some additional hosts in case of accidents one of them.
> For example, in the transport table we have something like this:
>
>
>
>
> *example.com   :[gateway.example.com 
> ]*
>
>
>
> *Once dnslookup is disabled, E-mail will not be deliver to the gateway. At 
> the moment gateway.example.com  include MX record 
> with 2 systems.*
>
>
>
> *mx1.example.com  / mx2.example.com 
> *
>
>
>
>
> *Is it possible somehow to specified in the transport table multiple hosts 
> when dnslookup is off ?*
>
>
> *example.com *
>
>
> On Fri, May 27, 2016 at 7:29 PM, Wietse Venema 
> wrote:
>
>> Please read my email again. Postfix does not use DNS do decide what
>> domains to ***receive*** email for; you must specify those domains
>> with mydestination, relay_domains, vrtial_alias_domains or
>> virtual_mailbox_domains.
>>
>> Of course Postfix will use DNS to decide how to ***deliver*** mail.
>> Sending email without DNS would be problematic.
>>
>> Wietse
>>
>
>


Re: resolve local domain with MX records

2016-05-29 Thread Zalezny Niezalezny
Hallo Wietse,

yes I understand Your point.

In my internal host, dns lookup is disabled. I simply would like to know
how may I specified some additional hosts in case of accidents one of them.
For example, in the transport table we have something like this:




*example.com   :[gateway.example.com
]*



*Once dnslookup is disabled, E-mail will not be deliver to the
gateway. At the moment gateway.example.com
 include MX record with 2 systems.*



*mx1.example.com  / mx2.example.com
*




*Is it possible somehow to specified in the transport table multiple
hosts when dnslookup is off ?*


*example.com *


On Fri, May 27, 2016 at 7:29 PM, Wietse Venema  wrote:

> Please read my email again. Postfix does not use DNS do decide what
> domains to ***receive*** email for; you must specify those domains
> with mydestination, relay_domains, vrtial_alias_domains or
> virtual_mailbox_domains.
>
> Of course Postfix will use DNS to decide how to ***deliver*** mail.
> Sending email without DNS would be problematic.
>
> Wietse
>


Re: resolve local domain with MX records

2016-05-27 Thread Wietse Venema
Please read my email again. Postfix does not use DNS do decide what
domains to ***receive*** email for; you must specify those domains
with mydestination, relay_domains, vrtial_alias_domains or
virtual_mailbox_domains.

Of course Postfix will use DNS to decide how to ***deliver*** mail.
Sending email without DNS would be problematic.

Wietse


Re: resolve local domain with MX records

2016-05-27 Thread Zalezny Niezalezny
Hallo Vietse,

thank You very much for Your support and Postfix!

I have one more question, maybe here You will be also able to help. You
said that "Postfix will not look in DNS...".
Our E-mail environment base on Postfix and Exchange and we are using local
domains to balance E-mail traffic between nodes.

If DNS look up is only intentional, then how to properly configured SMTP
relay ? In my environment E-mail is going thru several network zones to
different departments and in most cases everything is configured using
/etc/postfix/transport table.


domain.com   relay:mydomain.local


Internal domain with MX records is kind of loadbalancer (with high
availability) in that case. So how to properly route E-mails to different
domains where each department has 2-3 mail servers.
In the configuration files, should I specified "IPs" with comas etc.etc. ?


Thank You in advance for any hint.


Zalezny


On Fri, May 27, 2016 at 2:53 PM, Wietse Venema  wrote:

> By design, Postfix will not look in DNS to find out what domains
> it should receive mail for. This is intentional, so that Postfix
> behaves predictably when some network infrastructure is down.
>
> Postfix configuration requires that you configure ALL domains that
> Postfix receives mail for with mydestination, relay_domains,
> virtual_alias_domains or virtual_mailbox_domains.
>
> Wietse
>


resolve local domain with MX records

2016-05-27 Thread Zalezny Niezalezny
Hi Everyone,

in my Postfix I have configured something like this:


/etc/postfix/main.cf
# ###
smtpd_sender_restrictions =
check_sender_access regexp:/etc/postfix/check_sender_regexp
# ###

/etc/postfix/check_sender_regexp
# #
/.*@domain.com/ FILTER relay:mydomain.local
# ##


mydomain.local - its local domain in our internal environment which include
3 x MX records


How should I write the rule in /etc/postfix/check_sender_regexp, to force
Postfix to resolve MX records from "mydomain.local" and choose one of them
to deliver message ?


With current configuration all the time I getting following error:

Remote Server returned '< #5.3.0 X-Postfix; unable to look up host
mydomain.local: No address associated with hostname>'



How to properly configured ?



Thanks in advance for any hints.



Cheers

Zalezny