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

problem blocking sender_address

Expand Messages
  • Tom Kinghorn
    Good afternoon list. I apologise for this post. I am new to postfix and battling to block a sender who keeps changing digits in the sending address. I would
    Message 1 of 4 , Oct 4, 2010
    • 0 Attachment
      Good afternoon list.

      I apologise for this post.

      I am new to postfix and battling to block a sender who keeps changing
      digits in the sending address.

      I would like to block the sender using the regex
      westcoast[0-9]{3}@... (to block sender address of
      westcoast269@... etc..).

      However, adding it to the smtpd_sender_restrictions is not working

      config looks like:

      smtpd_sender_restrictions =
      <snip>
      check_sender_access
      regexp:/etc/postfix/sender_access_blacklist_regexp,
      </snip>


      sender_access_blacklist_regexp contains:

      #discard westcoast spammer
      westcoast[0-9]{3}@... DISCARD

      Once again

      Apologies for the post.

      Tom
    • Ralf Hildebrandt
      ... Hey, let s read your post first and decide later if you need to apologize :) ... Yep. /^westcoast[0-9]{3}@gmail .com$/ REJECT ...
      Message 2 of 4 , Oct 4, 2010
      • 0 Attachment
        * Tom Kinghorn <thomas.kinghorn@...>:
        > Good afternoon list.
        >
        > I apologise for this post.

        Hey, let's read your post first and decide later if you need to
        apologize :)

        > I am new to postfix and battling to block a sender who keeps changing
        > digits in the sending address.

        This sounds like a job for regex: or PCRE:

        > I would like to block the sender using the regex
        > westcoast[0-9]{3}@... (to block sender address of
        > westcoast269@... etc..).

        Yep.

        /^westcoast[0-9]{3}@gmail\.com$/ REJECT

        > However, adding it to the smtpd_sender_restrictions is not working
        >
        > config looks like:
        >
        > smtpd_sender_restrictions =
        > <snip>
        > check_sender_access regexp:/etc/postfix/sender_access_blacklist_regexp,
        > </snip>
        >
        >
        > sender_access_blacklist_regexp contains:
        >
        > #discard westcoast spammer
        > westcoast[0-9]{3}@... DISCARD

        /^westcoast[0-9]{3}@gmail\.com$/ DISCARD
        or
        /^westcoast[0-9]{3}@gmail\.com$/ REJECT

        You're lacking the //

        --
        Ralf Hildebrandt
        Geschäftsbereich IT | Abteilung Netzwerk
        Charité - Universitätsmedizin Berlin
        Campus Benjamin Franklin
        Hindenburgdamm 30 | D-12203 Berlin
        Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
        ralf.hildebrandt@... | http://www.charite.de
      • Tom Kinghorn
        ... works 100%. Thats 1 slap for me for missing the // s Thank you very much for the help. regards Tom
        Message 3 of 4 , Oct 4, 2010
        • 0 Attachment
          On 2010/10/04 02:11 PM, Ralf Hildebrandt wrote:
          > However, adding it to the smtpd_sender_restrictions is not working
          > /^westcoast[0-9]{3}@gmail\.com$/ DISCARD
          > or
          > /^westcoast[0-9]{3}@gmail\.com$/ REJECT
          >
          > You're lacking the //
          >
          works 100%.

          Thats 1 slap for me for missing the //'s

          Thank you very much for the help.

          regards

          Tom
        • Ralf Hildebrandt
          ... Well, at least you got the rest of the syntax right. ... -- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin
          Message 4 of 4 , Oct 4, 2010
          • 0 Attachment
            * Tom Kinghorn <thomas.kinghorn@...>:

            > Thats 1 slap for me for missing the //'s
            Well, at least you got the rest of the syntax right.
            :)


            --
            Ralf Hildebrandt
            Geschäftsbereich IT | Abteilung Netzwerk
            Charité - Universitätsmedizin Berlin
            Campus Benjamin Franklin
            Hindenburgdamm 30 | D-12203 Berlin
            Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
            ralf.hildebrandt@... | http://www.charite.de
          Your message has been successfully submitted and would be delivered to recipients shortly.