Loading ...
Sorry, an error occurred while loading the content.

Relayhost - specify port inside or outside the brackets?

Expand Messages
  • Charles Marcus
    Hello, I ve seen this referenced both ways. In the comments of main.cf, it says: # In the case of SMTP, specify a domain, host, host:port, [host]:port, #
    Message 1 of 9 , Apr 30, 2007
    • 0 Attachment
      Hello,

      I've seen this referenced both ways. In the comments of main.cf, it says:

      # In the case of SMTP, specify a domain, host, host:port, [host]:port,
      # [address] or [address]:port; the form [host] turns off MX lookups.

      So - which should it be?

      host:port

      or

      [host]:port

      Thanks,

      --

      Best regards,

      Charles
    • Ralf Hildebrandt
      ... That depends on wether you want to turn of MX lookups ( the form [host] turns off MX lookups ) -- Ralf Hildebrandt (Ralf.Hildebrandt@charite.de)
      Message 2 of 9 , Apr 30, 2007
      • 0 Attachment
        * Charles Marcus <CMarcus@...>:
        > Hello,
        >
        > I've seen this referenced both ways. In the comments of main.cf, it says:
        >
        > # In the case of SMTP, specify a domain, host, host:port, [host]:port,
        > # [address] or [address]:port; the form [host] turns off MX lookups.
        >
        > So - which should it be?
        >
        > host:port
        >
        > or
        >
        > [host]:port

        That depends on wether you want to turn of MX lookups ("the form
        [host] turns off MX lookups")

        --
        Ralf Hildebrandt (Ralf.Hildebrandt@...) plonk@...
        Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155
        http://www.arschkrebs.de
        Redmond WA -- Microsoft announced today that the official release date
        for the new operating system "Windows 2000" will be delayed until the
        second quarter of 1901. -- seen in Brian Hatch's sig
      • mouss
        ... to send to _that host_, use brakets. The MX for smtp.isp.example is not necessarily smtp.isp.example, but mx.isp.example. probably not what you want
        Message 3 of 9 , Apr 30, 2007
        • 0 Attachment
          Charles Marcus wrote:
          > Hello,
          >
          > I've seen this referenced both ways. In the comments of main.cf, it says:
          >
          > # In the case of SMTP, specify a domain, host, host:port, [host]:port,
          > # [address] or [address]:port; the form [host] turns off MX lookups.
          >
          > So - which should it be?
          >
          > host:port
          >
          > or
          >
          > [host]:port

          to send to _that host_, use brakets.
          The MX for smtp.isp.example is not necessarily smtp.isp.example, but
          mx.isp.example. probably not what you want (because people who want the
          latter would just rely on MX resolution of "isp.example" instead).
        • Noel Jones
          ... The official docs are pretty clear on this. http://www.postfix.org/postconf.5.html#relayhost The form relayhost = host:port uses MX lookups to find the
          Message 4 of 9 , Apr 30, 2007
          • 0 Attachment
            At 05:01 PM 4/30/2007, Charles Marcus wrote:
            >Hello,
            >
            >I've seen this referenced both ways. In the comments of main.cf, it says:
            >
            ># In the case of SMTP, specify a domain, host, host:port, [host]:port,
            ># [address] or [address]:port; the form [host] turns off MX lookups.
            >
            >So - which should it be?
            >
            >host:port
            >
            >or
            >
            >[host]:port

            The official docs are pretty clear on this.
            http://www.postfix.org/postconf.5.html#relayhost

            The form
            relayhost = host:port
            uses MX lookups to find the right IP. The form
            relayhost = [host]:port
            turns off MX lookups and will use host's A record.

            So the correct form depends on wether you want MX lookups or
            not. Usually the correct choice is [host]:port, but not always.

            The port number is never ever inside the brackets, only the host name.


            --
            Noel Jones
          • Charles Marcus
            ... Ahhh! Ok, thanks - makes sense now... -- Best regards, Charles
            Message 5 of 9 , Apr 30, 2007
            • 0 Attachment
              > to send to _that host_, use brakets.
              > The MX for smtp.isp.example is not necessarily smtp.isp.example, but
              > mx.isp.example. probably not what you want (because people who want the
              > latter would just rely on MX resolution of "isp.example" instead).

              Ahhh! Ok, thanks - makes sense now...

              --

              Best regards,

              Charles
            • Dehnert James Sr
              Question? Is it possible to create an alias directory and have postfix source all the files contained therein? I d like to create a /etc/postfix/domain.tld
              Message 6 of 9 , May 1, 2007
              • 0 Attachment
                Question? Is it possible to create an alias directory and have
                postfix source all the files contained therein?

                I'd like to create a /etc/postfix/domain.tld directory and then have
                a file for each individual user or group in that directory. I know I
                could write a script that cats and outputs, then postmaps, but I was
                wondering if there are any provisions for that IN postfix.



                Thanks,
                Zeke

                --
                James "Zeke" Dehnert
                mailto:jdehnert@...
                Phone: +1 707.546.6620 x602 Fax: +1 707.324.8043
                "Life is racing, everything else is just waiting"
              • Adam Jacob Muller
                ... No, there is nothing directly in postfix to do this. Also, please don t reply to old mails when sending new mail, you beak thread continuity. -Adam
                Message 7 of 9 , May 1, 2007
                • 0 Attachment
                  On May 1, 2007, at 7:29 PM, Dehnert James Sr wrote:

                  > Question? Is it possible to create an alias directory and have
                  > postfix source all the files contained therein?
                  >
                  > I'd like to create a /etc/postfix/domain.tld directory and then
                  > have a file for each individual user or group in that directory. I
                  > know I could write a script that cats and outputs, then postmaps,
                  > but I was wondering if there are any provisions for that IN postfix.
                  >
                  >
                  >
                  > Thanks,
                  > Zeke
                  >
                  > --
                  > James "Zeke" Dehnert
                  > mailto:jdehnert@...
                  > Phone: +1 707.546.6620 x602 Fax: +1 707.324.8043
                  > "Life is racing, everything else is just waiting"
                  >
                  >

                  No, there is nothing directly in postfix to do this.
                  Also, please don't reply to old mails when sending new mail, you beak
                  thread continuity.

                  -Adam
                • Wietse Venema
                  ... There is no need to re-invent cat(1) and make(1) for Postfix. Instead of maintaining lots of files, consider using a database. Postfix supports SQL and
                  Message 8 of 9 , May 1, 2007
                  • 0 Attachment
                    Dehnert James Sr:
                    > Question? Is it possible to create an alias directory and have
                    > postfix source all the files contained therein?
                    >
                    > I'd like to create a /etc/postfix/domain.tld directory and then have
                    > a file for each individual user or group in that directory. I know I
                    > could write a script that cats and outputs, then postmaps, but I was
                    > wondering if there are any provisions for that IN postfix.

                    There is no need to re-invent cat(1) and make(1) for Postfix.

                    Instead of maintaining lots of files, consider using a database.
                    Postfix supports SQL and LDAP. They allow you to change a few
                    records without having to postmap a huge amount of information.

                    Wietse
                  • Dehnert James Sr
                    ... Quite true. ... I did consider those, but I those were more complex than what I need for my current small application. If I was building a system for a
                    Message 9 of 9 , May 1, 2007
                    • 0 Attachment
                      On May 1, 2007, at 4:41 PM, Wietse Venema wrote:

                      > Dehnert James Sr:
                      >> Question? Is it possible to create an alias directory and have
                      >> postfix source all the files contained therein?
                      >>
                      >> I'd like to create a /etc/postfix/domain.tld directory and then have
                      >> a file for each individual user or group in that directory. I know I
                      >> could write a script that cats and outputs, then postmaps, but I was
                      >> wondering if there are any provisions for that IN postfix.
                      >
                      > There is no need to re-invent cat(1) and make(1) for Postfix.

                      Quite true.

                      > Instead of maintaining lots of files, consider using a database.
                      > Postfix supports SQL and LDAP. They allow you to change a few
                      > records without having to postmap a huge amount of information.

                      I did consider those, but I those were more complex than what I need
                      for my current small
                      application. If I was building a system for a larger user base I
                      would go that route.

                      > Wietse
                    Your message has been successfully submitted and would be delivered to recipients shortly.