kannel status denied in playSMS - sms-gateway

I'm trying to use playSMS on ubuntu Server 14.04.
I've installed playSMS like show here and I've configurated Kannel like show here.
My /etc/Kannel/kannel.conf is:
# CORE
group = core
admin-port = 13000
admin-password = playsms
status-password = playsms
log-file = /var/log/kannel/kannel.log
log-level = 0
access-log = /var/log/kannel/access.log
smsbox-port = 13001
store-type = file
store-file = /var/log/kannel/kannel.store
smsbox-max-pending = 100
# SMSBOX
group = smsbox
bearerbox-host = localhost
bearerbox-port = 13001
sendsms-port = 13131
sendsms-chars = "0123456789+"
log-file = /var/log/kannel/smsbox.log
log-level = 0
global-sender = "isi dengan sms center"
access-log = /var/log/kannel/access.log
#SMSC MODEM GSM
group = smsc
smsc = at
port = 13013
host = localhost
smsc-id = modex
modemtype = auto
device = /dev/ttyUSB0
sms-center = "+393359609600"
speed = 230400
# GROUP MODEM
group = modems
id = siemens_mc35i
name = "SIEMENS MC35i"
detect-string = "SIEMENS"
detect-string2 = "MC35i"
init-string = "AT+CNMI=1,2,0,1,1"
speed = 230400
enable-hwhs = "AT\\Q3"
need-sleep = true
# SENDSMS-USER
group = sendsms-user
default-smsc = default
username = playsms
password = playsms
max-messages = 10
concatenation = true
# SMS SERVICE 'default'
group = sms-service
keyword = default
accept-x-kannel-headers = true
max-messages = 0
assume-plain-text = true
catch-all = true
get-url = "http://localhost/playsms/index.php?app=call&cat=gateway&plugin=kannel&access=geturl&t=%t&q=%q&a=%a&Q=%Q"
But when I login in playsms application my sms go into queque and I can see they in Outgoing SMS with yellow box.
If i go to Administration -> Manage gateway -> Kannel -> Manage kannel, the kannel status is denied.
Someone can help me please?

make sure your Kannel is running, you can do ps ax and tail Kannel log to see whether or not the Kannel runs properly.
ps ax | grep box
tail -f /var/log/kannel/kannel.log
once you know that Kannel is running then login to your playSMS web, through menu: Administration -> Manage gateway -> Kannel -> Manage kannel, you need to set Kannel admin port and Kannel admin password, which according to your kannel.conf they are:
admin-port = 13000
admin-password = playsms

try to check this link url of kannel status in the browser :
there is the link :
http://localhost:13000/status?password=playsms

Related

What changed in exim 4.94, after update the line throws an error

I use Vesta control panel, Exim is screwed to it, after update, errors.
2020-12-03 23:45:35 H=mail-wr1-f44.google.com [209.85.221.44] X=TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no F=<mymail#gmail.com> temporarily rejected RCPT <info#my.com>: failed to expand "${extract{1}{:}{${lookup{$local_part#$domain}lsearch{/etc/exim/domains/$domain/aliases}}}}": NULL
along the way there are symbolic links. How to zoom out?
/etc/exim/domains/$domain/aliases
Working Exim configuration for Centos 7/8
Search google: Devoleksiy vesta rhel8 exim.conf
Such an odd response because the moderator deleted my response with a link to the working configuration, which will obsolete the error.
If I insert what to replace it will get even more confusing.
######################################################################
# #
# Exim configuration file for Vesta Control Panel #
# #
######################################################################
#SPAMASSASSIN = yes
#SPAM_SCORE = 50
#CLAMD = yes
add_environment = <; PATH=/bin:/usr/bin
keep_environment =
disable_ipv6=true
domainlist local_domains = dsearch;/etc/exim/domains/
domainlist relay_to_domains = dsearch;/etc/exim/domains/
hostlist relay_from_hosts = 127.0.0.1
hostlist whitelist = net-iplsearch;/etc/exim/white-blocks.conf
hostlist spammers = net-iplsearch;/etc/exim/spam-blocks.conf
no_local_from_check
untrusted_set_sender = *
acl_smtp_connect = acl_check_spammers
acl_smtp_mail = acl_check_mail
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data
acl_smtp_mime = acl_check_mime
.ifdef SPAMASSASSIN
spamd_address = 127.0.0.1 783
.endif
.ifdef CLAMD
av_scanner = clamd: /var/run/clamav/clamd.sock
.endif
tls_advertise_hosts = *
tls_certificate = ${if and \
{ \
{gt{$tls_in_sni}{}} \
{!match{$tls_in_sni}{/}} \
} \
{${if exists {/usr/local/vesta/ssl/exim.cert.$tls_in_sni} \
{/usr/local/vesta/ssl/exim.cert.$tls_in_sni} \
{/usr/local/vesta/ssl/certificate.crt} \
}} \
{/usr/local/vesta/ssl/certificate.crt} \
}
tls_privatekey = ${if and \
{ \
{gt{$tls_in_sni}{}} \
{!match{$tls_in_sni}{/}} \
} \
{${if exists {/usr/local/vesta/ssl/exim.key.$tls_in_sni} \
{/usr/local/vesta/ssl/exim.key.$tls_in_sni} \
{/usr/local/vesta/ssl/certificate.key} \
}} \
{/usr/local/vesta/ssl/certificate.key} \
}
openssl_options = +no_sslv2 +no_sslv3
tls_require_ciphers = ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:!DSS
daemon_smtp_ports = 25 : 465 : 587 : 2525
tls_on_connect_ports = 465
never_users = root
host_lookup = *
rfc1413_hosts = *
rfc1413_query_timeout = 1s
ignore_bounce_errors_after = 2d
timeout_frozen_after = 7d
DKIM_DOMAIN = ${lc:${domain:$h_from:}}
DKIM_FILE = /etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/dkim.pem
DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
######################################################################
# ACL CONFIGURATION #
# Specifies access control lists for incoming SMTP mail #
######################################################################
begin acl
acl_check_spammers:
accept hosts = +whitelist
drop message = Your host in blacklist on this server.
log_message = Host in blacklist
hosts = +spammers
accept
acl_check_mail:
deny condition = ${if eq{$sender_helo_name}{}}
message = HELO required before MAIL
drop message = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
delay = 45s
drop condition = ${if isip{$sender_helo_name}}
message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
drop condition = ${if eq{[$interface_address]}{$sender_helo_name}}
message = $interface_address is _my_ address
accept
acl_check_rcpt:
accept hosts = :
deny message = Restricted characters in address
domains = +local_domains
local_parts = ^[.] : ^.*[#%!/|]
deny message = Restricted characters in address
domains = !+local_domains
local_parts = ^[./|] : ^.*[#%!] : ^.*/\\.\\./
require verify = sender
accept hosts = +relay_from_hosts
control = submission
accept authenticated = *
control = submission/domain=
deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
hosts = !+whitelist
dnslists = ${readfile {/etc/exim/dnsbl.conf}{:}}
require message = relay not permitted
domains = +local_domains : +relay_to_domains
deny message = smtp auth requried
sender_domains = +local_domains
!authenticated = *
require verify = recipient
.ifdef CLAMD
warn set acl_m0 = no
warn condition = ${if exists {/etc/exim/domains/$domain/antivirus}{yes}{no}}
set acl_m0 = yes
.endif
.ifdef SPAMASSASSIN
warn set acl_m1 = no
warn condition = ${if exists {/etc/exim/domains/$domain/antispam}{yes}{no}}
set acl_m1 = yes
.endif
accept
acl_check_data:
.ifdef CLAMD
deny message = Message contains a virus ($malware_name) and has been rejected
malware = *
condition = ${if eq{$acl_m0}{yes}{yes}{no}}
.endif
.ifdef SPAMASSASSIN
warn !authenticated = *
hosts = !+relay_from_hosts
condition = ${if < {$message_size}{100K}}
condition = ${if eq{$acl_m1}{yes}{yes}{no}}
spam = spamd:true/defer_ok
add_header = X-Spam-Score: $spam_score_int
add_header = X-Spam-Bar: $spam_bar
add_header = X-Spam-Report: $spam_report
set acl_m2 = $spam_score_int
warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
add_header = X-Spam-Status: Yes
message = SpamAssassin detected spam (from $sender_address to $recipients).
.endif
accept
acl_check_mime:
deny message = Blacklisted file extension detected
condition = ${if match {${lc:$mime_filename}}{\N(\.ade|\.adp|\.bat|\.chm|\.cmd|\.com|\.cpl|\.exe|\.hta|\.ins|\.isp|\.jse|\.lib|\.lnk|\.mde|\.msc|\.msp|\.mst|\.pif|\.scr|\.sct|\.shb|\.sys|\.vb|\.vbe|\.vbs|\.vxd|\.wsc|\.wsf|\.wsh)$\N}{1}{0}}
accept
######################################################################
# AUTHENTICATION CONFIGURATION #
######################################################################
begin authenticators
dovecot_plain:
driver = dovecot
public_name = PLAIN
server_socket = /var/run/dovecot/auth-client
server_set_id = $auth1
dovecot_login:
driver = dovecot
public_name = LOGIN
server_socket = /var/run/dovecot/auth-client
server_set_id = $auth1
######################################################################
# ROUTERS CONFIGURATION #
# Specifies how addresses are handled #
######################################################################
begin routers
#smarthost:
# driver = manualroute
# domains = ! +local_domains
# transport = remote_smtp
# route_list = * smartrelay.vestacp.com
# no_more
# no_verify
dnslookup:
driver = dnslookup
domains = !+local_domains
transport = remote_smtp
no_more
userforward:
driver = redirect
check_local_user
file = $home/.forward
allow_filter
no_verify
no_expn
check_ancestor
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
procmail:
driver = accept
check_local_user
require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
transport = procmail
no_verify
autoreplay:
driver = accept
require_files = /etc/exim/domains/$domain/autoreply.${local_part}.msg
condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}{yes}{no}}
retry_use_local_part
transport = userautoreply
unseen
aliases:
driver = redirect
headers_add = X-redirected: yes
data = ${extract{1}{:}{${lookup{$local_part#$domain}lsearch{/etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/aliases}}}}
require_files = /etc/exim/domains/$domain/aliases
redirect_router = dnslookup
pipe_transport = address_pipe
unseen
localuser_fwd_only:
driver = accept
transport = devnull
condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/fwd_only}{true}{false}}}}
localuser_spam:
driver = accept
transport = local_spam_delivery
condition = ${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_part}lsearch{/etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/passwd}{yes}{no_such_user}}}}
localuser:
driver = accept
transport = local_delivery
condition = ${lookup{$local_part}lsearch{/etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/passwd}{true}{false}}
catchall:
driver = redirect
headers_add = X-redirected: yes
require_files = /etc/exim/domains/$domain/aliases
data = ${extract{1}{:}{${lookup{*#$domain}lsearch{/etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/aliases}}}}
file_transport = local_delivery
redirect_router = dnslookup
terminate_alias:
driver = accept
transport = devnull
condition = ${lookup{$local_part#$domain}lsearch{/etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/aliases}{true}{false}}
######################################################################
# TRANSPORTS CONFIGURATION #
######################################################################
begin transports
remote_smtp:
driver = smtp
#helo_data = $sender_address_domain
dkim_domain = DKIM_DOMAIN
dkim_selector = mail
dkim_private_key = DKIM_PRIVATE_KEY
dkim_canon = relaxed
dkim_strict = 0
procmail:
driver = pipe
command = "/usr/bin/procmail -d $local_part"
return_path_add
delivery_date_add
envelope_to_add
user = $local_part
initgroups
return_output
local_delivery:
driver = appendfile
maildir_format
maildir_use_size_file
user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/passwd}}}}
group = mail
create_directory
directory_mode = 770
mode = 660
use_lockfile = no
delivery_date_add
envelope_to_add
return_path_add
directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim/domains/}}/${lookup{$local_part}dsearch{${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim/domains/}}}}"
quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/passwd}}}}M
quota_warn_threshold = 75%
local_spam_delivery:
driver = appendfile
maildir_format
maildir_use_size_file
user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/passwd}}}}
group = mail
create_directory
directory_mode = 770
mode = 660
use_lockfile = no
delivery_date_add
envelope_to_add
return_path_add
directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim/domains/}}/${lookup{$local_part}dsearch{${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim/domains/}}}}/.Spam"
quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/passwd}}}}M
quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim/domains/}}/${lookup{$local_part}dsearch{${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim/domains/${lookup{$domain}dsearch{/etc/exim/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim/domains/}}}}"
quota_warn_threshold = 75%
address_pipe:
driver = pipe
return_output
address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add
address_reply:
driver = autoreply
userautoreply:
driver = autoreply
file = /etc/exim/domains/$domain/autoreply.${local_part}.msg
from = "${local_part}#${domain}"
headers = Content-Type: text/plain; charset=utf-8;\nContent-Transfer-Encoding: 8bit
subject = "${if def:h_Subject: {Autoreply: \"${rfc2047:$h_Subject:}\"} {Autoreply Message}}"
to = "${sender_address}"
devnull:
driver = appendfile
file = /dev/null
######################################################################
# RETRY CONFIGURATION #
######################################################################
begin retry
# Address or Domain Error Retries
# ----------------- ----- -------
* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
######################################################################
# REWRITE CONFIGURATION #
######################################################################
begin rewrite
######################################################################

NACK/0x00000061/Invalid Scheduled Delivery Time error in Kannel

I have been trying to configure an SMS gateway service using Kannel and sqlbox. My system is successfully connected to the Airtel SMSC. But whenever I try to send SMS (Inserting data in send_sms table of course), I get this weird response from the SMSC
NACK/0x00000061/Invalid Scheduled Delivery Time
But I have nowhere mentioned about the scheduled delivery time.
Here is the log in SMSC side
and here is my kannel configuration
#CORE
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = rasello
status-password = rasello
admin-allow-ip = "*.*.*.*"
wdp-interface-name = "*"
log-file = "/var/log/kannel/bearerbox.log"
#store-file = "/var/log/kannel/kannel.store"
log-level = 0
#box-deny-ip = "*.*.*.*"
box-allow-ip = "*.*.*.*"
dlr-storage=mysql
#SMSBOX SETUP
group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
bearerbox-port = 13001
log-file = "/var/log/kannel/smsbox.log"
log-level = 0
# SEND-SMS USERS
group = sendsms-user
username = username
password = password
default-smsc = rasello
#mysql connection
group = mysql-connection
id = sqlbox-db
host = localhost
port = 3306
username = root
password = N3pal#312
database = kannel
max-connections = 10
# DLR SETUP
#mysql connection
group = mysql-connection
id = mydlr
host = localhost
username = root
password = N3pal#312
database = kannel
max-connections = 10
group = dlr-db
id = mydlr
table=dlr
field-smsc=smsc
field-timestamp=ts
field-destination=destination
field-source=source
field-service=service
field-url=url
field-mask=mask
field-status=status
field-boxc-id=boxc
# SMSC SMPP
group = smsc
smsc-id = rasello
smsc = smpp
host = ip
port = port
transceiver-mode = false
smsc-username = username
smsc-password = password
system-type = smpp
interface-version = 34
address-range = ""
#SMS SERVICE GET-URL
group = sms-service
keyword = default
send-sender = true
get-url = "http://localhost/receivesms?phone=%p&text=%a"
Please help resolving this issue
you have to contact ur SMPP provider for this coz they are rejecting your SMS with this NACK

How do you configure UDPInput to work with heka-flood udp test

I am trying to test sending data to heka's UDPInput with no success. I decided to try to use the heka-flood tool to mimic UPD traffic also with no success. I am using 0.10 version of heka. My heka.toml :
[UdpInput]
address = "127.0.0.1:4880"
net = "udp"
splitter = "udp_splitter"
decoder = "ProtobufDecoder"
set_hostname = true
# I have also tried not setting this as well
[udp_splitter]
type = "HekaFramingSplitter"
[ProtobufDecoder]
[LogOutput]
type = "LogOutput"
message_matcher = "Logger == 'UdpInput'"
encoder = "PayloadEncoder"
and my flood.toml:
[udp_proto]
ip_address = "127.0.0.1:4880"
sender = "udp"
pprof_file = ""
encoder = "protobuf"
num_messages = 1000
corrupt_percentage = 0.0001
signed_percentage = 0.00011
variable_size_messages = false
ascii_only = true
max_message_size = 32000
If I add another input, like say a log tailer and add it to the message matcher for the LogOutput, those messages end up being logged out. I never see anything from the UpdInput. What am I doing wrong?

trac SmtpLdapEmailSender to field is empty

I am getting the following problem with this plugin. using trac 0.12.5 on centos 5. the following log is from a comment. user responding is sharif.uddin, user created is jason. and user i am trying to cc to is ramy.
Trac[paradox:env] INFO: Reloading environment due to configuration change
Trac[paradox:env] INFO: -------------------------------- environment startup [Trac 0.12.5] --------------------------------
Trac[paradox:api] INFO: Synchronized '(default)' repository in 0.01 seconds
Trac[paradox:api] INFO: Synchronized '(default)' repository in 0.00 seconds
Trac[paradox:env] INFO: Reloading environment due to configuration change
Trac[paradox:env] INFO: -------------------------------- environment startup [Trac 0.12.5] --------------------------------
Trac[paradox:api] INFO: Synchronized '(default)' repository in 0.06 seconds
Trac[paradox:SmtpLdapEmailSender] INFO: Binding to LDAP as cn=Administrator,cn=Users,dc=domain,dc=com
Trac[paradox:SmtpLdapEmailSender] INFO: Updating list of recipients
Trac[paradox:SmtpLdapEmailSender] WARNING: Searching LDAP server ldap://echo.uk.domain.com for user jasona#DOMAIN.COM
Trac[paradox:SmtpLdapEmailSender] WARNING: Found e-mail address: Jason.Aftalion#domain.com
Trac[paradox:SmtpLdapEmailSender] WARNING: Searching LDAP server ldap://echo.uk.domain.com for user sharifu#DOMAIN.COM
Trac[paradox:SmtpLdapEmailSender] WARNING: Found e-mail address: Sharif.Uddin#domain.com
Trac[paradox:SmtpLdapEmailSender] WARNING: Searching LDAP server ldap://echo.uk.domain.com for user Ramy.Mahmoud#domain.com
Trac[paradox:notification] INFO: Sending notification through SMTP at hero.uk.domain.com:25 to ['Jason.Aftalion#domain.com', 'Sharif.Uddin#domain.com', u'Ramy.Mahmoud#domain.com', 'support#domain.com']
Trac[paradox:api] INFO: Synchronized '(default)' repository in 0.01 seconds
Trac[paradox:api] INFO: Synchronized '(default)' repository in 0.00 seconds
I have the following code for the plugin in site-packages
class SmtpLdapEmailSender(SmtpEmailSender):
implements(IEmailSender)
email_ldap_serveruri = Option('notification', 'email_ldap_serveruri', '',
"""AD LDAP Server to use for looking up e-mail addresses""")
email_ldap_port = IntOption('notification', 'email_ldap_port', 389, """AD LDAP Server port""")
email_ldap_binddn = Option('notification', 'email_ldap_binddn', '',
"""Bind DN for LDAP lookup. If not given, Kerberos auth will be used for current user""")
email_ldap_bindpw = Option('notification', 'email_ldap_bindpw', '', """Password for non-kerberos auth""")
email_ldap_basedn = Option('notification', 'email_ldap_basedn', '', """Base DN to use for LDAP searches""")
email_attr = 'mail'
def __init__(self):
self.log.warn("Initialising LDAP object with URI: ", self.email_ldap_serveruri)
self.ldap_conn=ldap.initialize(self.email_ldap_serveruri)
def send(self, from_addr, recipients, message):
#self.log.warn(recipients)
if self.email_ldap_binddn != None:
self.log.info("Binding to LDAP as " + self.email_ldap_binddn)
self.ldap_conn.bind_s(self.email_ldap_binddn, self.email_ldap_bindpw, ldap.AUTH_SIMPLE)
else:
self.log.info("Binding to LDAP with Kerberos")
self.ldap_conn.bind_s()
#Iterate through recipients, checking for correct e-mail addresses in LDAP
#Output in ldapRecipients
self.log.info("Updating list of recipients")
new_recipients = []
def isset(variable):
return variable in locals() or variable in globals()
for i, addr in enumerate(recipients):
self.log.warn("Searching LDAP server %s for user %s", self.email_ldap_serveruri, addr)
search_string = 'userPrincipalName=' + addr
result = self.ldap_conn.search_s(self.email_ldap_basedn, ldap.SCOPE_SUBTREE, search_string, [self.email_attr])
#result is formatted as a string (result) in a list of [attr values], in a dictionary of {attr_name=>attr_values}
#in a tuple of (DN, Entry), within a list of results. So result for principle name jasona#domain.com would be
#[('CN=Jason Aftalion,OU=TechSupport,OU=Woking,OU=Sites,DC=domain,DC=com', {'mail': ['Jason.Aftalion#domain.com']})]
#self.log.error(addr)
if len(result) > 0:
if result[0][1][self.email_attr][0]:
self.log.warn("Found e-mail address: " + result[0][1][self.email_attr][0])
new_recipients.append(result[0][1][self.email_attr][0])
else:
self.log.warn("Could not find e-mail address")
new_recipients.append(addr)
else:
new_recipients.append(addr)
new_recipients.append("support#domain.com")
#self.log.error(new_recipients)
return super(SmtpLdapEmailSender,self).send(from_addr, new_recipients, message)
Also when the email gets sent out there is no one on the to address. I think i need to add the u before the quites open on the email if you see the log line Trac[paradox:notification] INFO: Sending notification through SMTP at hero.uk.domain.com:25 to ['Jason.Aftalion#domian.com', 'Sharif.Uddin#domian.com', u'Ramy.Mahmoud#domain.com'] . ramy is the only one that appears in the email as it is placed on the cc section of the ini file.
UPDATE
[root#hero plugins]# easy_install http://trac-hacks.org/svn/announcerplugin/trunk
Downloading http://trac-hacks.org/svn/announcerplugin/trunk
Doing subversion checkout from http://trac-hacks.org/svn/announcerplugin/trunk to /tmp/easy_install-hkATrd/trunk
Processing trunk
Running setup.py -q bdist_egg --dist-dir /tmp/easy_install-hkATrd/trunk/egg-dist-tmp-dGEGqu
File "build/bdist.linux-i686/egg/announcer/opt/bitten/announce.py", line 71
yield
^
SyntaxError: invalid syntax
zip_safe flag not set; analyzing archive contents...
TracAnnouncer 1.0dev-r12503 is already the active version in easy-install.pth
Installed /usr/lib/python2.4/site-packages/TracAnnouncer-1.0dev_r12503-py2.4.egg
Processing dependencies for TracAnnouncer==1.0dev-r12503
Finished processing dependencies for TracAnnouncer==1.0dev-r12503
UPDATE 2
It installed successfully
easy_install http://trac-hacks.org/svn/announcerplugin/trunk
Downloading http://trac-hacks.org/svn/announcerplugin/trunk
Doing subversion checkout from http://trac-hacks.org/svn/announcerplugin/trunk to /tmp/easy_install-AGCmXH/trunk
Processing trunk
Running setup.py -q bdist_egg --dist-dir /tmp/easy_install-AGCmXH/trunk/egg-dist-tmp-6tmNSt
zip_safe flag not set; analyzing archive contents...
Removing TracAnnouncer 1.0dev-r12503 from easy-install.pth file
Adding TracAnnouncer 1.0dev-r13963 to easy-install.pth file
Installed /usr/lib/python2.4/site-packages/TracAnnouncer-1.0dev_r13963-py2.4.egg
Processing dependencies for TracAnnouncer==1.0dev-r13963
Finished processing dependencies for TracAnnouncer==1.0dev-r13963
I get following in log file now. I cannot install python 2.7
Trac[paradox:env] INFO: -------------------------------- environment startup [Trac 0.12.5] --------------------------------
Trac[paradox:loader] ERROR: Skipping "announcer.email_decorators = announcer.email_decorators":
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/Trac-0.12.5-py2.4.egg/trac/loader.py", line 68, in _load_eggs
entry.load(require=True)
File "/usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/pkg_resources.py", line 1954, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "build/bdist.linux-i686/egg/announcer/email_decorators.py", line 7, in ?
ImportError: No module named utils
Trac[paradox:api] INFO: Synchronized '(default)' repository in 0.66 seconds
local ini file
cat /data/intranet/html/trac/paradox/conf/trac.ini
# -*- coding: utf-8 -*-
[changeset]
max_diff_files = 0
[components]
acct_mgr.admin.accountmanageradminpanel = disabled
acct_mgr.api.accountmanager = disabled
acct_mgr.db.sessionstore = disabled
acct_mgr.guard.accountguard = disabled
acct_mgr.macros.accountmanagerwikimacros = disabled
acct_mgr.notification.accountchangelistener = disabled
acct_mgr.notification.accountchangenotificationadminpanel = disabled
acct_mgr.register.emailcheck = disabled
acct_mgr.register.emailverificationmodule = disabled
advancedworkflow.controller.ticketworkflowopownercomponent = disabled
advancedworkflow.controller.ticketworkflowopownerfield = disabled
advancedworkflow.controller.ticketworkflowopownerprevious = disabled
advancedworkflow.controller.ticketworkflowopresetmilestone = disabled
advancedworkflow.controller.ticketworkflowoprunexternal = disabled
advancedworkflow.controller.ticketworkflowopstatusprevious = disabled
advancedworkflow.controller.ticketworkflowoptriage = disabled
advancedworkflow.controller.ticketworkflowopxref = disabled
announcer.api.announcementsystem = enabled
announcer.api.subscriptionresolver = enabled
announcer.distributors.mail.emaildistributor = enabled
announcer.distributors.mail.sendmailemailsender = enabled
announcer.distributors.mail.smtpemailsender = enabled
announcer.email_decorators.announceremaildecorator = enabled
announcer.email_decorators.staticemaildecorator = enabled
announcer.email_decorators.threadingemaildecorator = enabled
announcer.email_decorators.ticketaddlheaderemaildecorator = enabled
announcer.email_decorators.ticketsubjectemaildecorator = enabled
announcer.email_decorators.wikisubjectemaildecorator = enabled
announcer.filters.defaultpermissionfilter = enabled
announcer.formatters.ticketformatter = enabled
announcer.formatters.wikiformatter = enabled
announcer.opt.subscribers.allticketsubscriber = enabled
announcer.opt.subscribers.generalwikisubscriber = enabled
announcer.opt.subscribers.joinablegroupsubscriber = enabled
announcer.opt.subscribers.ticketcomponentownersubscriber = enabled
announcer.opt.subscribers.ticketcomponentsubscriber = enabled
announcer.opt.subscribers.ticketcustomfieldsubscriber = enabled
announcer.opt.subscribers.userchangesubscriber = enabled
announcer.opt.subscribers.watchsubscriber = enabled
announcer.pref.announcerpreferences = enabled
announcer.pref.subscriptionmanagementpanel = enabled
announcer.producers.attachmentchangeproducer = enabled
announcer.producers.ticketchangeproducer = enabled
announcer.producers.wikichangeproducer = enabled
announcer.resolvers.defaultdomainemailresolver = enabled
announcer.resolvers.sessionemailresolver = enabled
announcer.resolvers.specifiedemailresolver = enabled
announcer.resolvers.specifiedxmppresolver = enabled
announcer.subscribers.carboncopysubscriber = enabled
announcer.subscribers.ticketownersubscriber = enabled
announcer.subscribers.ticketreportersubscriber = enabled
announcer.subscribers.ticketupdatersubscriber = enabled
spectrum.smtpldapemailsender.smtpldapemailsender = enabled
tracopt.mimeview.php.phprenderer = enabled
[header_logo]
alt =
link = http://intranet/trac/paradox/
src = common/trac_banner.png
[inherit]
file = /usr/share/trac/conf/trac.ini
[logging]
log_level = INFO
log_type = file
[project]
descr = Paradox replacement
name = Paradox
url = http://intranet/sidb
[ticket]
default_component = other
default_milestone = create/update project
default_version = v12
[ticket-workflow]
accept = new -> assigned
accept.operations = set_owner_to_self
accept.permissions = TICKET_MODIFY
leave = * -> *
leave.default = 1
leave.operations = leave_status
reassign = new,assigned,reopened -> new
reassign.operations = set_owner
reassign.permissions = TICKET_MODIFY
reopen = closed -> reopened
reopen.operations = del_resolution
reopen.permissions = TICKET_CREATE
resolve = new,assigned,reopened -> closed
resolve.operations = set_resolution
resolve.permissions = TICKET_MODIFY
[trac]
base_url = http://intranet/trac/paradox/
check_auth_ip = true
metanav = login,logout,settings,help,about
repository_dir = /data/subversion/paradox
[notification]
smtp_always_cc = Ramy.Mahmoud#domain.com
[announcer]
use_public_cc = true
global ini file
cat ../conf/trac.ini
[announcer]
use_public_cc = true
#admit_domains =
#always_notify_component_owner = true
#always_notify_owner = true
#always_notify_reporter = true
#always_notify_updater = true
#default_email_format = text/html
#email_address_resolvers = SpecifiedEmailResolver, SessionEmailResolver
#ignore_domains =
#mime_encoding = base64
#smtp_always_bcc =
#smtp_always_cc =
#smtp_default_domain =
#smtp_enabled = true
#smtp_from = trac-no-reply#domain.com
#smtp_from_name = Trac
#smtp_password =
#smtp_port = 25
#smtp_replyto = no-reply#domain.com
#smtp_server = hero
#smtp_subject_prefix = __default__
#smtp_timeout = 30
#smtp_user =
#t#icket_email_header_fields = owner, reporter, milestone, component, priority, severity.
#ticket_email_subject = Ticket #${ticket.id}: ${ticket['summary']}.
#ticket_subject_template = $prefix $ticket.id: $summary
#use_public_cc = false
#use_short_addr = false
#use_tls = false
#email_enabled = true
[notification]
always_notify_owner = false
always_notify_reporter = true
always_notify_updater = true
#mime_encoding = base64
#smtp_always_cc = sharifu#domain.com
#smtp_default_domain = domain.com
smtp_enabled = true
smtp_from = trac#domain.com
smtp_password =
smtp_port = 25
smtp_replyto = no-reply#domain.com
smtp_server = hero.uk.domain.com
smtp_subject_prefix = __default__
smtp_user =
use_public_cc = false
use_short_addr = false
use_tls = false
#ignore_domains = domain.com
email_sender=SmtpLdapEmailSender
email_ldap_serveruri = ldap://echo.uk.domain.com
email_ldap_port = 389
email_ldap_basedn = ou=Sites,dc=domain,dc=com
email_ldap_binddn = cn=Administrator,cn=Users,dc=domain,dc=com
email_ldap_bindpw = ****
[ldap]
enable = true
global_perms = true
host = echo
basedn = dc=domain,dc=com
user_rdn = ou=sites
group_rdn = cn=users
store_bind = true
bind_user = cn=Administrator,cn=users,dc=domain,dc=com
bind_passwd = ****
[trac]
base_url = http://intranet/trac/
#permission_store = LdapPermissionStore
[logging]
log_format = Trac[$(basename)s:$(module)s] $(levelname)s: $(message)s
log_type = syslog
log_level = WARN
[components]
webadmin.* = enabled
#ldapauth.* = enabled
#ldapplugin.* = enabled
#ldapplugin.api.ldappermissiongroupprovider = enabled
#ldapplugin.api.ldappermissionstore = disabled
ticketdelete.* = enabled
tracopt.ticket.deleter = enabled
tracwysiwyg.* = enabled
advancedworkflow.* = enabled
#tickettemplate.* = enabled
tracopt.ticket.commit_updater.committicketreferencemacro = enabled
tracopt.ticket.commit_updater.committicketupdater = enabled
ticketchangesets.* = enabled
ticketlog.* = enabled
#announcer.* = enabled
#announcer.api.announcementsystem = enabled
#announcer.distributors.mail.emaildistributor = enabled
#announcer.formatters.ticket.ticketformatter = enabled
#announcer.formatters.wiki.wikiformatter = enabled
#announcer.pref.announcerpreferences = enabled
#announcer.producers.attachment.attachmentchangeproducer = enabled
#announcer.producers.ticket.ticketchangeproducer = enabled
#announcer.producers.wiki.wikichangeproducer = enabled
#announcer.resolvers.sessionemail.sessionemailresolver = enabled
#announcer.subscribers.ticket_compat.carboncopysubscriber = enabled
#announcer.subscribers.ticket_compat.legacyticketsubscriber = enabled
#announcer.subscribers.ticket_components.ticketcomponentsubscriber = enabled
#announcer.subscribers.ticket_custom.ticketcustomfieldsubscriber = enabled
#announcer.subscribers.watch_users.userchangesubscriber = enabled
#announcer.subscribers.watchers.watchsubscriber = enabled
#[tickettemplate]
#field_list = summary, description, reporter, owner, priority, cc, milestone, component, version, type
#enable_custom = true
[ticket-changesets]
check_perms = true
collapsed = false
commands.close = close closed closes fix fixed fixes
commands.refs = addresses re references refs see
compact = true
envelope =
hide_when_none = false
notify = true
resolution = fixed
ticket_comments = true
[ticket]
commit_ticket_update_envelope = []
commit_ticket_update_commands.close =
commit_ticket_update_commands.refs = <ALL>
commit_ticket_update_check_perms = true
commit_ticket_update_notify = true
[ticketlog]
; optional: custom your log message pattern
log_pattern = \s*#%s\s+.*
; optional: set log message's max length, default is no limit
log_message_maxlength = 100
When i leave a comment i see the following extra bit in log file
Trac[paradox:api] ERROR: AnnouncementSystem failed.
Traceback (most recent call last):
File "build/bdist.linux-i686/egg/announcer/api.py", line 560, in _real_send
File "build/bdist.linux-i686/egg/announcer/api.py", line 311, in subscriptions
TypeError: itemgetter expected 1 arguments, got 4
QUESTION 2
Do emails notification not get sent out when adding attachments? i found the following in the log...
Trac[paradox:api] INFO: Synchronized '(default)' repository in 0.01 seconds
Trac[paradox:attachment] INFO: New attachment: ticket:48: RE Conversation with Ringo Au.msg by sharifu#DOMAIN.COM
Trac[paradox:api] ERROR: AnnouncementSystem failed.
Traceback (most recent call last):
File "build/bdist.linux-i686/egg/announcer/api.py", line 560, in _real_send
File "build/bdist.linux-i686/egg/announcer/api.py", line 311, in subscriptions
TypeError: itemgetter expected 1 arguments, got 4

How to send and receive USSD by using kannel

I am new in USSD but i am already sending message using Kannel 1.5.4 since long.
I want send/receive USSD request by using kannel. I have smpp v5 account for the same.
It's better if anyone help me by configuration file.
my configuration file is:
#SMSC CONNECTIONS
group = smsc
smsc = smpp
smsc-id = USSD-ACC
host= 10.*.*.*
port= 1234
transceiver-mode=true
smsc-username = "USER"
smsc-password = "PWD"
system-type = ""
interface-version=34
source-addr-ton=5
source-addr-npi=0
dest-addr-ton=0
dest-addr-npi=1
max-pending-submits=10
wait-ack=600
wait-ack-expire=0x01
# SMSBOX SETUP
group = smsbox
bearerbox-host = localhost
sendsms-port = 12345
sendsms-chars = "0123456789 +-"
log-file = "/tmp/kannel_smsbox.log"
log-level = 3
# SERVICES
group = sms-service
keyword = default
get-url = "http://localhost/request.php?MNO=%p&SHORTCODE=%P&CONTENT=%a"
name="*123#"
max-messages=0
group = sendsms-user
username = ussd
password = ussd
user-deny-ip = *.*.*.*"
user-allow-ip = "127.0.0.1"
max-messages = 5
concatenation = true
default-sender = "123"
Seems like you need to use smpp-tlv section to pass ussd_service_op TLV to/from USSDC.
See this link for configuration examples: