I don't think advanced blacklisting is available currently in kannel.

You need to implement this in your frontend.

Kannel is a basic backend which just sends everything out.

2012/10/16 shaded 4 <[email protected]>

> Hi, I've been using kannel for a long time and am quite comfortable with
> it, but I haven't used
> blacklisting before now and can't seem to find answers for the following.
> I'm using kannel 1.5.0.
>
> There are a LOT of different instances of 'black-list-regex' mentioned in
> the
> kannel user guide, but I'm having trouble figuring out the
> differences/purpose of each one.
> I'm trying to block spam messages both TO and FROM customers which
> originate from one source number,
> but can't quite get it working.
>
> 1) Blocking messages TO customers.
> If a spammer is sending out a large volume of messages (i.e. one source
> number sending out messages to lots of different destination numbers),
> is it possible to black-list them in kannel?
>
> I have managed to block messages from being sent to specified
> *destination* numbers, with the following config
>     group = smsbox
>     black-list-regex = ....
> but that doesn't help much here because there are too many destination
> numbers.
> Is it possible to similarly block certain *source* (sender) numbers? Do
> you know what I mean?
> i.e. I'm trying to block all messages being sent which have a specific
> source/from/sender number.
>
>
> 2) Blocking messages FROM customers.
> The other case is to block a large volume of messages coming FROM a
> customer handset (e.g. a customer's handset sending constant messages to a
> short code.
>
> My understanding is that the following is meant to work:
>     group = core
>     black-list-regex = 0401111111
> However, this seems to blocks ALL incoming messages! I can't figure out
> why.
> The bearerbox access log shows the following rejection, no matter what the
> incoming number is:
>     REJECTED - black-regex-listed SMS [SMSC:xxxx] [SVC:] [ACT:xxxx]
> [BINF:] [FID:] [META:?smpp?] [from:+614xxxxxxxx] [to:xxxxx]
> [flags:-1:0:-1:0:-1] [msg:5:xxxx] [udh:0:]
> And the kannel log for that SMSC shows the following message, and kannel
> returns a non-zero value in the deliver_sm_resp section.
>     INFO: Number <+614xxxxxxxx> is not in black-list, message discarded
>
> I've also tried variations like the following, with the same effect.
> The following kind of regular expressions definitely work for me in 1)
> above, but for some reason don't work here:
>     -   black-list-regex = (0|61)401111111
>     -   black-list-regex = ^(0|61)(400111222|401111111)$
>
> Here is my kannel configuration, with the various black-list-regex
> attempts commented out:
> ------------------------------------------------------------------
> group = core
> admin-port = xxxx
> smsbox-port = xxxx
> wapbox-port = xxxx
> admin-password = xxxx
> log-file = "xxxx"
> log-level = 0
> box-deny-ip = "*.*.*.*"
> box-allow-ip = "127.0.0.1"
> access-log = "xxxx"
> store-file = "xxxx"
> #black-list-regex = 0401111111
> #black-list-regex = (0|61)401111111
> #black-list-regex = ^(0|61)(400111222|401111111)$
>
> group = smsbox
> bearerbox-host = localhost
> sendsms-port = xxxx
> log-file = "xxxx"
> log-level = 0
> access-log = "xxxx"
> http-request-retry = 0
> reply-couldnotfetch = "xxxx"
> reply-couldnotrepresent = "xxxx"
> reply-requestfailed = "xxxx"
> reply-emptymessage = "xxxx"
>     # As mentioned in my notes above, either of these two DO work for me,
>     # but it's not what I need.
> #black-list-regex = (0|61)401111111
> #black-list-regex = ^(0|61)(400111222|401111111)$
>
> group = wapbox
> bearerbox-host = localhost
> log-file = "xxxx"
> log-level = 0
> syslog-level = none
>
> group = sendsms-user
> username = xxxx
> password = xxxx
> max-messages = xxxx
> concatenation = true
>
> # The receiver service.
> group = sms-service
> keyword = default
> post-xml = "xxxx"
> send-sender = true
> catch-all = true
> omit-empty = true
>
> # There are then a lot of smsc configurations.
> # Here is the one I was testing with:
> group = smsc
> smsc = smpp
> smsc-id = xxxx
> host = xxxx
> receive-port = xxxx
> smsc-username = xxxx
> smsc-password = xxxx
> system-type = smpp
> address-range = ""
> keepalive = 0
> log-file = "xxxx"
> log-level = 0
> msg-id-type = 0x01
> throughput = 25
> alt-charset = ASCII
> source-addr-ton = 0
> source-addr-npi = 4
> dest-addr-ton = 1
> dest-addr-npi = 1
> ------------------------------------------------------------------
>
>

Reply via email to