Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Clarification of square brackets in transport file please

803 views
Skip to first unread message

Stephen Carter

unread,
Oct 2, 2005, 7:54:11 AM10/2/05
to
I understand that using square brackets around a host name tells
postfix to not lookup the MX records for that host and simply use
the A record instead, however I don't understand then why I should
do the same when specifying an IP address. I would have thought
an IP address is specific enough.

Can someone explain this please?

Thanks,

SteveC

Jorey Bump

unread,
Oct 2, 2005, 8:58:57 AM10/2/05
to

For the same reason: To prevent an MX lookup on the provided string. In
the case of an IP address, it will fail.

Tony Earnshaw

unread,
Oct 2, 2005, 9:02:43 AM10/2/05
to

Well, it depends on which IP addresses you're talking about. In main.cf
no IP addresses are specified in square brackets (apart from IPv6
addresses, which are always specified in square brackets, everywhere).

transport (5) (for example) says:

The interpretation of the nexthop field is transport
dependent. In the case of SMTP, specify a service on a
non-default port as host:service, and disable MX (mail
exchanger) DNS lookups with [host] or [host]:port. The []
form is required when you specify an IP address instead of
a hostname.

So, you have to let Postfix know that an IP address in a transport table
is an IP address by putting it in square brackets ...

--Tonni

--
Mail: to...@billy.demon.nl
http://www.billy.demon.nl

Stephen Carter

unread,
Oct 2, 2005, 10:57:11 AM10/2/05
to
>>>Jorey Bump <li...@joreybump.com> 10/02/05 1:58 pm >>>
>For the same reason: To prevent an MX lookup on the provided string. In
>the case of an IP address, it will fail.

Thanks, sometimes it just takes another way of explaining it. So while
I saw an IP address and host/domain name as separate in the sense of
what they are, postfix sees them all as just 'strings', and that is how
they are treated.

Square brackets are in. I use an IP address so I assume the dns lookups
occured, failed, then postfix just send e-mail to the IP. So the downside
with not using brackets is the extra unnecessary dns lookups, as it was
working without them also.

SteveC

0 new messages