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

sender_canonical_maps and no delivered mails

Expand Messages
  • pgala
    Hi, i am using sender_canonical_maps to rewrite sender when i want send outgoing ... /^.*/ mymail@isp.com ...
    Message 1 of 12 , Feb 3 5:45 AM
    • 0 Attachment
      Hi,

      i am using sender_canonical_maps to rewrite sender when i want send outgoing
      mail. Sender_canonical_maps is:
      ----Sender_canonical_maps---
      /^.*/ mymail@...
      -----------------------------
      Sender_canonical_classes=envelope_address.

      I also used dovecot to reply mail when recipient's mailbox is full. When
      sender_canonical_maps is disabled everything is fine, sender have
      information about no delivered mail. When sender_canonical_maps is able
      information about no delivered mail is deliver to mymail@.... How can i
      fix it?



      --
      View this message in context: http://postfix.1071664.n5.nabble.com/sender-canonical-maps-and-no-delivered-mails-tp64909.html
      Sent from the Postfix Users mailing list archive at Nabble.com.
    • Noel Jones
      ... Postfix docs for rewriting outgoing mail can be found here: http://www.postfix.org/SOHO_README.html#fantasy -- Noel Jones
      Message 2 of 12 , Feb 3 8:13 AM
      • 0 Attachment
        On 2/3/2014 7:45 AM, pgala wrote:
        > Hi,
        >
        > i am using sender_canonical_maps to rewrite sender when i want send outgoing
        > mail. Sender_canonical_maps is:
        > ----Sender_canonical_maps---
        > /^.*/ mymail@...
        > -----------------------------
        > Sender_canonical_classes=envelope_address.
        >
        > I also used dovecot to reply mail when recipient's mailbox is full. When
        > sender_canonical_maps is disabled everything is fine, sender have
        > information about no delivered mail. When sender_canonical_maps is able
        > information about no delivered mail is deliver to mymail@.... How can i
        > fix it?

        Postfix docs for rewriting outgoing mail can be found here:
        http://www.postfix.org/SOHO_README.html#fantasy




        -- Noel Jones
      • pgala
        Thanks, i read it but i can t resolve my problem still. I have private mail server using by my java application. I rewrite envelope sender to relay mail
        Message 3 of 12 , Feb 19 4:31 AM
        • 0 Attachment
          Thanks, i read it but i can't resolve my problem still.

          I have private mail server using by my java application. I rewrite envelope
          sender to relay mail outgoing, but i want disable this rewriting when mail
          is delivered inside my domain.

          I have to enable rewriting for outgoing mail to be able relay mail and i
          have to disable rewriting for mail inside my domain. In other case dovecot
          bounced message about qouta exceeded to relay host. Is it possible do it?

          Thank for helping



          --
          View this message in context: http://postfix.1071664.n5.nabble.com/sender-canonical-maps-and-no-delivered-mails-tp64909p65335.html
          Sent from the Postfix Users mailing list archive at Nabble.com.
        • Noel Jones
          ... This is exactly what you re looking for: http://www.postfix.org/ADDRESS_REWRITING_README.html#generic -- Noel Jones
          Message 4 of 12 , Feb 19 6:14 AM
          • 0 Attachment
            On 2/19/2014 6:31 AM, pgala wrote:
            > Thanks, i read it but i can't resolve my problem still.
            >
            > I have private mail server using by my java application. I rewrite envelope
            > sender to relay mail outgoing, but i want disable this rewriting when mail
            > is delivered inside my domain.
            >

            This is exactly what you're looking for:
            http://www.postfix.org/ADDRESS_REWRITING_README.html#generic


            -- Noel Jones


            > I have to enable rewriting for outgoing mail to be able relay mail and i
            > have to disable rewriting for mail inside my domain. In other case dovecot
            > bounced message about qouta exceeded to relay host. Is it possible do it?
            >
            > Thank for helping
            >
            >
            >
            > --
            > View this message in context: http://postfix.1071664.n5.nabble.com/sender-canonical-maps-and-no-delivered-mails-tp64909p65335.html
            > Sent from the Postfix Users mailing list archive at Nabble.com.
            >
          • pgala
            but generic rewrite envelope and header addresses. I want rewrite only envelope addresses for only mails which are relay (not from my internal domains). --
            Message 5 of 12 , Feb 19 7:12 AM
            • 0 Attachment
              but generic rewrite envelope and header addresses. I want rewrite only
              envelope addresses for only mails which are relay (not from my internal
              domains).



              --
              View this message in context: http://postfix.1071664.n5.nabble.com/sender-canonical-maps-and-no-delivered-mails-tp64909p65345.html
              Sent from the Postfix Users mailing list archive at Nabble.com.
            • Noel Jones
              ... This sounds quite unusual. Could you please explain what problem this solves for you? -- Noel Jones
              Message 6 of 12 , Feb 19 7:26 AM
              • 0 Attachment
                On 2/19/2014 9:12 AM, pgala wrote:
                > but generic rewrite envelope and header addresses. I want rewrite only
                > envelope addresses for only mails which are relay (not from my internal
                > domains).
                >


                This sounds quite unusual. Could you please explain what problem
                this solves for you?


                -- Noel Jones
              • pgala
                I use postfix and dovecot as mail server in java application. I use virutal domain, mysql database etc. to send internal mail. If i want send mail to world i
                Message 7 of 12 , Feb 19 7:56 AM
                • 0 Attachment
                  I use postfix and dovecot as mail server in java application. I use virutal
                  domain, mysql database etc. to send internal mail. If i want send mail to
                  world i use my mail account in mail service provider. I want everybody can
                  send outgoing mail so i set in sender_canonical
                  -----------------------
                  /^.*/ mymail@...
                  -----------------------
                  and i set in main.cf "sender_canonical_classes = envelope_sender".
                  My internal domain is @mydomain. This domain is ownership by my client, but
                  my mail server isnt visible from world. I use header_check to prevent user
                  set mail from other domains, e.g user1@.... It is fine.

                  I cant use generic because in this case recipient see as sender address
                  "mymail@...". It should be e.g user1@mydomain.

                  In dovecot i use plugin quota exceeded to inform sender about no delivered
                  mail if somebody send internal mail. My problem is that dovecot send
                  information about no delivered messages to envelope_sender instead header
                  from. I try force dovecot to use header from but i cant. I also write on
                  dovecot mailing list by i didn't get answers still.

                  I would be very greatfully if you could help me.



                  --
                  View this message in context: http://postfix.1071664.n5.nabble.com/sender-canonical-maps-and-no-delivered-mails-tp64909p65348.html
                  Sent from the Postfix Users mailing list archive at Nabble.com.
                • lists@rhsoft.net
                  ... you should *not send any* mail about not delivered messages in a sane setup you REJECT the mail with a message clearly stating the account is over quota
                  Message 8 of 12 , Feb 19 8:02 AM
                  • 0 Attachment
                    Am 19.02.2014 16:56, schrieb pgala:
                    > In dovecot i use plugin quota exceeded to inform sender about no delivered
                    > mail if somebody send internal mail. My problem is that dovecot send
                    > information about no delivered messages to envelope_sender instead header
                    > from. I try force dovecot to use header from but i cant. I also write on
                    > dovecot mailing list by i didn't get answers still.

                    you should *not send any* mail about not delivered messages

                    in a sane setup you REJECT the mail with a message clearly
                    stating the account is over quota and *the sending server*
                    is resposible to generate a bounce to *his user*

                    for the delivering server it looks like below and that
                    message is part of the from it generated bounce - again
                    you must not generate the bounce and send it actively

                    relay=*****[****]:25, delay=104, delays=46/54/3.5/0.32, dsn=5.0.0, status=bounced (host *****[*****] said: 550
                    Mailbox quota exceeded (in reply to RCPT TO command))
                  • Viktor Dukhovni
                    ... When someone foolishly misconfigures MTAs to send notices to the header From: address, rather than the envelope address, I promptly unsubscribe them from
                    Message 9 of 12 , Feb 19 8:16 AM
                    • 0 Attachment
                      On Wed, Feb 19, 2014 at 07:56:08AM -0800, pgala wrote:

                      > In dovecot I use plugin quota exceeded to inform sender about no delivered
                      > mail if somebody send internal mail. My problem is that dovecot send
                      > information about no delivered messages to envelope_sender instead header
                      > from. I try force dovecot to use header from but i cant. I also write on
                      > dovecot mailing list by i didn't get answers still.

                      When someone foolishly misconfigures MTAs to send notices to the
                      header "From:" address, rather than the envelope address, I promptly
                      unsubscribe them from the postfix-users list.

                      Just because someone posts to the list, does not mean that he wants
                      to receive notifications for every failed delivery to random
                      subscribers he had no specific intention to address.

                      The ONLY case in which notices are sent to a header sender, is with
                      MDN requests, which are at the interactive discretion of the reader,
                      and the reply address is "Disposition-Notification-To:" not "From:".

                      All automatically generated notices, MUST go to the envelope sender,
                      and MUST obey the constraints imposed by RFC 3834.

                      Misconfigured "out-of-office" notifications that are sent to "From:"
                      are a prime example of lack of clue in this respect.

                      --
                      Viktor.
                    • pgala
                      but i want info about exceeded quota only if recipient is user in my internal domain. For example user2 have full mailbox. If try user1@mydomain send mail to
                      Message 10 of 12 , Feb 19 8:21 AM
                      • 0 Attachment
                        but i want info about exceeded quota only if recipient is user in my internal
                        domain.
                        For example user2 have full mailbox.
                        If try user1@mydomain send mail to user2@mydomain then get mail "your mails
                        to user2@mydomain can't be delivered". This mail is generate by dovecto if i
                        use quota exceeded plugin.

                        If i dont rewrite envelope_sender by sender_canonical_maps everythings is
                        fine, but if i use sender_canonical_maps, mail from dovecot is delivered to
                        mymail@... instead user1@mydomain.

                        I have to rewrite sender_canonical_maps for mails goint to world because i
                        want that other users can see addresses user1@...,
                        user2@... instead mymail@...



                        --
                        View this message in context: http://postfix.1071664.n5.nabble.com/sender-canonical-maps-and-no-delivered-mails-tp64909p65351.html
                        Sent from the Postfix Users mailing list archive at Nabble.com.
                      • Noel Jones
                        ... Not fine, this sounds like a broken design. ... Another badly broken design. Non delivery notices *must* go to the envelope sender, never to the header
                        Message 11 of 12 , Feb 19 8:29 AM
                        • 0 Attachment
                          On 2/19/2014 9:56 AM, pgala wrote:
                          > I use postfix and dovecot as mail server in java application. I use virutal
                          > domain, mysql database etc. to send internal mail. If i want send mail to
                          > world i use my mail account in mail service provider. I want everybody can
                          > send outgoing mail so i set in sender_canonical
                          > -----------------------
                          > /^.*/ mymail@...
                          > -----------------------
                          > and i set in main.cf "sender_canonical_classes = envelope_sender".
                          > My internal domain is @mydomain. This domain is ownership by my client, but
                          > my mail server isnt visible from world. I use header_check to prevent user
                          > set mail from other domains, e.g user1@.... It is fine.

                          Not fine, this sounds like a broken design.

                          >
                          > I cant use generic because in this case recipient see as sender address
                          > "mymail@...". It should be e.g user1@mydomain.
                          >
                          > In dovecot i use plugin quota exceeded to inform sender about no delivered
                          > mail if somebody send internal mail. My problem is that dovecot send
                          > information about no delivered messages to envelope_sender instead header
                          > from. I try force dovecot to use header from but i cant. I also write on
                          > dovecot mailing list by i didn't get answers still.

                          Another badly broken design. Non delivery notices *must* go to the
                          envelope sender, never to the header from: address.



                          -- Noel Jones
                        • Viktor Dukhovni
                          ... There is no need for (it is a mistake to configure) sender notices about exceeded quotas. Senders get bounces when mail is not delivered (Dovecot LDA
                          Message 12 of 12 , Feb 19 8:30 AM
                          • 0 Attachment
                            On Wed, Feb 19, 2014 at 08:21:09AM -0800, pgala wrote:

                            > But I want info about exceeded quota only if recipient is user in my internal
                            > domain.

                            There is no need for (it is a mistake to configure) sender notices
                            about exceeded quotas. Senders get bounces when mail is not
                            delivered (Dovecot LDA rejects the message).

                            > For example user2 have full mailbox.
                            > If try user1@mydomain send mail to user2@mydomain then get mail "your mails
                            > to user2@mydomain can't be delivered". This mail is generate by dovecto if i
                            > use quota exceeded plugin.

                            This is wrong, Dovecot must reject the message, and then Postfix
                            sends a bounce.

                            For rewriting with internal-only domains see:

                            http://www.postfix.org/SOHO_README.html#fantasy

                            > If i dont rewrite envelope_sender by sender_canonical_maps everythings is
                            > fine, but if i use sender_canonical_maps, mail from dovecot is delivered to
                            > mymail@... instead user1@mydomain.

                            Your rewriting configuration is likely misguided. Don't use
                            sender_canonical_maps at all, it is rarely the right tool.

                            Use generic_maps as show in

                            http://www.postfix.org/SOHO_README.html#fantasy

                            if you deliver to internal domains via SMTP, use the relay transport
                            for that and set a custom value for "smtp_generic_maps" in master.cf
                            for either "relay" (setting it empty) or "smtp" (setting it to
                            suitable main.cf override).

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