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

smtpd_banner and available variable

Expand Messages
  • Алексей Доморадов
    Hello all, can t find which variables I could use in smtpd_banner except of $myhostname/$mail_name? Is that possible to use $client_address?
    Message 1 of 8 , Jul 23 2:34 PM
    • 0 Attachment
      Hello all, can't find which variables I could use in smtpd_banner except of $myhostname/$mail_name? Is that possible to use $client_address?

    • Wietse Venema
      ... Postfix behavior is documented. If something is missing please post a bug report. As documented at the top of man 1 postconf , $name expands to the value
      Message 2 of 8 , Jul 23 2:57 PM
      • 0 Attachment
        ??????? ?????????:
        > Hello all, can't find which variables I could use in smtpd_banner
        > except of $myhostname/$mail_name? Is that possible to use
        > $client_address?

        Postfix behavior is documented. If something is missing please post
        a bug report.

        As documented at the top of "man 1 postconf", $name expands to the
        value of the named Postfix main.cf parameter.

        As documented in that same manual under "smtpd_banner", this feature
        promises no other $name expansions.

        If something is not promised in the documentation, then it is not
        supported.

        Wietse
      • Viktor Dukhovni
        ... There are no variables in smtpd_banner. You re confused by generic support for recursive main.cf variable expansion. By the time smtpd(8) sees
        Message 3 of 8 , Jul 23 3:01 PM
        • 0 Attachment
          On Wed, Jul 24, 2013 at 01:34:02AM +0400, ??????? ????????? wrote:

          > Hello all, can't find which variables I could use in smtpd_banner
          > except of $myhostname/$mail_name? Is that possible to use
          > $client_address?

          There are no variables in smtpd_banner. You're confused by generic
          support for recursive main.cf variable expansion. By the time
          smtpd(8) sees smptd_banner it is a string constant.

          Best practice is to largely leave smtpd_banner alone. The default
          is just fine. If you prefer whatever legal advantage denouncing
          unsolicited commericial email may confer:

          smtpd_banner = $myhostname ESMTP ($mail_name) NO UCE.

          The "$myhostname" is expanded once by the generic main.cf parser,
          not separately for each connecting client.

          --
          Viktor.
        • Алексей Доморадов
          I just read http://www.postfix.org/postconf.5.html#smtpd_banner and there no information about that. Thanks to point me in the right way. P.S. maybe it would
          Message 4 of 8 , Jul 24 10:00 AM
          • 0 Attachment
            I just read http://www.postfix.org/postconf.5.html#smtpd_banner and there no information about that. Thanks to point me in the right way.

            P.S.
            maybe it would be possible by using 3rd party software (some policy server) ?


            Вторник, 23 июля 2013, 22:01 UTC от Viktor Dukhovni <postfix-users@...>:
            On Wed, Jul 24, 2013 at 01:34:02AM +0400, ??????? ????????? wrote:

            > Hello all, can't find which variables I could use in smtpd_banner
            > except of $myhostname/$mail_name? Is that possible to use
            > $client_address?

            There are no variables in smtpd_banner. You're confused by generic
            support for recursive main.cf variable expansion. By the time
            smtpd(8) sees smptd_banner it is a string constant.

            Best practice is to largely leave smtpd_banner alone. The default
            is just fine. If you prefer whatever legal advantage denouncing
            unsolicited commericial email may confer:

            smtpd_banner = $myhostname ESMTP ($mail_name) NO UCE.

            The "$myhostname" is expanded once by the generic main.cf parser,
            not separately for each connecting client.

            --
            Viktor.
          • Viktor Dukhovni
            ... This looks like a waste of time. Why do you care what your banner is? Anything beyond: 220 mail.example.com ESMTP is generally just a waste of bits. --
            Message 5 of 8 , Jul 24 11:02 AM
            • 0 Attachment
              On Wed, Jul 24, 2013 at 09:00:24PM +0400, ??????? ????????? wrote:

              > I just read http://www.postfix.org/postconf.5.html#smtpd_banner
              > and there no information about that. Thanks to point me in the
              > right way.
              >
              > P.S.
              > maybe it would be possible by using 3rd party software (some policy server) ?

              This looks like a waste of time. Why do you care what your banner is?
              Anything beyond:

              220 mail.example.com ESMTP

              is generally just a waste of bits.

              --
              Viktor.
            • Wietse Venema
              ... postconf.5.html explains how $name works. In that document, the smtpd_banner description does not promise other ways to change the smtpd_banner value.
              Message 6 of 8 , Jul 24 11:31 AM
              • 0 Attachment
                > I just read http://www.postfix.org/postconf.5.html#smtpd_banner
                > and there no information about that.

                postconf.5.html explains how $name works.

                In that document, the smtpd_banner description does not promise
                other ways to change the smtpd_banner value.

                Therefore what you ask for is not supported.

                Wietse
              • Алексей Доморадов
                My client want this. Let s say - it just some company standards. if he insists - I would recommend them to use another MTA, for example exim P.S. I have
                Message 7 of 8 , Jul 24 1:08 PM
                • 0 Attachment
                  My client want this. Let's say - it just some company standards. if he insists - I would recommend them to use another MTA, for example exim

                  P.S.
                  I have understand that it not possible in postfix. Thanks for the help


                  Среда, 24 июля 2013, 18:02 UTC от Viktor Dukhovni <postfix-users@...>:
                  On Wed, Jul 24, 2013 at 09:00:24PM +0400, ??????? ????????? wrote:

                  > I just read http://www.postfix.org/postconf.5.html#smtpd_banner
                  > and there no information about that. Thanks to point me in the
                  > right way.
                  >
                  > P.S.
                  > maybe it would be possible by using 3rd party software (some policy server) ?

                  This looks like a waste of time. Why do you care what your banner is?
                  Anything beyond:

                  220 mail.example.com ESMTP

                  is generally just a waste of bits.

                  --
                  Viktor.


                  --
                  Алексей Доморадов
                • Wietse Venema
                  ... If they want it now, then use an MTA that implements it now. This is the first request for client information inside smtpd_banner text, so don t expect
                  Message 8 of 8 , Jul 24 1:36 PM
                  • 0 Attachment
                    > My client want this. Let's say - it just some company standards.
                    > if he insists - I would recommend them to use another MTA, for
                    > example exim

                    If they want it now, then use an MTA that implements it now.

                    This is the first request for client information inside smtpd_banner
                    text, so don't expect that it gets immediate priority.

                    If someone wants this then they could build on existing code that
                    implements smtpd_reject_footer, and that expands $client_address,
                    $client_port, $localtime, and $servername.

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