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

header_checks issue

Expand Messages
  • Tom Lee
    Hello, I recieved one spamming email with the content type: Content-Type: image/gif; name= dome satyr editor wac europium ghoul lowell darius admittance
    Message 1 of 25 , Apr 4, 2006
    • 0 Attachment
      Hello,
      I recieved one spamming email with the content type:

      Content-Type: image/gif; name="dome satyr editor wac europium ghoul lowell
      darius admittance primacy biplane worn botanist purport bewail chinchilla
      atlanta caveat dense swampy lucid signet blizzard dead alveolus nigeria
      cortland prostrate clothesbrush virgo aversion pizzeria attribution
      important .gif"

      the attachment name is very long.
      I want to check if there is a way to block all emails with attachment name
      exceeds more than 64 characteres. it means that that only
      withine_66_characters*.gif or whatever will be allowed.

      thanks.

      Tom
    • mouss
      ... Try /^Content-Type:.* name= [^ ]{64}/ REJECT blah blah /^Content-Type:.* name=[^ ] S{80}/ REJECT blah blah
      Message 2 of 25 , Apr 4, 2006
      • 0 Attachment
        Tom Lee wrote:
        > Hello,
        > I recieved one spamming email with the content type:
        >
        > Content-Type: image/gif; name="dome satyr editor wac europium ghoul
        > lowell darius admittance primacy biplane worn botanist purport bewail
        > chinchilla atlanta caveat dense swampy lucid signet blizzard dead
        > alveolus nigeria cortland prostrate clothesbrush virgo aversion pizzeria
        > attribution important .gif"
        >
        > the attachment name is very long.
        > I want to check if there is a way to block all emails with attachment
        > name exceeds more than 64 characteres. it means that that only
        > withine_66_characters*.gif or whatever will be allowed.
        >

        Try

        /^Content-Type:.* name=\"[^\"]{64}/ REJECT blah blah
        /^Content-Type:.* name=[^\"]\S{80}/ REJECT blah blah
      • Magnus Bäck
        On Tuesday, April 04, 2006 at 21:55 CEST, ... Note that the {N} regular expression construct requires the lookup table to be pcre and not regexp. -- Magnus
        Message 3 of 25 , Apr 4, 2006
        • 0 Attachment
          On Tuesday, April 04, 2006 at 21:55 CEST,
          mouss <usebsd@...> wrote:

          > Tom Lee wrote:
          >
          > > I recieved one spamming email with the content type:
          > >
          > > Content-Type: image/gif; name="dome satyr editor wac europium ghoul
          > > lowell darius admittance primacy biplane worn botanist purport
          > > bewail chinchilla atlanta caveat dense swampy lucid signet blizzard
          > > dead alveolus nigeria cortland prostrate clothesbrush virgo aversion
          > > pizzeria attribution important .gif"
          > >
          > > the attachment name is very long.
          > > I want to check if there is a way to block all emails with
          > > attachment name exceeds more than 64 characteres. it means that that
          > > only withine_66_characters*.gif or whatever will be allowed.
          >
          > Try
          >
          > /^Content-Type:.* name=\"[^\"]{64}/ REJECT blah blah
          > /^Content-Type:.* name=[^\"]\S{80}/ REJECT blah blah

          Note that the {N} regular expression construct requires the lookup table
          to be pcre and not regexp.

          --
          Magnus Bäck
          magnus@...
        • Tom Lee
          ... my postfix doesn t support pcre. here is my header_checks
          Message 4 of 25 , Apr 4, 2006
          • 0 Attachment
            >From: Magnus B�ck <magnus@...>
            >Reply-To: postfix-users@...
            >To: postfix-users@...
            >Subject: Re: header_checks issue
            >Date: Tue, 4 Apr 2006 22:01:23 +0200
            >
            >On Tuesday, April 04, 2006 at 21:55 CEST,
            > mouss <usebsd@...> wrote:
            >
            > > Tom Lee wrote:
            > >
            > > > I recieved one spamming email with the content type:
            > > >
            > > > Content-Type: image/gif; name="dome satyr editor wac europium ghoul
            > > > lowell darius admittance primacy biplane worn botanist purport
            > > > bewail chinchilla atlanta caveat dense swampy lucid signet blizzard
            > > > dead alveolus nigeria cortland prostrate clothesbrush virgo aversion
            > > > pizzeria attribution important .gif"
            > > >
            > > > the attachment name is very long.
            > > > I want to check if there is a way to block all emails with
            > > > attachment name exceeds more than 64 characteres. it means that that
            > > > only withine_66_characters*.gif or whatever will be allowed.
            > >
            > > Try
            > >
            > > /^Content-Type:.* name=\"[^\"]{64}/ REJECT blah blah
            > > /^Content-Type:.* name=[^\"]\S{80}/ REJECT blah blah
            >
            >Note that the {N} regular expression construct requires the lookup table
            >to be pcre and not regexp.
            >

            my postfix doesn't support pcre.

            here is my header_checks
            /^content-(type|disposition):.*name[[:space:]]*=.*\.(exe|vbs|js|scr|pif|c[ho]m|bat|dll|lnk|asd|hlp|ocx|reg|cmd|vxd|pif|hta|jse?|sh[mbs]|ws[fh]|wmf)/
            REJECT Bad attachment file name extension: $2

            /^subject:/ WARN

            to use pcre, I need to convert the above to prce format and probably need to
            recompile postfix for pcre.

            is there a way to be done using regexp?

            Thanks.

            Tom



            >--
            >Magnus B�ck
            >magnus@...
          • mouss
            ... I don t use regexp, so I can t say for sure. but - some versions of grep support the {N} construct. others use {N } instead. - according to
            Message 5 of 25 , Apr 4, 2006
            • 0 Attachment
              Tom Lee wrote:
              >
              >
              >
              >> From: Magnus Bäck <magnus@...>
              >> Reply-To: postfix-users@...
              >> To: postfix-users@...
              >> Subject: Re: header_checks issue
              >> Date: Tue, 4 Apr 2006 22:01:23 +0200
              >>
              >> On Tuesday, April 04, 2006 at 21:55 CEST,
              >> mouss <usebsd@...> wrote:
              >>
              >> > Tom Lee wrote:
              >> >
              >> > > I recieved one spamming email with the content type:
              >> > >
              >> > > Content-Type: image/gif; name="dome satyr editor wac europium ghoul
              >> > > lowell darius admittance primacy biplane worn botanist purport
              >> > > bewail chinchilla atlanta caveat dense swampy lucid signet blizzard
              >> > > dead alveolus nigeria cortland prostrate clothesbrush virgo aversion
              >> > > pizzeria attribution important .gif"
              >> > >
              >> > > the attachment name is very long.
              >> > > I want to check if there is a way to block all emails with
              >> > > attachment name exceeds more than 64 characteres. it means that that
              >> > > only withine_66_characters*.gif or whatever will be allowed.
              >> >
              >> > Try
              >> >
              >> > /^Content-Type:.* name=\"[^\"]{64}/ REJECT blah blah
              >> > /^Content-Type:.* name=[^\"]\S{80}/ REJECT blah blah
              >>
              >> Note that the {N} regular expression construct requires the lookup table
              >> to be pcre and not regexp.
              >>
              >
              > my postfix doesn't support pcre.
              >
              > here is my header_checks
              > /^content-(type|disposition):.*name[[:space:]]*=.*\.(exe|vbs|js|scr|pif|c[ho]m|bat|dll|lnk|asd|hlp|ocx|reg|cmd|vxd|pif|hta|jse?|sh[mbs]|ws[fh]|wmf)/
              >
              > REJECT Bad attachment file name extension: $2
              >
              > /^subject:/ WARN
              >
              > to use pcre, I need to convert the above to prce format and probably
              > need to recompile postfix for pcre.
              >
              > is there a way to be done using regexp?
              >

              I don't use regexp, so I can't say for sure. but

              - some versions of grep support the {N} construct. others use "\{N\}"
              instead.

              - according to
              http://www.dc.turkuamk.fi/docs/gnu/rx/rx_3.html#SEC13

              {m,n} -- match the preceeding element at least m, and as many as n times.


              If you get that working, also replace \S by [^ ] (space char followed
              by TAB).
            • Tom Lee
              ... thanks for the link. I use the following regexp /^content-(type|disposition):.*name[[:space:]]*=.{64}/ REJECT Bad attachment with file name extension too
              Message 6 of 25 , Apr 4, 2006
              • 0 Attachment
                >>> > Try
                >>> >
                >>> > /^Content-Type:.* name=\"[^\"]{64}/ REJECT blah blah
                >>> > /^Content-Type:.* name=[^\"]\S{80}/ REJECT blah blah
                >>>
                >>>Note that the {N} regular expression construct requires the lookup table
                >>>to be pcre and not regexp.
                >>>
                >>
                >>my postfix doesn't support pcre.
                >>
                >>here is my header_checks
                >>/^content-(type|disposition):.*name[[:space:]]*=.*\.(exe|vbs|js|scr|pif|c[ho]m|bat|dll|lnk|asd|hlp|ocx|reg|cmd|vxd|pif|hta|jse?|sh[mbs]|ws[fh]|wmf)/
                >>
                >> REJECT Bad attachment file name extension: $2
                >>
                >>/^subject:/ WARN
                >>
                >>to use pcre, I need to convert the above to prce format and probably need
                >>to recompile postfix for pcre.
                >>
                >>is there a way to be done using regexp?
                >>
                >
                >I don't use regexp, so I can't say for sure. but
                >
                >- some versions of grep support the {N} construct. others use "\{N\}"
                >instead.
                >
                >- according to
                > http://www.dc.turkuamk.fi/docs/gnu/rx/rx_3.html#SEC13
                >
                >{m,n} -- match the preceeding element at least m, and as many as n times.
                >
                >
                >If you get that working, also replace \S by [^ ] (space char followed by
                >TAB).

                thanks for the link.

                I use the following regexp
                /^content-(type|disposition):.*name[[:space:]]*=.{64}/
                REJECT Bad attachment with file name extension too long

                it works fine. not sure why I need to care about \S, space, or tab, just
                treat it as one character
                with ".'?

                Tom.


                >
                >
                >
              • mouss
                ... Nothing dictates that name is the last mime parameter. so you will be rejecting ... name=filename param1=value param2=value2 if length(filename
                Message 7 of 25 , Apr 5, 2006
                • 0 Attachment
                  Tom Lee wrote:
                  > I use the following regexp
                  > /^content-(type|disposition):.*name[[:space:]]*=.{64}/
                  > REJECT Bad attachment with file name extension too long
                  >
                  > it works fine. not sure why I need to care about \S, space, or tab, just
                  > treat it as one character
                  > with ".'?
                  >

                  Nothing dictates that "name" is the last mime parameter. so you will be
                  rejecting
                  ... name=filename param1=value param2=value2
                  if
                  length(filename param1=value param2=value2) >= 64
                  instead of only counting the filename length. you may want to incrase
                  the limit to account for that.

                  Mime encoding will add some chars. example:
                  filename="=?iso-8859-1?Q?photos=from=conference.png?="
                  This adds 17 chars. If you also want to account for encoding of accented
                  chars and the like, this will add even more, but you can just decide for
                  an upper bound.
                • Deeztek.com Support
                  I m trying to accomplish the following: I m trying to filter e-mail based on the to: field using a regexp header_checks file as follows: /^To:
                  Message 8 of 25 , Feb 22, 2013
                  • 0 Attachment
                    I'm trying to accomplish the following:

                    I'm trying to filter e-mail based on the to: field using a regexp
                    header_checks file as follows:

                    /^To: someone@.../ FILTER smtp:192.xxx.xxx.xxx

                    I thought with the above expression it would take the e-mail and deliver
                    to the 192.xxx.xxx.xxx address via port 25. Instead looking at the logs,
                    postfix does an MX record lookup for the domain and of course it fails
                    and comes back that no MX record exits (since it doesn't exist). I could
                    simply add an MX record but the ultimate result is for me to be able to
                    route e-mail based on the to: field to several different servers. Is
                    this possible?

                    Thanks in advance
                  • Noel Jones
                    ... Mail uses envelope recipient(s) to determine routing, never the To: header. In postfix, use transport_maps to define the envelope recipient next-hop
                    Message 9 of 25 , Feb 22, 2013
                    • 0 Attachment
                      On 2/22/2013 12:39 PM, Deeztek.com Support wrote:
                      > I'm trying to accomplish the following:
                      >
                      > I'm trying to filter e-mail based on the to: field using a regexp
                      > header_checks file as follows:
                      >
                      > /^To: someone@.../ FILTER smtp:192.xxx.xxx.xxx
                      >
                      > I thought with the above expression it would take the e-mail and
                      > deliver to the 192.xxx.xxx.xxx address via port 25. Instead looking
                      > at the logs, postfix does an MX record lookup for the domain and of
                      > course it fails and comes back that no MX record exits (since it
                      > doesn't exist). I could simply add an MX record but

                      Mail uses envelope recipient(s) to determine routing, never the To:
                      header.

                      In postfix, use transport_maps to define the envelope recipient
                      next-hop destination.
                      http://www.postfix.org/postconf.5.html#transport_maps
                      http://www.postfix.org/transport.5.html


                      > the ultimate
                      > result is for me to be able to route e-mail based on the to: field
                      > to several different servers. Is this possible?

                      Please explain your use case in detail, or use transport_maps.



                      -- Noel Jones
                    • Deeztek.com Support
                      Sorry I guess I wasn t very clear. This is what i want to do: I want to be able to route e-mail send to bob@somedomain.com to 1.1.1.1 however, I also want to
                      Message 10 of 25 , Feb 22, 2013
                      • 0 Attachment
                        Sorry I guess I wasn't very clear. This is what i want to do:

                        I want to be able to route e-mail send to bob@... to 1.1.1.1
                        however, I also want to be able to route e-mail send to
                        mary@... to 2.2.2.2. I do normally use transports but in this
                        case, I need to be able to filter e-mail based on recipient to route to
                        different servers. I thought using header_checks would be my best choice
                        but i guess not. If i try to use tranports for this particular domain,
                        it seems like the tranports directive in postfix takes precedence over
                        the header_checks file. Hopefully this is more clear.

                        Thanks in advance



                        On 2/22/2013 2:01 PM, Noel Jones wrote:
                        > On 2/22/2013 12:39 PM, Deeztek.com Support wrote:
                        >> I'm trying to accomplish the following:
                        >>
                        >> I'm trying to filter e-mail based on the to: field using a regexp
                        >> header_checks file as follows:
                        >>
                        >> /^To: someone@.../ FILTER smtp:192.xxx.xxx.xxx
                        >>
                        >> I thought with the above expression it would take the e-mail and
                        >> deliver to the 192.xxx.xxx.xxx address via port 25. Instead looking
                        >> at the logs, postfix does an MX record lookup for the domain and of
                        >> course it fails and comes back that no MX record exits (since it
                        >> doesn't exist). I could simply add an MX record but
                        > Mail uses envelope recipient(s) to determine routing, never the To:
                        > header.
                        >
                        > In postfix, use transport_maps to define the envelope recipient
                        > next-hop destination.
                        > http://www.postfix.org/postconf.5.html#transport_maps
                        > http://www.postfix.org/transport.5.html
                        >
                        >
                        >> the ultimate
                        >> result is for me to be able to route e-mail based on the to: field
                        >> to several different servers. Is this possible?
                        > Please explain your use case in detail, or use transport_maps.
                        >
                        >
                        >
                        > -- Noel Jones


                        --
                      • Noel Jones
                        ... [please don t top-post] Header_check is the wrong tool. Use transport_maps. bob@example.com smtp:[1.1.1.1] mary@example.com smtp:[2.2.2.2] example.com
                        Message 11 of 25 , Feb 22, 2013
                        • 0 Attachment
                          On 2/22/2013 1:07 PM, Deeztek.com Support wrote:
                          > Sorry I guess I wasn't very clear. This is what i want to do:
                          >
                          > I want to be able to route e-mail send to bob@... to
                          > 1.1.1.1 however, I also want to be able to route e-mail send to
                          > mary@... to 2.2.2.2. I do normally use transports but in
                          > this case, I need to be able to filter e-mail based on recipient to
                          > route to different servers. I thought using header_checks would be
                          > my best choice but i guess not. If i try to use tranports for this
                          > particular domain, it seems like the tranports directive in postfix
                          > takes precedence over the header_checks file. Hopefully this is more
                          > clear.
                          >
                          > Thanks in advance
                          >


                          [please don't top-post]


                          Header_check is the wrong tool. Use transport_maps.

                          bob@... smtp:[1.1.1.1]
                          mary@... smtp:[2.2.2.2]
                          example.com smtp:somewhere.else

                          Note: when using an IP in transport_maps, the "[ ]" brackets are
                          required.




                          -- Noel Jones
                        • Deeztek.com Support
                          ... Sorry about the top-posting. Okay this is a little bit closer. So, I m assuming if I use the domain in conjuction with recipients for the same domain the
                          Message 12 of 25 , Feb 22, 2013
                          • 0 Attachment
                            On 2/22/2013 2:13 PM, Noel Jones wrote:
                            > On 2/22/2013 1:07 PM, Deeztek.com Support wrote:
                            >> Sorry I guess I wasn't very clear. This is what i want to do:
                            >>
                            >> I want to be able to route e-mail send to bob@... to
                            >> 1.1.1.1 however, I also want to be able to route e-mail send to
                            >> mary@... to 2.2.2.2. I do normally use transports but in
                            >> this case, I need to be able to filter e-mail based on recipient to
                            >> route to different servers. I thought using header_checks would be
                            >> my best choice but i guess not. If i try to use tranports for this
                            >> particular domain, it seems like the tranports directive in postfix
                            >> takes precedence over the header_checks file. Hopefully this is more
                            >> clear.
                            >>
                            >> Thanks in advance
                            >>
                            >
                            > [please don't top-post]
                            >
                            >
                            > Header_check is the wrong tool. Use transport_maps.
                            >
                            > bob@... smtp:[1.1.1.1]
                            > mary@... smtp:[2.2.2.2]
                            > example.com smtp:somewhere.else
                            >
                            > Note: when using an IP in transport_maps, the "[ ]" brackets are
                            > required.
                            >
                            >
                            >
                            >
                            > -- Noel Jones
                            Sorry about the top-posting. Okay this is a little bit closer. So, I'm
                            assuming if I use the domain in conjuction with recipients for the same
                            domain the transport line for the domain has to point somewhere
                            completely different than the recipient lines? In other words I can't
                            have the following?

                            bob@... smtp:[1.1.1.1]
                            mary@... smtp:[2.2.2.2]
                            example.com smtp:[1.1.1.1]



                            --
                          • Viktor Dukhovni
                            ... You can, but the bob entry is redundant. I don t recommend per-mailbox transport entries at all, it is best to stick to per-domain transport entries only,
                            Message 13 of 25 , Feb 22, 2013
                            • 0 Attachment
                              On Fri, Feb 22, 2013 at 03:13:27PM -0500, Deeztek.com Support wrote:

                              > >bob@... smtp:[1.1.1.1]
                              > >mary@... smtp:[2.2.2.2]
                              > >example.com smtp:somewhere.else
                              >
                              > Sorry about the top-posting. Okay this is a little bit closer. So,
                              > I'm assuming if I use the domain in conjuction with recipients for
                              > the same domain the transport line for the domain has to point
                              > somewhere completely different than the recipient lines? In other
                              > words I can't have the following?
                              >
                              > bob@... smtp:[1.1.1.1]
                              > mary@... smtp:[2.2.2.2]
                              > example.com smtp:[1.1.1.1]

                              You can, but the bob entry is redundant. I don't recommend per-mailbox
                              transport entries at all, it is best to stick to per-domain transport
                              entries only, and handle per-user routing via virtual(5) alias rewriting.

                              --
                              Viktor.
                            • Deeztek.com Support
                              On February 22, 2013 3:40:22 PM Viktor Dukhovni ... I am afraid i am not following. I thought virtual alias allowed only for forwarding mail to recipients such
                              Message 14 of 25 , Feb 22, 2013
                              • 0 Attachment
                                On February 22, 2013 3:40:22 PM Viktor Dukhovni
                                <postfix-users@...> wrote:
                                > On Fri, Feb 22, 2013 at 03:13:27PM -0500, Deeztek.com Support wrote:
                                >
                                > > >bob@... smtp:[1.1.1.1]
                                > > >mary@... smtp:[2.2.2.2]
                                > > >example.com smtp:somewhere.else
                                > >
                                > > Sorry about the top-posting. Okay this is a little bit closer. So,
                                > > I'm assuming if I use the domain in conjuction with recipients for
                                > > the same domain the transport line for the domain has to point
                                > > somewhere completely different than the recipient lines? In other
                                > > words I can't have the following?
                                > >
                                > > bob@... smtp:[1.1.1.1]
                                > > mary@... smtp:[2.2.2.2]
                                > > example.com smtp:[1.1.1.1]
                                >
                                > You can, but the bob entry is redundant. I don't recommend per-mailbox
                                > transport entries at all, it is best to stick to per-domain transport
                                > entries only, and handle per-user routing via virtual(5) alias rewriting.
                                >
                                > --
                                > Viktor.

                                I am afraid i am not following. I thought virtual alias allowed only
                                for forwarding mail to recipients such as bob@... to
                                larry@....

                                Thanks


                                Sent with AquaMail for Android
                                http://www.aqua-mail.com
                              • Wietse Venema
                                ... Typically this would be done with virtual aliases that send bob@example.com to bob@server-for-bob.example.com Wietse
                                Message 15 of 25 , Feb 22, 2013
                                • 0 Attachment
                                  Deeztek.com Support:
                                  > On February 22, 2013 3:40:22 PM Viktor Dukhovni
                                  > <postfix-users@...> wrote:
                                  > > On Fri, Feb 22, 2013 at 03:13:27PM -0500, Deeztek.com Support wrote:
                                  > >
                                  > > > >bob@... smtp:[1.1.1.1]
                                  > > > >mary@... smtp:[2.2.2.2]
                                  > > > >example.com smtp:somewhere.else
                                  > > >
                                  > > > Sorry about the top-posting. Okay this is a little bit closer. So,
                                  > > > I'm assuming if I use the domain in conjuction with recipients for
                                  > > > the same domain the transport line for the domain has to point
                                  > > > somewhere completely different than the recipient lines? In other
                                  > > > words I can't have the following?
                                  > > >
                                  > > > bob@... smtp:[1.1.1.1]
                                  > > > mary@... smtp:[2.2.2.2]
                                  > > > example.com smtp:[1.1.1.1]
                                  > >
                                  > > You can, but the bob entry is redundant. I don't recommend per-mailbox
                                  > > transport entries at all, it is best to stick to per-domain transport
                                  > > entries only, and handle per-user routing via virtual(5) alias rewriting.

                                  Typically this would be done with virtual aliases that send
                                  bob@... to bob@...

                                  Wietse
                                • Deeztek.com Support
                                  ... I cannot seem to find any reference to the format you have suggested above for the aliases file. I tried it as bob@exaple.com to
                                  Message 16 of 25 , Feb 24, 2013
                                  • 0 Attachment
                                    On 2/22/2013 4:13 PM, Wietse Venema wrote:
                                    > Deeztek.com Support:
                                    >> On February 22, 2013 3:40:22 PM Viktor Dukhovni
                                    >> <postfix-users@...> wrote:
                                    >>> On Fri, Feb 22, 2013 at 03:13:27PM -0500, Deeztek.com Support wrote:
                                    >>>
                                    >>>>> bob@... smtp:[1.1.1.1]
                                    >>>>> mary@... smtp:[2.2.2.2]
                                    >>>>> example.com smtp:somewhere.else
                                    >>>> Sorry about the top-posting. Okay this is a little bit closer. So,
                                    >>>> I'm assuming if I use the domain in conjuction with recipients for
                                    >>>> the same domain the transport line for the domain has to point
                                    >>>> somewhere completely different than the recipient lines? In other
                                    >>>> words I can't have the following?
                                    >>>>
                                    >>>> bob@... smtp:[1.1.1.1]
                                    >>>> mary@... smtp:[2.2.2.2]
                                    >>>> example.com smtp:[1.1.1.1]
                                    >>> You can, but the bob entry is redundant. I don't recommend per-mailbox
                                    >>> transport entries at all, it is best to stick to per-domain transport
                                    >>> entries only, and handle per-user routing via virtual(5) alias rewriting.
                                    > Typically this would be done with virtual aliases that send
                                    > bob@... to bob@...
                                    >
                                    > Wietse
                                    I cannot seem to find any reference to the format you have suggested
                                    above for the aliases file. I tried it as

                                    bob@... to bob@1.1.1.1-for-bob.example.com with no luck. Any
                                    suggestions?

                                    Thanks


                                    --
                                  • Robert Schetterer
                                    ... bob@example.com smtp:[1.1.1.1] should be in transport , not aliases I tried it as ... Best Regards MfG Robert Schetterer -- [*] sys4 AG http://sys4.de,
                                    Message 17 of 25 , Feb 24, 2013
                                    • 0 Attachment
                                      Am 24.02.2013 12:28, schrieb Deeztek.com Support:
                                      > On 2/22/2013 4:13 PM, Wietse Venema wrote:
                                      >> Deeztek.com Support:
                                      >>> On February 22, 2013 3:40:22 PM Viktor Dukhovni
                                      >>> <postfix-users@...> wrote:
                                      >>>> On Fri, Feb 22, 2013 at 03:13:27PM -0500, Deeztek.com Support wrote:
                                      >>>>
                                      >>>>>> bob@... smtp:[1.1.1.1]
                                      >>>>>> mary@... smtp:[2.2.2.2]
                                      >>>>>> example.com smtp:somewhere.else
                                      >>>>> Sorry about the top-posting. Okay this is a little bit closer. So,
                                      >>>>> I'm assuming if I use the domain in conjuction with recipients for
                                      >>>>> the same domain the transport line for the domain has to point
                                      >>>>> somewhere completely different than the recipient lines? In other
                                      >>>>> words I can't have the following?
                                      >>>>>
                                      >>>>> bob@... smtp:[1.1.1.1]
                                      >>>>> mary@... smtp:[2.2.2.2]
                                      >>>>> example.com smtp:[1.1.1.1]
                                      >>>> You can, but the bob entry is redundant. I don't recommend per-mailbox
                                      >>>> transport entries at all, it is best to stick to per-domain transport
                                      >>>> entries only, and handle per-user routing via virtual(5) alias
                                      >>>> rewriting.
                                      >> Typically this would be done with virtual aliases that send
                                      >> bob@... to bob@...
                                      >>
                                      >> Wietse
                                      > I cannot seem to find any reference to the format you have suggested
                                      > above for the aliases file.

                                      bob@... smtp:[1.1.1.1]

                                      should be in transport , not aliases

                                      I tried it as
                                      >
                                      > bob@... to bob@1.1.1.1-for-bob.example.com with no luck. Any
                                      > suggestions?
                                      >
                                      > Thanks
                                      >
                                      >



                                      Best Regards
                                      MfG Robert Schetterer

                                      --
                                      [*] sys4 AG

                                      http://sys4.de, +49 (89) 30 90 46 64
                                      Franziskanerstraße 15, 81669 München

                                      Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
                                      Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
                                      Aufsichtsratsvorsitzender: Joerg Heidrich
                                    • Deeztek.com Support
                                      ... I realize that and it works when I put: bob@example.com smtp:[1.1.1.1] in transport. However, according to Victor ...it is best to stick to per-domain
                                      Message 18 of 25 , Feb 24, 2013
                                      • 0 Attachment
                                        On 2/24/2013 6:39 AM, Robert Schetterer wrote:
                                        > Am 24.02.2013 12:28, schrieb Deeztek.com Support:
                                        >> On 2/22/2013 4:13 PM, Wietse Venema wrote:
                                        >>> Deeztek.com Support:
                                        >>>> On February 22, 2013 3:40:22 PM Viktor Dukhovni
                                        >>>> <postfix-users@...> wrote:
                                        >>>>> On Fri, Feb 22, 2013 at 03:13:27PM -0500, Deeztek.com Support wrote:
                                        >>>>>
                                        >>>>>>> bob@... smtp:[1.1.1.1]
                                        >>>>>>> mary@... smtp:[2.2.2.2]
                                        >>>>>>> example.com smtp:somewhere.else
                                        >>>>>> Sorry about the top-posting. Okay this is a little bit closer. So,
                                        >>>>>> I'm assuming if I use the domain in conjuction with recipients for
                                        >>>>>> the same domain the transport line for the domain has to point
                                        >>>>>> somewhere completely different than the recipient lines? In other
                                        >>>>>> words I can't have the following?
                                        >>>>>>
                                        >>>>>> bob@... smtp:[1.1.1.1]
                                        >>>>>> mary@... smtp:[2.2.2.2]
                                        >>>>>> example.com smtp:[1.1.1.1]
                                        >>>>> You can, but the bob entry is redundant. I don't recommend per-mailbox
                                        >>>>> transport entries at all, it is best to stick to per-domain transport
                                        >>>>> entries only, and handle per-user routing via virtual(5) alias
                                        >>>>> rewriting.
                                        >>> Typically this would be done with virtual aliases that send
                                        >>> bob@... to bob@...
                                        >>>
                                        >>> Wietse
                                        >> I cannot seem to find any reference to the format you have suggested
                                        >> above for the aliases file.
                                        > bob@... smtp:[1.1.1.1]
                                        >
                                        > should be in transport , not aliases
                                        >
                                        > I tried it as
                                        >> bob@... to bob@1.1.1.1-for-bob.example.com with no luck. Any
                                        >> suggestions?
                                        >>
                                        >> Thanks
                                        >>
                                        >>
                                        >
                                        >
                                        > Best Regards
                                        > MfG Robert Schetterer
                                        >
                                        I realize that and it works when I put:

                                        bob@... smtp:[1.1.1.1]

                                        in transport. However, according to Victor "...it is best to stick to
                                        per-domain transport entries only, and handle per-user routing via
                                        virtual(5) alias rewriting." Then Wietse said I should enter something like

                                        bob@... to bob@...

                                        in the aliases but I can't seem to get that to work neither do I find a
                                        reference for such an entry in docs or google.
                                      • Wietse Venema
                                        ... /etc/postfix/main.cf: virtual_alias_maps = hash:/etc/postfix/virtual /etc/postfix/virtual: bob@example.com bob@server-for-bob.example.com For example
                                        Message 19 of 25 , Feb 24, 2013
                                        • 0 Attachment
                                          Someone:
                                          > You can, but the bob entry is redundant. I don't recommend per-mailbox
                                          > transport entries at all, it is best to stick to per-domain transport
                                          > entries only, and handle per-user routing via virtual(5) alias rewriting.

                                          Wietse:
                                          > Typically this would be done with virtual aliases that send
                                          > bob@... to bob@...

                                          Deeztek.com Support:
                                          > I cannot seem to find any reference to the format you have suggested
                                          > above for the aliases file. I tried it as

                                          /etc/postfix/main.cf:
                                          virtual_alias_maps = hash:/etc/postfix/virtual

                                          /etc/postfix/virtual:
                                          bob@... bob@...

                                          For example bob@[1.1.1.1]

                                          Wietse
                                        • Deeztek.com Support
                                          ... I tried it in the /etc/postfix/virtual file also with no success before I sent out the previous e-mail. So there is no confusion. I have one domain let s
                                          Message 20 of 25 , Feb 24, 2013
                                          • 0 Attachment
                                            On 2/24/2013 8:19 AM, Wietse Venema wrote:
                                            > Someone:
                                            >> You can, but the bob entry is redundant. I don't recommend per-mailbox
                                            >> transport entries at all, it is best to stick to per-domain transport
                                            >> entries only, and handle per-user routing via virtual(5) alias rewriting.
                                            > Wietse:
                                            >> Typically this would be done with virtual aliases that send
                                            >> bob@... to bob@...
                                            > Deeztek.com Support:
                                            >> I cannot seem to find any reference to the format you have suggested
                                            >> above for the aliases file. I tried it as
                                            > /etc/postfix/main.cf:
                                            > virtual_alias_maps = hash:/etc/postfix/virtual
                                            >
                                            > /etc/postfix/virtual:
                                            > bob@... bob@...
                                            >
                                            > For example bob@[1.1.1.1]
                                            >
                                            > Wietse
                                            I tried it in the /etc/postfix/virtual file also with no success before
                                            I sent out the previous e-mail.

                                            So there is no confusion. I have one domain let's call it mydomain.com.
                                            I have 3 servers. One is the relay server that intercepts all incoming
                                            mail and filters out spam etc and the other two are mail servers located
                                            at 1.1.1.1 and 2.2.2.2 which are the ultimate destination after the
                                            relay server processes the e-mail.

                                            I have the following entry in /etc/postfix/transports for the domain in
                                            the relay server:

                                            mydomain.com smtp:[1.1.1.1]

                                            Most of the e-mail for that domain is of course relaying to the 1.1.1.1
                                            server. However, there are some e-mail addresses on that domain that I
                                            want to make an exception for and I need to relay the e-mail to 2.2.2.2
                                            instead of 1.1.1.1. So, if we had a user called joe@... that
                                            instead of relaying to 1.1.1.1 like normal, how would I input that entry
                                            in etc/postfix/virtual to instead relay to the 2.2.2.2 server?

                                            thanks in advance



                                            --
                                          • Wietse Venema
                                            Deeztek.com Support: [ Charset ISO-8859-1 unsupported, converting... ] ... /etc/postfix/main.cf: virtual_alias_maps = hash:/etc/postfix/virtual
                                            Message 21 of 25 , Feb 24, 2013
                                            • 0 Attachment
                                              Deeztek.com Support:
                                              [ Charset ISO-8859-1 unsupported, converting... ]
                                              > On 2/24/2013 8:19 AM, Wietse Venema wrote:
                                              > > Someone:
                                              > >> You can, but the bob entry is redundant. I don't recommend per-mailbox
                                              > >> transport entries at all, it is best to stick to per-domain transport
                                              > >> entries only, and handle per-user routing via virtual(5) alias rewriting.
                                              > > Wietse:
                                              > >> Typically this would be done with virtual aliases that send
                                              > >> bob@... to bob@...
                                              > > Deeztek.com Support:
                                              > >> I cannot seem to find any reference to the format you have suggested
                                              > >> above for the aliases file. I tried it as
                                              > > /etc/postfix/main.cf:
                                              > > virtual_alias_maps = hash:/etc/postfix/virtual
                                              > >
                                              > > /etc/postfix/virtual:
                                              > > bob@... bob@...
                                              > >
                                              > > For example bob@[1.1.1.1]
                                              > >
                                              > > Wietse
                                              > I tried it in the /etc/postfix/virtual file also with no success before
                                              > I sent out the previous e-mail.
                                              >
                                              > So there is no confusion. I have one domain let's call it mydomain.com.
                                              > I have 3 servers. One is the relay server that intercepts all incoming
                                              > mail and filters out spam etc and the other two are mail servers located
                                              > at 1.1.1.1 and 2.2.2.2 which are the ultimate destination after the
                                              > relay server processes the e-mail.
                                              >
                                              > I have the following entry in /etc/postfix/transports for the domain in
                                              > the relay server:
                                              >
                                              > mydomain.com smtp:[1.1.1.1]
                                              >
                                              > Most of the e-mail for that domain is of course relaying to the 1.1.1.1
                                              > server. However, there are some e-mail addresses on that domain that I
                                              > want to make an exception for and I need to relay the e-mail to 2.2.2.2
                                              > instead of 1.1.1.1. So, if we had a user called joe@... that
                                              > instead of relaying to 1.1.1.1 like normal, how would I input that entry
                                              > in etc/postfix/virtual to instead relay to the 2.2.2.2 server?


                                              /etc/postfix/main.cf:
                                              virtual_alias_maps = hash:/etc/postfix/virtual

                                              /etc/postfix/virtual:
                                              joe@... joe@[2.2.2.2]

                                              Wietse
                                              > >
                                            • Deeztek.com Support
                                              ... Not working. The relay server completely ignores the virtual entry and instead uses the transport relaying to the 1.1.1.1 server which of course gives me
                                              Message 22 of 25 , Feb 24, 2013
                                              • 0 Attachment
                                                On 2/24/2013 9:07 AM, Wietse Venema wrote:
                                                > Deeztek.com Support:
                                                > [ Charset ISO-8859-1 unsupported, converting... ]
                                                >> On 2/24/2013 8:19 AM, Wietse Venema wrote:
                                                >>> Someone:
                                                >>>> You can, but the bob entry is redundant. I don't recommend per-mailbox
                                                >>>> transport entries at all, it is best to stick to per-domain transport
                                                >>>> entries only, and handle per-user routing via virtual(5) alias rewriting.
                                                >>> Wietse:
                                                >>>> Typically this would be done with virtual aliases that send
                                                >>>> bob@... to bob@...
                                                >>> Deeztek.com Support:
                                                >>>> I cannot seem to find any reference to the format you have suggested
                                                >>>> above for the aliases file. I tried it as
                                                >>> /etc/postfix/main.cf:
                                                >>> virtual_alias_maps = hash:/etc/postfix/virtual
                                                >>>
                                                >>> /etc/postfix/virtual:
                                                >>> bob@... bob@...
                                                >>>
                                                >>> For example bob@[1.1.1.1]
                                                >>>
                                                >>> Wietse
                                                >> I tried it in the /etc/postfix/virtual file also with no success before
                                                >> I sent out the previous e-mail.
                                                >>
                                                >> So there is no confusion. I have one domain let's call it mydomain.com.
                                                >> I have 3 servers. One is the relay server that intercepts all incoming
                                                >> mail and filters out spam etc and the other two are mail servers located
                                                >> at 1.1.1.1 and 2.2.2.2 which are the ultimate destination after the
                                                >> relay server processes the e-mail.
                                                >>
                                                >> I have the following entry in /etc/postfix/transports for the domain in
                                                >> the relay server:
                                                >>
                                                >> mydomain.com smtp:[1.1.1.1]
                                                >>
                                                >> Most of the e-mail for that domain is of course relaying to the 1.1.1.1
                                                >> server. However, there are some e-mail addresses on that domain that I
                                                >> want to make an exception for and I need to relay the e-mail to 2.2.2.2
                                                >> instead of 1.1.1.1. So, if we had a user called joe@... that
                                                >> instead of relaying to 1.1.1.1 like normal, how would I input that entry
                                                >> in etc/postfix/virtual to instead relay to the 2.2.2.2 server?
                                                >
                                                > /etc/postfix/main.cf:
                                                > virtual_alias_maps = hash:/etc/postfix/virtual
                                                >
                                                > /etc/postfix/virtual:
                                                > joe@... joe@[2.2.2.2]
                                                >
                                                > Wietse
                                                Not working. The relay server completely ignores the virtual entry and
                                                instead uses the transport relaying to the 1.1.1.1 server which of
                                                course gives me the Recipient address rejected: User unknown in virtual
                                                mailbox table error since the user doesn't exist on that server.
                                                Additionally, there is no joe at the 2.2.2.2 server. There is
                                                joe@... on 2.2.2.2 but not simply joe. Not sure if that makes a
                                                difference as far as the virtual entry is concerned.

                                                thanks


                                                --
                                              • Wietse Venema
                                                ... Then you made a mistake. Please double check what you do. $ postmap -q joe@example.com /etc/postfix/virtual Wietse
                                                Message 23 of 25 , Feb 24, 2013
                                                • 0 Attachment
                                                  Deeztek.com Support:
                                                  > >> Most of the e-mail for that domain is of course relaying to the 1.1.1.1
                                                  > >> server. However, there are some e-mail addresses on that domain that I
                                                  > >> want to make an exception for and I need to relay the e-mail to 2.2.2.2
                                                  > >> instead of 1.1.1.1. So, if we had a user called joe@... that
                                                  > >> instead of relaying to 1.1.1.1 like normal, how would I input that entry
                                                  > >> in etc/postfix/virtual to instead relay to the 2.2.2.2 server?
                                                  > >
                                                  > > /etc/postfix/main.cf:
                                                  > > virtual_alias_maps = hash:/etc/postfix/virtual
                                                  > >
                                                  > > /etc/postfix/virtual:
                                                  > > joe@... joe@[2.2.2.2]
                                                  > >
                                                  > > Wietse
                                                  > Not working. The relay server completely ignores the virtual entry and
                                                  > instead uses the transport relaying to the 1.1.1.1 server which of

                                                  Then you made a mistake. Please double check what you do.

                                                  $ postmap -q joe@... /etc/postfix/virtual

                                                  Wietse
                                                • Deeztek.com Support
                                                  ... this is the error I m getting from the logs: Feb 24 10:30:30 smtp postfix/smtp[6526]: 8A79342089: to= , orig_to= ,
                                                  Message 24 of 25 , Feb 24, 2013
                                                  • 0 Attachment
                                                    On 2/24/2013 10:19 AM, Wietse Venema wrote:
                                                    > Deeztek.com Support:
                                                    >>>> Most of the e-mail for that domain is of course relaying to the 1.1.1.1
                                                    >>>> server. However, there are some e-mail addresses on that domain that I
                                                    >>>> want to make an exception for and I need to relay the e-mail to 2.2.2.2
                                                    >>>> instead of 1.1.1.1. So, if we had a user called joe@... that
                                                    >>>> instead of relaying to 1.1.1.1 like normal, how would I input that entry
                                                    >>>> in etc/postfix/virtual to instead relay to the 2.2.2.2 server?
                                                    >>> /etc/postfix/main.cf:
                                                    >>> virtual_alias_maps = hash:/etc/postfix/virtual
                                                    >>>
                                                    >>> /etc/postfix/virtual:
                                                    >>> joe@... joe@[2.2.2.2]
                                                    >>>
                                                    >>> Wietse
                                                    >> Not working. The relay server completely ignores the virtual entry and
                                                    >> instead uses the transport relaying to the 1.1.1.1 server which of
                                                    > Then you made a mistake. Please double check what you do.
                                                    >
                                                    > $ postmap -q joe@... /etc/postfix/virtual
                                                    >
                                                    > Wietse
                                                    this is the error I'm getting from the logs:

                                                    Feb 24 10:30:30 smtp postfix/smtp[6526]: 8A79342089: to=<joe@[2.2.2.2]>,
                                                    orig_to=<joe@...>, relay=2.2.2.2[2.2.2.2]:25, delay=5.3,
                                                    delays=0.17/0/0.03/5, dsn=5.1.3, status=bounced (host 2.2.2.2[2.2.2.2]
                                                    said: 501 5.1.3 Invalid address (in reply to RCPT TO command))





                                                    --
                                                  • Wietse Venema
                                                    ... The machine does not implement RFC 5321. I can t fix that for you. Wietse
                                                    Message 25 of 25 , Feb 24, 2013
                                                    • 0 Attachment
                                                      Deeztek.com Support:
                                                      > On 2/24/2013 10:19 AM, Wietse Venema wrote:
                                                      > > Deeztek.com Support:
                                                      > >>>> Most of the e-mail for that domain is of course relaying to the 1.1.1.1
                                                      > >>>> server. However, there are some e-mail addresses on that domain that I
                                                      > >>>> want to make an exception for and I need to relay the e-mail to 2.2.2.2
                                                      > >>>> instead of 1.1.1.1. So, if we had a user called joe@... that
                                                      > >>>> instead of relaying to 1.1.1.1 like normal, how would I input that entry
                                                      > >>>> in etc/postfix/virtual to instead relay to the 2.2.2.2 server?
                                                      > >>> /etc/postfix/main.cf:
                                                      > >>> virtual_alias_maps = hash:/etc/postfix/virtual
                                                      > >>>
                                                      > >>> /etc/postfix/virtual:
                                                      > >>> joe@... joe@[2.2.2.2]
                                                      > >>>
                                                      > >>> Wietse
                                                      > >> Not working. The relay server completely ignores the virtual entry and
                                                      > >> instead uses the transport relaying to the 1.1.1.1 server which of
                                                      > > Then you made a mistake. Please double check what you do.
                                                      > >
                                                      > > $ postmap -q joe@... /etc/postfix/virtual
                                                      > >
                                                      > > Wietse
                                                      > this is the error I'm getting from the logs:
                                                      >
                                                      > Feb 24 10:30:30 smtp postfix/smtp[6526]: 8A79342089: to=<joe@[2.2.2.2]>,
                                                      > orig_to=<joe@...>, relay=2.2.2.2[2.2.2.2]:25, delay=5.3,
                                                      > delays=0.17/0/0.03/5, dsn=5.1.3, status=bounced (host 2.2.2.2[2.2.2.2]
                                                      > said: 501 5.1.3 Invalid address (in reply to RCPT TO command))

                                                      The machine does not implement RFC 5321. I can't fix that for you.

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