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

Deferred mail and transports and retries

Expand Messages
  • Abhijeet Rastogi
    Hi all, 1. If a mail is temporarily deferred from a remote MTA, postfix should back-off instantly for some time but I observed this today. Jul 24 06:40:16
    Message 1 of 10 , Jul 24, 2013
    • 0 Attachment
      Hi all,

      1. If a mail is temporarily deferred from a remote MTA, postfix should back-off instantly for some time but I observed this today.

      Jul 24 06:40:16 server.name postfix-smtp4/smtp[6204]: DEC8B4F0185: host mta6.am0.yahoodns.net[98.138.112.35] refused to talk to me: 421 4.7.0 [GL01] Message from (1.2.3.4) temporarily deferred - 4.16.50. Please refer to http://postmaster.yahoo.com/errors/postmaster-21.html
      Jul 24 06:40:16 server.name postfix-smtp4/smtp[6204]: DEC8B4F0185: host mta6.am0.yahoodns.net[63.250.192.46] refused to talk to me: 421 4.7.0 [GL01] Message from (1.2.3.4) temporarily deferred - 4.16.50. Please refer to http://postmaster.yahoo.com/errors/postmaster-21.html

      Can anyone explain why would this happen?

      2. I've multiple transports defined in master.cf which bind to different IPs. When a mail is deferred, will it always be tried via the same transport? If yes, is there a way I can change this behaviour?


      --
      Regards,
      Abhijeet Rastogi (shadyabhi)
      http://blog.abhijeetr.com
    • Michael P. Demelbauer
      ... It s kind of explained in http://postmaster.yahoo.com/errors/postmaster-21.html (and Links from there) You get this, because there were complaints of
      Message 2 of 10 , Jul 25, 2013
      • 0 Attachment
        On Thu, Jul 25, 2013 at 12:16:15PM +0530, Abhijeet Rastogi wrote:
        > Hi all,
        >
        > 1. If a mail is temporarily deferred from a remote MTA, postfix should
        > back-off instantly for some time but I observed this today.
        >
        > Jul 24 06:40:16 server.name postfix-smtp4/smtp[6204]: DEC8B4F0185: host
        > mta6.am0.yahoodns.net[98.138.112.35] refused to talk to me: 421 4.7.0
        > [GL01] Message from (1.2.3.4) temporarily deferred - 4.16.50. Please refer
        > to http://postmaster.yahoo.com/errors/postmaster-21.html
        > Jul 24 06:40:16 server.name postfix-smtp4/smtp[6204]: DEC8B4F0185: host
        > mta6.am0.yahoodns.net[63.250.192.46] refused to talk to me: 421 4.7.0
        > [GL01] Message from (1.2.3.4) temporarily deferred - 4.16.50. Please refer
        > to http://postmaster.yahoo.com/errors/postmaster-21.html
        >
        > Can anyone explain why would this happen?

        It's kind of explained in
        http://postmaster.yahoo.com/errors/postmaster-21.html (and Links from
        there)

        You get this, because there were complaints of Yahoo!-Users, that they
        don't want some of the mails your mailserver sends.

        Michael
        >
        > 2. I've multiple transports defined in master.cf which bind to different
        > IPs. When a mail is deferred, will it always be tried via the same
        > transport? If yes, is there a way I can change this behaviour?
        >
        >
        > --
        > Regards,
        > Abhijeet Rastogi (shadyabhi)
        > http://blog.abhijeetr.com

        --
        Michael P. Demelbauer
        Systemadministration
        WSR
        Arsenal, Objekt 20
        1030 Wien
        -------------------------------------------------------------------------------
        "To learn something new, take the path that you took yesterday."
        --John Burroughs
      • Abhijeet Rastogi
        Hi Micheal, Thanks for your reply. Actually, the issue was I was just writing the mail and it got Sent by mistake. (But, then reading the mail I thought that
        Message 3 of 10 , Jul 25, 2013
        • 0 Attachment
          Hi Micheal,

          Thanks for your reply. Actually, the issue was I was just writing the mail and it got Sent by mistake. (But, then reading the mail I thought that the message was conveyed.)

          The issue is, why does postfix retry the second time instantly (within 1 sec)? Shouldn't postfix wait till the next deferred queue scan happens? (I'm talking about backoff time etc). It tries the delivery 2 times within 1 sec. My understanding says that it should wait till the minimum backoff time.

          On Thu, Jul 25, 2013 at 1:01 PM, Michael P. Demelbauer <michael.demelbauer@...> wrote:
          On Thu, Jul 25, 2013 at 12:16:15PM +0530, Abhijeet Rastogi wrote:
          > Hi all,
          >
          > 1. If a mail is temporarily deferred from a remote MTA, postfix should
          > back-off instantly for some time but I observed this today.
          >
          > Jul 24 06:40:16 server.name postfix-smtp4/smtp[6204]: DEC8B4F0185: host
          > mta6.am0.yahoodns.net[98.138.112.35] refused to talk to me: 421 4.7.0
          > [GL01] Message from (1.2.3.4) temporarily deferred - 4.16.50. Please refer
          > to http://postmaster.yahoo.com/errors/postmaster-21.html
          > Jul 24 06:40:16 server.name postfix-smtp4/smtp[6204]: DEC8B4F0185: host
          > mta6.am0.yahoodns.net[63.250.192.46] refused to talk to me: 421 4.7.0
          > [GL01] Message from (1.2.3.4) temporarily deferred - 4.16.50. Please refer
          > to http://postmaster.yahoo.com/errors/postmaster-21.html
          >
          > Can anyone explain why would this happen?

          It's kind of explained in
          http://postmaster.yahoo.com/errors/postmaster-21.html (and Links from
          there)

          You get this, because there were complaints of Yahoo!-Users, that they
          don't want some of the mails your mailserver sends.

          Michael
          >
          > 2. I've multiple transports defined in master.cf which bind to different
          > IPs. When a mail is deferred, will it always be tried via the same
          > transport? If yes, is there a way I can change this behaviour?
          >
          >
          > --
          > Regards,
          > Abhijeet Rastogi (shadyabhi)
          > http://blog.abhijeetr.com

          --
          Michael P. Demelbauer
          Systemadministration
          WSR
          Arsenal, Objekt 20
          1030 Wien
          -------------------------------------------------------------------------------
              "To learn something new, take the path that you took yesterday."
                                      --John Burroughs



          --
          Regards,
          Abhijeet Rastogi (shadyabhi)
          http://blog.abhijeetr.com
        • Wietse Venema
          ... No, this is not required. If you disagree, please point out in the SMTP standard, RTFM RFC 5321, where Postfix is in error. Wietse
          Message 4 of 10 , Jul 25, 2013
          • 0 Attachment
            Abhijeet Rastogi:
            > The issue is, why does postfix retry the second time instantly (within 1
            > sec)? Shouldn't postfix wait till the next deferred queue scan happens?

            No, this is not required. If you disagree, please point out in
            the SMTP standard, RTFM RFC 5321, where Postfix is in error.

            Wietse
          • Abhijeet Rastogi
            Hi Wietse, Thanks for you reply. I may be wrong but I just know what I read in http://tools.ietf.org/html/rfc5321#section-4.5.4 ... Can you help me understand
            Message 5 of 10 , Jul 25, 2013
            • 0 Attachment
              Hi Wietse,

              Thanks for you reply. I may be wrong but I just know what I read in http://tools.ietf.org/html/rfc5321#section-4.5.4

              >  The sender MUST delay retrying a particular destination after one
              >  attempt has failed.  In general, the retry interval SHOULD be at
              >   least 30 minutes; however, more sophisticated and variable strategies
              >   will be beneficial when the SMTP client can determine the reason for
              >   non-delivery.

              Can you help me understand as to where I'm wrong? It says that after one attempt is made, it should delay the next retry.
              Is it like, all MXs (ip addresses) are tried in one go before actually deferring a mail?

              Thanks in advance.

              On Thu, Jul 25, 2013 at 3:54 PM, Wietse Venema <wietse@...> wrote:
              Abhijeet Rastogi:
              > The issue is, why does postfix retry the second time instantly (within 1
              > sec)? Shouldn't postfix wait till the next deferred queue scan happens?

              No, this is not required. If you disagree, please point out in
              the SMTP standard, RTFM RFC 5321, where Postfix is in error.

                      Wietse



              --
              Regards,
              Abhijeet Rastogi (shadyabhi)
              http://blog.abhijeetr.com
            • Wietse Venema
              ... According to RFC 5321 section 5.1, the sending host should try at least two delivery addresses. Quote: When the lookup succeeds, the mapping can result in
              Message 6 of 10 , Jul 25, 2013
              • 0 Attachment
                Abhijeet Rastogi:
                > Hi Wietse,
                >
                > Thanks for you reply. I may be wrong but I just know what I read in
                > http://tools.ietf.org/html/rfc5321#section-4.5.4
                >
                > > The sender MUST delay retrying a particular destination after one
                > > attempt has failed. In general, the retry interval SHOULD be at

                According to RFC 5321 section 5.1, the sending host should try at
                least two delivery addresses.

                Quote:

                When the lookup succeeds, the mapping can result in a list of
                alternative delivery addresses rather than a single address,
                because of multiple MX records, multihoming, or both. To provide
                reliable mail transmission, the SMTP client MUST be able to try
                (and retry) each of the relevant addresses in this list in order,
                until a delivery attempt succeeds. However, there MAY also be
                a configurable limit on the number of alternate addresses that
                can be tried. In any case, the SMTP client SHOULD try at least
                two addresses.

                If you believe that Postfix should wait between the attempts to
                connect to the first and the second MX address, then you are in
                error.

                Wietse
              • Peer Heinlein
                ... Because that s best Postfix can do. Because Postfix SHOULD do that: *) Because if on MX is down, the second one could/should be up and running, so why
                Message 7 of 10 , Jul 25, 2013
                • 0 Attachment
                  Am 25.07.2013 09:52, schrieb Abhijeet Rastogi:


                  > The issue is, why does postfix retry the second time instantly (within 1
                  > sec)? Shouldn't postfix wait till the next deferred queue scan happens?

                  Because that's best Postfix can do. Because Postfix SHOULD do that:

                  *) Because if on MX is down, the second one could/should be up and
                  running, so why shouldn't Postfix use it
                  *) Because Postfix isn't interested in wasting resources and storing
                  deliverable e-mails in the deferred queue
                  *) Because the sender wants to have delivered his e-mail fast without
                  unnecessary delays
                  *) Because the recupient wants to receive his e-mails quickly without
                  unnecessary delays

                  If you believe that deferring e-mails and wasting time is helpful, then use

                  smtp_mx_address_limit = 1
                  smtp_mx_session_limit = 1

                  but don't complain about delays.


                  Peer



                  --
                  Heinlein Support GmbH
                  Schwedter Str. 8/9b, 10119 Berlin

                  http://www.heinlein-support.de

                  Tel: 030 / 405051-42
                  Fax: 030 / 405051-19

                  Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht
                  Berlin-Charlottenburg,
                  Geschäftsführer: Peer Heinlein -- Sitz: Berlin
                • Abhijeet Rastogi
                  Hi Wietse, This helps. Half reading is always bad. This clears everything about my doubt. One other thing still remains. I ve multiple smtp services defined
                  Message 8 of 10 , Jul 25, 2013
                  • 0 Attachment
                    Hi Wietse,

                    This helps. Half reading is always bad. This clears everything about my doubt.

                    One other thing still remains. I've multiple smtp services defined like this. (in master.cf, to use different IPs, selected randomly)

                    ob-smtp1   unix    -       -       n       -       -     smtp
                      -o smtp_bind_address=1.2.3.4
                      -o syslog_name=postfix-smtp1
                    ob-smtp2   unix    -       -       n       -       -     smtp
                      -o smtp_bind_address=5.6.7.8
                      -o syslog_name=postfix-smtp2

                    I suppose that if a message delivered via one of the transport and deferred, it'll always be tried via the same "smtp service". Is there a possibility where I can change the smtp service while retrying for a already deferred mail?

                    On Thu, Jul 25, 2013 at 6:06 PM, Wietse Venema <wietse@...> wrote:
                    Abhijeet Rastogi:
                    > Hi Wietse,
                    >
                    > Thanks for you reply. I may be wrong but I just know what I read in
                    > http://tools.ietf.org/html/rfc5321#section-4.5.4
                    >
                    > >  The sender MUST delay retrying a particular destination after one
                    > >  attempt has failed.  In general, the retry interval SHOULD be at

                    According to RFC 5321 section 5.1, the sending host should try at
                    least two delivery addresses.

                    Quote:

                       When the lookup succeeds, the mapping can result in a list of
                       alternative delivery addresses rather than a single address,
                       because of multiple MX records, multihoming, or both.  To provide
                       reliable mail transmission, the SMTP client MUST be able to try
                       (and retry) each of the relevant addresses in this list in order,
                       until a delivery attempt succeeds.  However, there MAY also be
                       a configurable limit on the number of alternate addresses that
                       can be tried.  In any case, the SMTP client SHOULD try at least
                       two addresses.

                    If you believe that Postfix should wait between the attempts to
                    connect to the first and the second MX address, then you are in
                    error.

                            Wietse



                    --
                    Regards,
                    Abhijeet Rastogi (shadyabhi)
                    http://blog.abhijeetr.com
                  • Wietse Venema
                    ... You can specify an alternate MTA (with smtp_fallback_relay) for delayed mail. There is no feature to specify an alternate delivery agent for delayed mail.
                    Message 9 of 10 , Jul 26, 2013
                    • 0 Attachment
                      Abhijeet Rastogi:
                      > Hi Wietse,
                      >
                      > This helps. Half reading is always bad. This clears everything about my
                      > doubt.
                      >
                      > One other thing still remains. I've multiple smtp services defined like
                      > this. (in master.cf, to use different IPs, selected randomly)
                      >
                      > ob-smtp1 unix - - n - - smtp
                      > -o smtp_bind_address=1.2.3.4
                      > -o syslog_name=postfix-smtp1
                      > ob-smtp2 unix - - n - - smtp
                      > -o smtp_bind_address=5.6.7.8
                      > -o syslog_name=postfix-smtp2
                      >
                      > I suppose that if a message delivered via one of the transport and
                      > deferred, it'll always be tried via the same "smtp service". Is there a
                      > possibility where I can change the smtp service while retrying for a
                      > already deferred mail?

                      You can specify an alternate MTA (with smtp_fallback_relay) for
                      delayed mail. There is no feature to specify an alternate delivery
                      agent for delayed mail.

                      The example looks like an attempt to circumvent Yahoo etc. rate
                      limits per client IP address. I don't have to make that "easy"
                      with Postfix.

                      Wietse
                    • Abhijeet Rastogi
                      You can specify an alternate MTA (with smtp_fallback_relay) for ... Hmm, I was aware of that thing. I ve not used this feature but it s definitely worth
                      Message 10 of 10 , Jul 26, 2013
                      • 0 Attachment
                        You can specify an alternate MTA (with smtp_fallback_relay) for
                        delayed mail.  There is no feature to specify an alternate delivery
                        agent for delayed mail.


                        Hmm, I was aware of that thing.  I've not used this feature but it's definitely worth trying.

                        The example looks like an attempt to circumvent Yahoo etc. rate
                        limits per client IP address.  I don't have to make that "easy"
                        with Postfix.

                        It's not about me trying to do spam. I'm part of a hosting company and sometimes our IPs get blocked temporarily when our outbound spam system stops performing for some odd reason.

                        Thanks for the help.
                         

                                Wietse



                        --
                        Regards,
                        Abhijeet Rastogi (shadyabhi)
                        http://blog.abhijeetr.com
                      Your message has been successfully submitted and would be delivered to recipients shortly.