Python JabberBot can't join prosody controlled chat room - xmpp

I have a XMPP bot written in Python that collects the number of hours logged for each redmine user and then joins a chat room to announce users that did not log within the last X hours (https://github.com/credil/redmine_jabberbot).
The bot can join uncontrolled chat room. But for the chat room that have a guest list, it can't seem to join or announce it's message.
Neither the prosody log or the Python XMPP client prints a warning.
The bot is in /etc/prosody/sharedgroups.txt .
Here's an excerpt of the prosody log:
Mar 14 19:26:34 c2s1492670 debug Received[c2s]:
Mar 14 19:26:34 mod_muc debug room: credil#conference.xmpp.credil.org, current_nick: nil, stanza:
Mar 14 19:26:34 mod_muc debug credilbot#xmpp.credil.org/SystemInfoJabberBot joining as credil#conference.xmpp.credil.org/credilbot

Two things that made it work here:
Editing the .dat file in /var/lib/prosody/$server/config/$chatroom.dat
Restarting the server

Related

POP3 RETR Command Missing +OK Response

I've been searching and testing for days now without any rational explanation for the following to happen:
I have a mail server which serves all our users and everyone is happily running on IMAP/POP3 access. I need to develop a utility to check POP3 e-mail and started getting errors retrieving mail. I set up the same pop account on my outlook and windows live mail and they couldn't download the e-mails either. I tried another PC and it downloaded just fine. After much debugging and searching, I found out that after sending the RETR command, there wasn't an "+OK" response on my pc but there was on the other pc. So I went down to telnet and sure as day my PC wasn't getting the +OK response on RETR, just the actual mail but I was getting it from every other pc I tried. I even booted up my win XP virtual pc and it has the same result as my pc. Here is an excerpt of the logs from mine and my test pc:
RETR with +OK:
+OK Welcome to MailEnable POP3 Server
USER devtest#x.com
+OK
PASS <Removed>
+OK
LIST
+OK 3 26743
1 2118
2 23949
3 676
.
UIDL
+OK
1 BE1F75CAE417453581CF11F16CF09989
2 846882DB63B54C9E91C4643AA5CCA1F5
3 A7BAFC28B04A493689A150F6D4CD7FD0
.
RETR 1
+OK 2118 octets
Received: from x ([x.x.60.10]) by x.net with MailEnab
le ESMTP; Sun, 28 Dec 2014 11:30:16 +0200
RETR with +OK missing:
+OK Welcome to MailEnable POP3 Server
USER devtest#x.com
+OK
PASS <Removed>
+OK
LIST
+OK 3 26743
1 2118
2 23949
3 676
.
UIDL
+OK
1 BE1F75CAE417453581CF11F16CF09989
2 846882DB63B54C9E91C4643AA5CCA1F5
3 A7BAFC28B04A493689A150F6D4CD7FD0
.
RETR 1
Received: from x ([x.x.60.10]) by x.net with MailEnab
le ESMTP; Sun, 28 Dec 2014 11:32:53 +0200
I'm now going to place another hard drive in my pc and install windows and telnet client and see what it does but I was hoping someone might have had some experience with this. It's only that one time that the +OK is missing, every other command has it showing as well as it being there on every other PC I try it on so it's only on my pc that it's missing.
Appreciate any thoughts or assistance!
Well loading a new hard drive worked perfectly as expected which led me to the fact that it must be something installed on my pc itself. Disabled the usual suspects (firewall and AV) and when that didn't work, I proceeded to close down every app running on my pc which possibly works with Ports and eventually narrowed the culprit down to the Fortinet VPN Client running on my PC. I don't have it's AV component enabled so I'm rather at a loss as to how it could be the reason for a single line on port 110 to go missing but if it's running then the +OK line is missing and if it's shut down then it appears.
I'm going to leave this question here in case it can help someone else and will also try post something to Fortinet as well.

what is 'info: transport end (undefined)'? in Sails.js

When I start the server 'sails lift', it shown
debug: --------------------------------------------------------
debug: :: Mon May 05 2014 10:59:17 GMT+0700 (ICT)
debug:
debug: Environment : development
debug: Port : 1337
debug: --------------------------------------------------------
info: handshake authorized AUcEOqQtYzXw0jBMiSbp
info: handshake authorized t9Y7k4zozlyXd1nwiSbq
info: transport end (socket end)
info: transport end (undefined)
I wonder what are those last two lines?
info: transport end (socket end)
info: transport end (undefined)
TL;DR: If you don't want to see those messages, close any open pages / tabs that were connected to your Sails app before you re-lift it.
Those messages are coming from socket.io. It appears that you're lifting Sails with two open tabs / windows that were formerly connected via websockets to a running Sails instance, and reconnected once the server started again. However, something unexpected happened after the sockets reconnected, and they closed their connection. This can happen for any number of reasons; for example, an old socket connection may try to reconnect and resume a session which no longer exists, if you're using the memory store for sessions in Sails (which is the default for development mode). It's nothing to be concerned about; just make sure you refresh your pages after restarting Sails and all should be well. It's pretty rare that you'll need to maintain state for a web page between server reboots, but if you do, you can do it with a combination of the onConnect and onDisconnect methods in config/sockets.js and some front-end logic.

Jabber notifier plugin: There was an error sending notification to ***

I just installed Jabber plugin for my Jenkins last week.
I have a XMPP server running for quite a long time, and there is no connection problem
From Jenkins log, I got some error "Jabber notifier plugin: There was an error sending notification to.
But this error does not happen all the time, it just pop up sometimes and disappeared after a while. And I cannot see anything wrong from Jenkins' log. and there is nothing generated after I created a system log for
hudson.plugins.jabber
as "FINEST" log level.
Nov 27, 2013 11:49:15 AM hudson.plugins.jabber.im.transport.JabberIMConnection
createConnection
INFO: Trying to connect to XMPP on <our_server>:5222/<our_server> with SASL
Nov 27, 2013 11:49:15 AM hudson.plugins.jabber.im.transport.JabberIMConnection
setupSubscriptionMode
INFO: Accepting all subscription requests
Nov 27, 2013 11:49:15 AM hudson.plugins.jabber.im.transport.JabberIMConnection connect
INFO: Connected to XMPP on <our_server>/<our_server> using TLS
Anyone knows if this is some stability issue with this plugin? Is there any way for me to do debug to see what exactly happened when this error pop up?
Thanks!

Sendmail in GAE dev sever doesn't show the email body

While working locally on the dev server, GAE doesn't send any emails out. Unless running it with the following command:
dev_appserver.py --enable_sendmail myapp
This would rely on a local sendmail to be setup.
I am using Ubuntu now for some time and I never came across something so difficult to setup.
I came across this solution and 5 other tutorials. The mail.log shows that the email was accepted and sent out, but google times out.
Jun 28 12:13:38 tp sm-mta[15964]: r5SAnXFV014925: to=<kave#gmail.com>, ctladdr=<kave#localhost.localdomain> (1000/1000), delay=00:24:05, xdelay=00:00:00, mailer=esmtp, pri=210342, relay=alt4.gmail-smtp-in.l.google.com., dsn=4.0.0, stat=Deferred: Connection timed out with alt4.gmail-smtp-in.l.google.com
I would be happy to give up and rely on the log files. But the command line ouput doesn't show the email body:
INFO 2013-06-28 11:17:40,146 mail_stub.py:140] MailService.Send
From: admin#mydomain.com
To: kave#gmail.com
Subject: Invitation to join xxx
Body:
Content-type: text/plain
Data length: 347
It is so frustrating. Any ideas please?
Update:
I have tried to run it with the VM arguments:
But I get this error message:
I ran into this same issue a couple weeks ago. I ended up adding the following VM arguments to eclipse when running the DevAppServer:
-Dmail.log_mail_level=WARNING -Dmail.log_mail_body=true

Can't relay mail server to SendGrid

I've gone through the SendGrid integration instructions for Exim (http://docs.sendgrid.com/documentation/get-started/integrate/examples/exim/)
However, any email I send now is not being sent. Its all stuck in the queue. I looked for the log file for a message I'm trying to send and this is what I get:
2011-10-12 19:49:14 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1RE9U2-0007Qg-20
+++ 1RE9U2-0007Qg-20 has not completed +++
2011-10-12 19:49:14 1RE9U2-0007Qg-20 <= email#example.com H=localhost [127.0.0.1] P=esmtpa A=dovecot_login:email#example.com S=731 id=20111012194913.13697j8jpb4heop5#example.com T="Test"
2011-10-12 19:49:14 1RE9U2-0007Qg-20 == email#gmail.com R=send_via_sendgrid T=sendgrid_smtp defer (-53): retry time not reached for any host
I've had the support rebuild the exim db, but that hasn't helped. I'm thinking it has to do with the fact that its using the dovecot login instead of the sendgrid login which is added after it. How do I make it use the sendgrid login info? Thanks!!
If you aren't using your SG credentials you're going to run into authentification issues.
Try the following to make sure you are using the correct credentials:
*:sendgridusername:sendgridpassword