I have set up the following publisher in CruiseControl:
<jabber host="my.network.local"
port="5222"
username="cruisecontrol"
password="cruisecontrol"
recipient="builds#conference.my.network.local"
chatroom="true"
buildresultsurl="http://cruise.control.net:7070/dashboard/tab/build/detail/customer" />
If I set chatroom to FALSE and enter a single recipient, everything works great. The problem I have is sending sending the build notification to a chat room. I set the chatroom value to TRUE and enter the fully qualified chatroom name I get the following error:
2009-10-16 13:34:10,818 [Thread-70897] ERROR JabberPublisher - Could not send message to recipient or chat room
No response from server.:
at org.jivesoftware.smack.GroupChat.join(GroupChat.java:162)
at org.jivesoftware.smack.GroupChat.join(GroupChat.java:123)
at net.sourceforge.cruisecontrol.publishers.JabberPublisher.init(JabberPublisher.java:146)
at net.sourceforge.cruisecontrol.publishers.JabberPublisher.publish(JabberPublisher.java:201)
at net.sourceforge.cruisecontrol.Project.publish(Project.java:742)
at net.sourceforge.cruisecontrol.Project.build(Project.java:264)
at net.sourceforge.cruisecontrol.Project.execute(Project.java:147)
at net.sourceforge.cruisecontrol.ProjectConfig.execute(ProjectConfig.java:402)
at net.sourceforge.cruisecontrol.ProjectWrapper.run(ProjectWrapper.java:69)
at java.lang.Thread.run(Thread.java:619)
Has anyone been able to send build messages to a Jabber chatroom using this method?
I haven't used Jabber with CruiseControl, but have you tried connecting to that port manually from your server running CC?
Like:
telnet my.network.local 5222
Can you log any of the xmpp / jabber packets from the client to server and back? We can see the CruiseControl config file and the java error, but we can't see what xmpp packets are actually being sent and received. That may be key in the troubleshooting.
Related
Mail Reader Sampler - Unable to read mail from yopmail/mailinator using jmeter
I am sending mail to abc123#yopmail.com , i want to read that mail or check whether received the mail in abc123#yopmail.com or not.
I haven't got any POP3/IMAP details of yopmail/mailinator.
Any other way i can verify the received emails.
Response in Jmeter - Error code -500
Imap cred for yopmail:
mail-imap.yopmail.com
port - not mentioned
username - abc#yopmail.com
password - not mentioned
I have Keycloak running in a Kubernetes cluster. Authentication works but I need to set up e-mail to be able to send e-mails for verification and password reset.
I have SendGrid set up as an SMTP Relay. These settings (host, port and api key) work when I send mail using the SendGrid java client. However, when pressing Test connection in KeyCloak I get:
[Error] Failed to load resource: the server responded with a status of 500 ()
[Debug] Remove message (services.js, line 14)
[Debug] Added message (services.js, line 15)
[Error] Can't find variable: error
https://<domain>/auth/resources/ong8v/admin/keycloak/js/controllers/realm.js:76 – "Possibly unhandled rejection: {}"
[Debug] Remove message (services.js, line 14)
There isn't much to go on here. I have an e-mail address set up for the currently logged in user. I've also tried resetting the password in case the Test connection functionality was broken but that didn't work either.
The Realm Settings settings user for email are as such:
host: smtp.sendgrid.net
port: 587
from: test#<domain>
Enable StartTLS: true
Username: "apikey"
Password: <api key>
Any idea what can be wrong? Or how to find out? For instance, maybe I can get a more meaningful error message somehow.
Edit:
I got the server logs.
Failed to send email: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.sendgrid.net, 587; timeout 10000;
nested exception is: java.net.SocketTimeoutException: connect timed out
Edit 2:
I've tried sending mail using Telnet using the exact same settings and that works. So apparently it's something with Keycloak or its underlying Java libraries that's causing issues sending e-mail.
Turns out that Keycloak works and that emails were blocked by the hosting provider.
I am writing a Rust application that will send email through an Exchange server with SMTP functionality enabled. According to Microsoft's webpage, the settings that are required are:
Server address smtp.office365.com
Port 587
StartTLS Enabled
Credentials for mail account login
These are corroborated by the POP/IMAP settings of the webmail service.
Here is my code (with some censoring):
extern crate lettre;
use self::lettre::email::EmailBuilder;
use self::lettre::transport::smtp::{SecurityLevel, SmtpTransportBuilder, SUBMISSION_PORT};
use self::lettre::transport::smtp::authentication::Mechanism;
use self::lettre::transport::EmailTransport;
pub fn send_mail() {
let email = EmailBuilder::new()
.from("my email")
.to("destination email")
.body("testing")
.subject("testing")
.build()
.unwrap();
// Connect to SMTP server
let mut transport = SmtpTransportBuilder::new(("smtp.office365.com", SUBMISSION_PORT))
.expect("Failed to create email transport")
.encrypt()
.smtp_utf8(true)
.credentials("my email", "my password")
.authentication_mechanism(Mechanism::Login)
.build();
println!("Mail transport built");
println!("{:?}", transport.send(email.clone()));
}
When I compile and run the code,it gives me this error:
Err(Permanent(Response { code: Code { severity:
PermanentNegativeCompletion, category: Unspecified3, detail: 0 },
message: ["5.7.57 SMTP; Client was not authenticated to send anonymous
mail during MAIL FROM [SYXPR01CA0106.ausprd01.prod.outlook.com]"] }))
Why is this happening?
The closest I've come in my research is an issue on GitHub in relation to the lettre library not supporting the Login authentication mechanism (which Office 365 uses); however, the codebase was updated to support Login and I am using the master branch directly from GitHub so theoretically my application should support the Login mechanism.
Edit: Forgot to mention that I attempted an EHLO to the server, but it returned a (Client:(Connection closed)) error.
I used telnet and openssl to try connecting directly to my SMTP server, where I found that AUTH LOGIN requires 3 commands; one to send the AUTH LOGIN code, one to send the username and another to send the password. I found that the lettre library implements all its AUTH commands as single commands, so this wasn't working with the server. I downloaded the source code for the library, changed the send function to do the three separate commands, recompiled my code and everything worked fine :)
My addition to the lettre code:
if (accepted_mechanisms[0] == Mechanism::Login) &&
(accepted_mechanisms.capacity() == 1) {
try_smtp!(self.client.command("AUTH LOGIN"), self);
try_smtp!(self.client.command(base64::encode_config(
&username.as_bytes(),
base64::STANDARD).as_str()), self);
try_smtp!(self.client.command(base64::encode_config(
&password.as_bytes(),
base64::STANDARD).as_str()), self);
It seems that mod_logxml module is not compatible with ejabberd 13.12 version. Ejabberd fails to start when this module is installed.
My question is - is there another way how to log (file, database, etc) all the XMPP packets send and received by ejabberd?
Yes, you can make your own log module if you cannot find anything that fits your needs.
You can use a module I developed as a reference. This module which would intercept stanza with the type "chat" or "groupchat" and send a acknowledgement back to the sender.
You can modify this module by removing the type so it intercepts all stanza types and log whatever you want into a DB instead of sending a message back to the sender.
https://github.com/Mingism/ejabberd-stanza-ack
I've changed mod_logxml.erl that it will work with eJabberd 13.12. You have to put in
ejabberd/src/
Configs are for ejabberd.yml format:
mod_logxml:
stanza: [message, other]
direction: [external]
orientation: [send, recv]
logdir: "/var/jabber/logs/"
timezone: universal
rotate_days: 1
rotate_megs: 100
rotate_kpackets: no
check_rotate_kpackets: 1
Repository
I am trying to set up an alert for a channel to send emails. The problem is that when a channel produces an alert, on having tried to send e-mail the mistake takes place: "Connection reset". The server of mail is external to the company.
To prove the sending of message in Mirth, I have defined a channel that when it receives a hl7 message sends a mail to a certain direction with the following code javascript:
var smtpConn = SMTPConnectionFactory.createSMTPConnection();
smtpConn.send('example1#mailserver.es', '', 'example2#mailserver.es', 'subject', 'body');
logger.info('mensaje enviado');
Producing the same mistake:
Caused by: javax.mail.MessagingException: Exception reading response;
nested exception is:
java.net.SocketException: Connection reset
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1925)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1684)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:525)
at javax.mail.Service.connect(Service.java:313)
at javax.mail.Service.connect(Service.java:172)
at javax.mail.Service.connect(Service.java:121)
at javax.mail.Transport.send0(Transport.java:190)
at javax.mail.Transport.send(Transport.java:120)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1232)
The Setting configuration is:
SMTP Host: ipsmtphostserver, Port: 465,SendTimeOut:2000,DefaultFromAccess:anyemail#mail.com, SecureConnection:I have tried with both TTL and SSL,RequiereAuthentication: Yes.
I have thought that the problem was firewall or antivirus, but I have deactivated a moment them and it follows the problem.