sda
Active Member
I spent the morning screwing around trying to get the email to work. I finally got it to work, but not the way I really wanted it to. The main issue is that there's no way to diagnose the problem if the email doesn't get sent. Several times I was pretty sure I wasn't even making a TCP connection to the email server but had no clue why. I could connect from the CMD line, but not from the XEP. Turns out I didn't have a DNS server configured in the XEP. When you do get a connection, the email server will spit out errors, but there's no way to know what they are from the XEPs viewpoint.
I also ran into some weird errors while email testing. RP2 would try to send the email and the XEP would disconnect from the control.
Message box: System did not respond. Connection may have been terminated. (you think?) [Cancel] [Retry]
Message box: Control has disconnected [OK]
Turns out that's a known issue when the XEP isn't configured properly for email or "gets confused".
During my pursuit, I cobbled up a program to simulate a sendmail server and had the ELK send to it. This was designed to mimic my server running qmail. I did this because regular email works fine from this location but the XEP didn't.
An unauthenticated conversation looks like this:
>>> (from server to xep)
<<< (from xep to server)
>>> 220 mail.domain.com ESMTP
<<< EHLO domain.com{13}{10}
>>> 250-mail.domain.com
>>> 250-PIPELINING
>>> 250-8BITMIME
>>> 250-AUTH LOGIN PLAIN CRAM-MD5
>>> 250 STARTTLS
<<< MAIL FROM: <[email protected]>{13}{10}
>>> 250 ok
<<< RCPT TO: <[email protected]>{13}{10}
>>> 250 ok
<<< DATA{13}{10}
>>> 354 go ahead
<<< MIME-Version: 1.0{13}{10}
To: [email protected]{13}{10}
From: [email protected]{13}{10}
Cc: {13}{10}
Subject: Email Alert{13}{10}
X-Mailer: Allegro Software RomMailer /4.01{13}{10}
Content-Type: text/plain; charset=iso-8859-1{13}{10}
Content-Transfer-Encoding: 7bit{13}{10}
{13}{10}
<<< test{13}{10}.{13}{10}
>>> 250 ok
<<< QUIT{13}{10}
>>> 221 mail.domain.com
Nothing special.
An authenticated conversation looks like this
>>> 220 mail.domain.com ESMTP
<<< EHLO domain.com{13}{10}
>>> 250-mail.domain.com
>>> 250-PIPELINING
>>> 250-8BITMIME
>>> 250-AUTH LOGIN PLAIN CRAM-MD5
>>> 250 STARTTLS
<<< AUTH CRAM-MD5{13}{10}
>>> 334 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<<< xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{13}{10}
>>> 235 Authentication successful.
<<< MAIL FROM: <[email protected]>{13}{10}
>>> 250 ok
<<< RCPT TO: <[email protected]>{13}{10}
>>> 250 ok
<<< DATA{13}{10}
>>> 354 go ahead
<<< MIME-Version: 1.0{13}{10}
To: [email protected]{13}{10}
From: [email protected]{13}{10}
Cc: {13}{10}
Subject: Email Alert{13}{10}
X-Mailer: Allegro Software RomMailer /4.01{13}{10}
Content-Type: text/plain; charset=iso-8859-1{13}{10}
Content-Transfer-Encoding: 7bit{13}{10}
{13}{10}
<<< test{13}{10}.{13}{10}
>>> 250 ok
<<< QUIT{13}{10}
>>> 221 mail.domain.com
Again, nothing special. The ELK uses challenge-response to authenticate.
So why doesn't it work when I connect to my real server?
telnet mail.mydomain.com 25
220 rblsmtpd.local
EHLO domain.com
451 Dynamic IP Addresses See: http://www.sorbs.net/lookup.shtml?###.###.###.###
And that's what the XEP isn't telling you.
This particular error is on my end. I need to (figure out how to) reconfigure qmail to allow the IP address range that the XEP is on.
In the meantime, I was able to relay though my ISP's (Charter) server:
XEP configuration:
server: smtp.charter.net port: 25
from: [email protected]
username and password blank (not needed since I'm inside the Charter network)
Suggestions for ELK
1) Better error handling for connections - rebooting the XEP just isn't acceptable
2) View conversation between the XEP and the email server. It helps to know what the problem is in order to solve it.
3) The generic subject of "Email Alert" doesn't cut it. A separate subject for each message would be more useful.
I also ran into some weird errors while email testing. RP2 would try to send the email and the XEP would disconnect from the control.
Message box: System did not respond. Connection may have been terminated. (you think?) [Cancel] [Retry]
Message box: Control has disconnected [OK]
Turns out that's a known issue when the XEP isn't configured properly for email or "gets confused".
During my pursuit, I cobbled up a program to simulate a sendmail server and had the ELK send to it. This was designed to mimic my server running qmail. I did this because regular email works fine from this location but the XEP didn't.
An unauthenticated conversation looks like this:
>>> (from server to xep)
<<< (from xep to server)
>>> 220 mail.domain.com ESMTP
<<< EHLO domain.com{13}{10}
>>> 250-mail.domain.com
>>> 250-PIPELINING
>>> 250-8BITMIME
>>> 250-AUTH LOGIN PLAIN CRAM-MD5
>>> 250 STARTTLS
<<< MAIL FROM: <[email protected]>{13}{10}
>>> 250 ok
<<< RCPT TO: <[email protected]>{13}{10}
>>> 250 ok
<<< DATA{13}{10}
>>> 354 go ahead
<<< MIME-Version: 1.0{13}{10}
To: [email protected]{13}{10}
From: [email protected]{13}{10}
Cc: {13}{10}
Subject: Email Alert{13}{10}
X-Mailer: Allegro Software RomMailer /4.01{13}{10}
Content-Type: text/plain; charset=iso-8859-1{13}{10}
Content-Transfer-Encoding: 7bit{13}{10}
{13}{10}
<<< test{13}{10}.{13}{10}
>>> 250 ok
<<< QUIT{13}{10}
>>> 221 mail.domain.com
Nothing special.
An authenticated conversation looks like this
>>> 220 mail.domain.com ESMTP
<<< EHLO domain.com{13}{10}
>>> 250-mail.domain.com
>>> 250-PIPELINING
>>> 250-8BITMIME
>>> 250-AUTH LOGIN PLAIN CRAM-MD5
>>> 250 STARTTLS
<<< AUTH CRAM-MD5{13}{10}
>>> 334 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<<< xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{13}{10}
>>> 235 Authentication successful.
<<< MAIL FROM: <[email protected]>{13}{10}
>>> 250 ok
<<< RCPT TO: <[email protected]>{13}{10}
>>> 250 ok
<<< DATA{13}{10}
>>> 354 go ahead
<<< MIME-Version: 1.0{13}{10}
To: [email protected]{13}{10}
From: [email protected]{13}{10}
Cc: {13}{10}
Subject: Email Alert{13}{10}
X-Mailer: Allegro Software RomMailer /4.01{13}{10}
Content-Type: text/plain; charset=iso-8859-1{13}{10}
Content-Transfer-Encoding: 7bit{13}{10}
{13}{10}
<<< test{13}{10}.{13}{10}
>>> 250 ok
<<< QUIT{13}{10}
>>> 221 mail.domain.com
Again, nothing special. The ELK uses challenge-response to authenticate.
So why doesn't it work when I connect to my real server?
telnet mail.mydomain.com 25
220 rblsmtpd.local
EHLO domain.com
451 Dynamic IP Addresses See: http://www.sorbs.net/lookup.shtml?###.###.###.###
And that's what the XEP isn't telling you.
This particular error is on my end. I need to (figure out how to) reconfigure qmail to allow the IP address range that the XEP is on.
In the meantime, I was able to relay though my ISP's (Charter) server:
XEP configuration:
server: smtp.charter.net port: 25
from: [email protected]
username and password blank (not needed since I'm inside the Charter network)
Suggestions for ELK
1) Better error handling for connections - rebooting the XEP just isn't acceptable
2) View conversation between the XEP and the email server. It helps to know what the problem is in order to solve it.
3) The generic subject of "Email Alert" doesn't cut it. A separate subject for each message would be more useful.