Module: sip-router
Branch: master
Commit: 8b445f464c7d3904eae5d62a571148c621c3c6f8
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8b445f4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Jun 7 22:57:32 2011 +0200
kamctl: don't require sercmd all the time
- sercmd is not needed for all commands - throw error only when it is
going to be executed but it is not found
---
utils/kamctl/kamctl | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/utils/kamctl/kamctl b/utils/kamctl/kamctl
index c548849..4d99f15 100755
--- a/utils/kamctl/kamctl
+++ b/utils/kamctl/kamctl
@@ -74,8 +74,7 @@ if [ -z "$SERCMD" ] ; then
# try locate it with which
SERCMD=`which sercmd`
if [ ! -f "$SERCMD" -o ! -x "$SERCMD" ] ; then
- merr "sercmd tool not found"
- exit -1;
+ mdbg "sercmd tool not found"
fi
fi
fi
@@ -143,6 +142,14 @@ fi
##### ------------------------------------------------ #####
### CTLENGINE
#
+
+require_sercmd() {
+ if [ -z "$SERCMD" ] ; then
+ merr "sercmd tool is missing"
+ exit -1
+ fi
+}
+
CTLENGINELOADED=0
if [ -z "$CTLENGINE" ] ; then
CTLENGINE="FIFO"
@@ -161,6 +168,7 @@ case $CTLENGINE in
fi
;;
SER_MI|ser_mi|SERCMD_MI|sercmd_mi|SERCMDMI|sercmdmi)
+ require_sercmd
if [ -f "$MYLIBDIR/kamctl.ser_mi" ]; then
. "$MYLIBDIR/kamctl.ser_mi"
CTLENGINELOADED=1
@@ -2404,6 +2412,7 @@ case $1 in
;;
ser|sercmd)
+ require_sercmd
shift
$SERCTLCMD "$@"
;;
Spam detection software, running on the system "mail.iptel.org", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: Countries of interest: Poland, Czech Republic, Slovakia, Hungary,
Romania, Croatia, Slovenia, Serbia We sell proprietary information reports
on green technology, renewables and alternative energy sources themes. [...]
Content analysis details: (23.4 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
1.7 URIBL_DBL_SPAM Contains an URL listed in the DBL blocklist
[URIs: 1new-position.com]
1.6 URIBL_WS_SURBL Contains an URL listed in the WS SURBL blocklist
[URIs: 1new-position.com]
1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist
[URIs: 1new-position.com]
3.6 HELO_DYNAMIC_IPADDR2 Relay HELO'd using suspicious hostname (IP addr
2)
3.2 FH_HELO_EQ_D_D_D_D Helo is d-d-d-d
0.7 TVD_RCVD_IP TVD_RCVD_IP
0.8 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server
[190.188.74.186 listed in dnsbl.sorbs.net]
3.3 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL
[190.188.74.186 listed in zen.spamhaus.org]
0.4 RCVD_IN_XBL RBL: Received via a relay in Spamhaus XBL
0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)
2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL
[190.188.74.186 listed in psbl.surriel.com]
1.4 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT
[190.188.74.186 listed in bb.barracudacentral.org]
0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60%
[score: 0.5820]
0.0 T_URIBL_BLACK_OVERLAP T_URIBL_BLACK_OVERLAP
0.8 RDNS_NONE Delivered to internal network by a host with no rDNS
Spam detection software, running on the system "mail.iptel.org", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: Countries of interest: Poland, Czech Republic, Slovakia, Hungary,
Romania, Croatia, Slovenia, Serbia We sell proprietary information reports
on green technology, renewables and alternative energy sources themes. [...]
Content analysis details: (15.3 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
1.7 URIBL_DBL_SPAM Contains an URL listed in the DBL blocklist
[URIs: 1new-position.com]
1.6 URIBL_WS_SURBL Contains an URL listed in the WS SURBL blocklist
[URIs: 1new-position.com]
1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist
[URIs: 1new-position.com]
3.3 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL
[93.139.137.97 listed in zen.spamhaus.org]
0.4 RCVD_IN_XBL RBL: Received via a relay in Spamhaus XBL
1.3 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net
[Blocked - see <http://www.spamcop.net/bl.shtml?93.139.137.97>]
1.3 RCVD_IN_RP_RNBL RBL: Relay in RNBL,
https://senderscore.org/blacklistlookup/
[93.139.137.97 listed in bl.score.senderscore.com]
1.4 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT
[93.139.137.97 listed in bb.barracudacentral.org]
0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)
0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60%
[score: 0.5607]
1.0 RDNS_DYNAMIC Delivered to internal network by host with
dynamic-looking rDNS
0.0 T_URIBL_BLACK_OVERLAP T_URIBL_BLACK_OVERLAP
Spam detection software, running on the system "mail.iptel.org", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: Countries of interest: Poland, Czech Republic, Slovakia, Hungary,
Romania, Croatia, Slovenia, Serbia We sell proprietary information reports
on green technology, renewables and alternative energy sources themes. [...]
Content analysis details: (13.5 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
1.7 URIBL_DBL_SPAM Contains an URL listed in the DBL blocklist
[URIs: 1new-position.com]
1.6 URIBL_WS_SURBL Contains an URL listed in the WS SURBL blocklist
[URIs: 1new-position.com]
1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist
[URIs: 1new-position.com]
0.0 FREEMAIL_FROM Sender email is freemail (0-kathryn-0[at]excite.co.uk)
1.4 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT
[189.31.107.115 listed in bb.barracudacentral.org]
1.3 RCVD_IN_RP_RNBL RBL: Relay in RNBL,
https://senderscore.org/blacklistlookup/
[189.31.107.115 listed in bl.score.senderscore.com]
3.3 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL
[189.31.107.115 listed in zen.spamhaus.org]
1.6 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in
digit (0-kathryn-0[at]excite.co.uk)
0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines
0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60%
[score: 0.5029]
0.0 T_URIBL_BLACK_OVERLAP T_URIBL_BLACK_OVERLAP
0.0 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain
Spam detection software, running on the system "mail.iptel.org", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: Countries of interest: Poland, Czech Republic, Slovakia, Hungary,
Romania, Croatia, Slovenia, Serbia We sell proprietary information reports
on green technology, renewables and alternative energy sources themes. [...]
Content analysis details: (16.5 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
0.4 RCVD_IN_XBL RBL: Received via a relay in Spamhaus XBL
[94.52.130.66 listed in zen.spamhaus.org]
1.7 URIBL_DBL_SPAM Contains an URL listed in the DBL blocklist
[URIs: 1new-position.com]
1.6 URIBL_WS_SURBL Contains an URL listed in the WS SURBL blocklist
[URIs: 1new-position.com]
1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist
[URIs: 1new-position.com]
3.2 FH_HELO_EQ_D_D_D_D Helo is d-d-d-d
0.7 TVD_RCVD_IP TVD_RCVD_IP
0.8 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server
[94.52.130.66 listed in dnsbl.sorbs.net]
0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)
1.4 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT
[94.52.130.66 listed in bb.barracudacentral.org]
0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60%
[score: 0.5002]
2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL
[94.52.130.66 listed in psbl.surriel.com]
0.0 T_URIBL_BLACK_OVERLAP T_URIBL_BLACK_OVERLAP
0.8 RDNS_NONE Delivered to internal network by a host with no rDNS
Module: sip-router
Branch: 3.1
Commit: b981181c4dc90eee4b324180716bc786433507f7
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b981181…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Thu Apr 28 10:30:55 2011 +0300
module_k/pv Changed the nameaddr transformation by relaxing the requirements on the input.
As some headers might be either uri or nameaddr form, using a single transformation for parsing them was
impossible, as nameaddr.uri returns "" on an uri input(e.g. sip:12345@example.com). With this change, the
nameaddr transformation succedes and the resulting transformation places the whole string in the .uri field,
.name field being empty. A transformation chaning like the one below will work as expected on both SIP URIs and
SIP Nameaddr
$(val(test){nameaddr.uri}{uri.domain})
(cherry picked from commit 9287609db4ac64c709aa500e6326ac33af2c2061)
---
modules_k/pv/pv_trans.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/modules_k/pv/pv_trans.c b/modules_k/pv/pv_trans.c
index e568ddb..faa9376 100644
--- a/modules_k/pv/pv_trans.c
+++ b/modules_k/pv/pv_trans.c
@@ -880,6 +880,7 @@ int tr_eval_nameaddr(struct sip_msg *msg, tr_param_t *tp, int subtype,
pv_value_t *val)
{
str sv;
+ int ret;
if(val==NULL || (!(val->flags&PV_VAL_STR)) || val->rs.len<=0)
return -1;
@@ -909,8 +910,14 @@ int tr_eval_nameaddr(struct sip_msg *msg, tr_param_t *tp, int subtype,
/* parse params */
sv = _tr_nameaddr_str;
- if (parse_nameaddr(&sv, &_tr_nameaddr)<0)
- return -1;
+ ret = parse_nameaddr(&sv, &_tr_nameaddr);
+ if (ret < 0) {
+ if(ret != -3) return -1;
+ /* -3 means no "<" found so treat whole nameaddr as an URI */
+ _tr_nameaddr.uri = _tr_nameaddr_str;
+ _tr_nameaddr.name = _tr_empty;
+ _tr_nameaddr.len = _tr_nameaddr_str.len;
+ }
}
memset(val, 0, sizeof(pv_value_t));