[augeas-devel] [Augeas] #303: postfix transport lens fails to parse a valid file

Augeas trac at fedorahosted.org
Tue Sep 25 11:06:49 UTC 2012


#303: postfix transport lens fails to parse a valid file
-------------------------------+----------------------
 Reporter:  mfo                |       Owner:  raphink
     Type:  defect             |      Status:  new
 Priority:  minor              |   Milestone:  next
Component:  Augeas             |     Version:  devel
 Keywords:  postfix_transport  |  Blocked By:
 Blocking:                     |
-------------------------------+----------------------
 I noticed augeas failed to parse a valid postfix transport map, because it
 contained this line:

 {{{
 user at example.com  [smtp.gmail.com]:587
 }}}

 According to transport(5):

 {{{
 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.
 }}}

 Below is a patch to the tests which fails on such an entry.

 {{{
 diff --git lenses/tests/test_postfix_transport.aug
 lenses/tests/test_postfix_transport.aug
 index ef61923..bc0c282 100644
 --- lenses/tests/test_postfix_transport.aug
 +++ lenses/tests/test_postfix_transport.aug
 @@ -16,6 +16,7 @@ example.com      :[gateway.example.com]
  user.foo at example.com
      smtp:bar.example:2025
  .example.com     error:mail for *.example.com is not deliverable
 +user at example.com [12.34.56.78]:587
  "

  (* Test: Postfix_Transport.lns *)
 @@ -45,4 +46,7 @@ test Postfix_Transport.lns get conf =
    { "pattern" = ".example.com"
      { "transport" = "error" }
      { "nexthop" = "mail for *.example.com is not deliverable" } }
 +  { "pattern" = "user at example.com"
 +    { "transport" }
 +    { "nexthop" = "[12.34.56.78]:587" } }

 }}}

-- 
Ticket URL: <https://fedorahosted.org/augeas/ticket/303>
Augeas <http://augeas.net/>
a configuration API




More information about the augeas-devel mailing list