Using SMTP Relayer with NO Domains

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
bjsherman
New user
New user
Posts: 4
Joined: 2014-07-19 16:28

Using SMTP Relayer with NO Domains

Post by bjsherman » 2014-07-19 16:48

I do not have any type of domain in my setup. I am wanting to use hMailServer strictly as an outgoing, man in the middle, port changer.
I have a PC with home security software running on it what uses USB connections to various sensors. This software was discontinued long time ago, and has no updates/support. It collects events from various sensors and sends an email out to my personal address.
The software has the following screen for configuring the SMTP INFO for sending.
It allows me to change:
Outgoing Mail SMTP
E-Mail Address
My Server requires Authentication check box which activates to more fields
Account Name
Password


The only thing I cannot change is the port used, which is hardcoded to port 25.
That port is blocked my my ISP.

I would like to use hMailServer running on the same PC, to intercept the email message before sending out on port 25, and redirect it to port 465 as specified by ISP.

Reading through several forum messages I read one recent reply to a similar (?) setup:
mattg

Just set a SMTP relayer, and a LOCAL IP RANGE for these devices with a priority of 25.
Only need for domains and accounts if your devices authenticate. if they can't or don't authenticate, no need for domains and accounts.

So in my Security software I have tried turning off Authentication check. I have tried changing the sending SMTP from the ISP to localhost, and cannot get anything to go to the ISP and be sent out.

IS this the proper usage of this software, and if so, what steps should I take to correct my setup.

Thanks.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Using SMTP Relayer with NO Domains

Post by percepts » 2014-07-19 17:32

setup hmailserver as detailed at following

http://www.hmailserver.com/documentatio ... t_up_local

setup one dummy domain such as mydomain.local

then in hmailadmin / settings / protocols / smtp / delivery of email tab

setup smtp relayer details which I assume your ISP provides

then in your software you use your hmailserver IP as the smtp server name as detailed in above link except
you can send to whichever email address you want to send to (even though above link says its only local). Set authentication off in your software.

Try that

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Using SMTP Relayer with NO Domains

Post by percepts » 2014-07-19 17:40

Forgot...

in hmailadmin / settings / advanced / tcp/ip ports

setup

0.0.0.0 / 465 / SMTP

that enables hmail to send out on port 465 which your ISP requires in the smtp relayer.

AND

make sure you have port forwarding open in your router for port 25 and 465

^DooM^
Site Admin
Posts: 13862
Joined: 2005-07-29 16:18
Location: UK

Re: Using SMTP Relayer with NO Domains

Post by ^DooM^ » 2014-07-19 17:47

once setup just run an open relay check against your external ip address to make sure you have set it up correctly and no one from outside can send mail through your mailserver.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

bjsherman
New user
New user
Posts: 4
Joined: 2014-07-19 16:28

Re: Using SMTP Relayer with NO Domains

Post by bjsherman » 2014-07-19 20:49

Thank you for your tips and pointers, and it is looking better, but no quite working yet.
I took screen caps of the various settings, and posted to the following link
https://dl.dropboxusercontent.com/u/634 ... Server.pdf

Also, from the hMail logs, I see the following:

"APPLICATION" 5388 "2014-07-19 12:52:06.265" "Servers started."
"DEBUG" 8256 "2014-07-19 14:34:56.618" "Creating session 6"
"SMTPD" 8256 6 "2014-07-19 14:34:56.618" "127.0.0.1" "SENT: 220 HPDESKTOP ESMTP"
"SMTPD" 4984 6 "2014-07-19 14:34:56.633" "127.0.0.1" "RECEIVED: EHLO HPDesktop"
"SMTPD" 4984 6 "2014-07-19 14:34:56.633" "127.0.0.1" "SENT: 250-HPDESKTOP[nl]250-SIZE 20480000[nl]250 AUTH LOGIN"
"SMTPD" 8928 6 "2014-07-19 14:34:56.633" "127.0.0.1" "RECEIVED: MAIL FROM:<Home@BillSandra.local>"
"DEBUG" 8928 "2014-07-19 14:34:56.633" "Total spam score: 0"
"SMTPD" 8928 6 "2014-07-19 14:34:56.649" "127.0.0.1" "SENT: 250 OK"
"SMTPD" 10220 6 "2014-07-19 14:34:56.665" "127.0.0.1" "RECEIVED: RCPT TO:<wXXXXXXXXXX@gmail.com>"
"SMTPD" 10220 6 "2014-07-19 14:34:56.665" "127.0.0.1" "SENT: 530 SMTP authentication is required."
"DEBUG" 10220 "2014-07-19 14:34:56.665" "AWStats::LogDeliveryFailure"
"SMTPD" 8928 6 "2014-07-19 14:34:56.665" "127.0.0.1" "RECEIVED: RSET"
"DEBUG" 8928 "2014-07-19 14:34:56.665" "Deleting message file."
"SMTPD" 8928 6 "2014-07-19 14:34:56.665" "127.0.0.1" "SENT: 250 OK"
"SMTPD" 10220 6 "2014-07-19 14:34:56.665" "127.0.0.1" "RECEIVED: QUIT"
"SMTPD" 10220 6 "2014-07-19 14:34:56.665" "127.0.0.1" "SENT: 221 goodbye"
"DEBUG" 4984 "2014-07-19 14:34:56.665" "Closing TCP/IP socket"
"DEBUG" 4984 "2014-07-19 14:34:56.665" "Ending session 6"

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Using SMTP Relayer with NO Domains

Post by percepts » 2014-07-19 21:16

on your MyComputer IP-range untick require authentication on local to external.

(alternatively you could tick authentication in your software and enter Home@BillSandra.local and the password and leave authentication on in your ip-ranges). since you are only using it for this single purpose it makes no odds one way or the other.

Are those the only two IP-Ranges you have now. Should be OK but just checking to make sure you are not an open relay.

bjsherman
New user
New user
Posts: 4
Joined: 2014-07-19 16:28

Re: Using SMTP Relayer with NO Domains

Post by bjsherman » 2014-07-19 21:35

Thanks for looking at this. I made the change to untick the require authentication, and there was a bit more movement in the log file, but no mail made it through due to error: sender rejected : invalid sender domain".
And yes, I only have those two ip ranges, some notes I read encouraged removing the internet zone for safety.

"APPLICATION" 5744 "2014-07-19 15:22:51.663" "Starting servers..."
"DEBUG" 7248 "2014-07-19 15:22:51.663" "SMTPDeliveryManager::Start()"
"DEBUG" 4092 "2014-07-19 15:22:51.663" "ExternalFetchManager::Start()"
"APPLICATION" 5744 "2014-07-19 15:22:51.679" "Servers started."
"DEBUG" 6184 "2014-07-19 15:23:38.804" "Creating session 2"
"SMTPD" 6184 2 "2014-07-19 15:23:38.804" "127.0.0.1" "SENT: 220 HPDESKTOP ESMTP"
"SMTPD" 6184 2 "2014-07-19 15:23:38.804" "127.0.0.1" "RECEIVED: EHLO HPDesktop"
"SMTPD" 6184 2 "2014-07-19 15:23:38.804" "127.0.0.1" "SENT: 250-HPDESKTOP[nl]250-SIZE 20480000[nl]250 AUTH LOGIN"
"SMTPD" 5016 2 "2014-07-19 15:23:38.804" "127.0.0.1" "RECEIVED: MAIL FROM:<Home@BillSandra.local>"
"DEBUG" 5016 "2014-07-19 15:23:38.804" "Total spam score: 0"
"SMTPD" 5016 2 "2014-07-19 15:23:38.819" "127.0.0.1" "SENT: 250 OK"
"SMTPD" 6184 2 "2014-07-19 15:23:38.819" "127.0.0.1" "RECEIVED: RCPT TO:<wjsherman@gmail.com>"
"SMTPD" 6184 2 "2014-07-19 15:23:38.819" "127.0.0.1" "SENT: 250 OK"
"SMTPD" 5016 2 "2014-07-19 15:23:38.835" "127.0.0.1" "RECEIVED: RSET"
"DEBUG" 5016 "2014-07-19 15:23:38.835" "Deleting message file."
"SMTPD" 5016 2 "2014-07-19 15:23:38.835" "127.0.0.1" "SENT: 250 OK"
"SMTPD" 5016 2 "2014-07-19 15:23:38.835" "127.0.0.1" "RECEIVED: RSET"
"SMTPD" 5016 2 "2014-07-19 15:23:38.835" "127.0.0.1" "SENT: 250 OK"
"SMTPD" 6188 2 "2014-07-19 15:23:39.522" "127.0.0.1" "RECEIVED: MAIL FROM:<Home@BillSandra.local>"
"DEBUG" 6188 "2014-07-19 15:23:39.522" "Total spam score: 0"
"SMTPD" 6188 2 "2014-07-19 15:23:39.522" "127.0.0.1" "SENT: 250 OK"
"SMTPD" 6188 2 "2014-07-19 15:23:39.522" "127.0.0.1" "RECEIVED: RCPT TO:<wXXXXXXXXXX@gmail.com>"
"SMTPD" 6188 2 "2014-07-19 15:23:39.522" "127.0.0.1" "SENT: 250 OK"
"SMTPD" 6188 2 "2014-07-19 15:23:39.538" "127.0.0.1" "RECEIVED: DATA"
"SMTPD" 6188 2 "2014-07-19 15:23:39.538" "127.0.0.1" "SENT: 354 OK, send."
"DEBUG" 3596 "2014-07-19 15:23:39.538" "Total spam score: 0"
"DEBUG" 3596 "2014-07-19 15:23:39.538" "Saving message: {BB3393FD-462D-4E22-A83B-787C0B093445}.eml"
"DEBUG" 3596 "2014-07-19 15:23:39.600" "Requesting SMTPDeliveryManager to start message delivery"
"SMTPD" 3596 2 "2014-07-19 15:23:39.600" "127.0.0.1" "SENT: 250 Queued (0.000 seconds)"
"SMTPD" 6188 2 "2014-07-19 15:23:39.600" "127.0.0.1" "RECEIVED: QUIT"
"SMTPD" 6188 2 "2014-07-19 15:23:39.600" "127.0.0.1" "SENT: 221 goodbye"
"DEBUG" 6184 "2014-07-19 15:23:39.600" "Closing TCP/IP socket"
"DEBUG" 6184 "2014-07-19 15:23:39.600" "Ending session 2"
"DEBUG" 8096 "2014-07-19 15:23:39.616" "Delivering message..."
"APPLICATION" 8096 "2014-07-19 15:23:39.616" "SMTPDeliverer - Message 4116: Delivering message from Home@BillSandra.local to wXXXXXXXXX@gmail.com. File: C:\Program Files\hMailServer\Data\{BB3393FD-462D-4E22-A83B-787C0B093445}.eml"
"DEBUG" 8096 "2014-07-19 15:23:39.647" "Applying rules"
"DEBUG" 8096 "2014-07-19 15:23:39.647" "Performing local delivery"
"DEBUG" 8096 "2014-07-19 15:23:39.647" "Local delivery completed"
"DEBUG" 8096 "2014-07-19 15:23:39.647" "Performing external delivery"
"APPLICATION" 8096 "2014-07-19 15:23:39.647" "SMTPDeliverer - Message 4116: Relaying to host smtp.XXXXX.net."
"DEBUG" 8096 "2014-07-19 15:23:39.647" "SD::_InitiateExternalConnection"
"DEBUG" 8096 "2014-07-19 15:23:39.647" "Creating session 3"
"DEBUG" 7536 "2014-07-19 15:23:39.944" "SMTPClientConnection::_ParseASCII()"
"SMTPC" 7536 3 "2014-07-19 15:23:39.944" "68.87.26.155" "RECEIVED: 220 omta07.westchester.pa.mail.XXXXXXX.net XXXXXXX ESMTP server ready"
"SMTPC" 7536 3 "2014-07-19 15:23:39.944" "68.87.26.155" "SENT: EHLO HPDESKTOP"
"DEBUG" 7536 "2014-07-19 15:23:39.944" "SMTPClientConnection::~_ParseASCII() - 2"
"DEBUG" 7536 "2014-07-19 15:23:39.991" "SMTPClientConnection::_ParseASCII()"
"SMTPC" 7536 3 "2014-07-19 15:23:39.991" "68.87.26.155" "RECEIVED: 250-omta07.westchester.pa.mail.XXXXXXX.net hello [24.11.87.219], pleased to meet you"
"DEBUG" 7536 "2014-07-19 15:23:39.991" "SMTPClientConnection::~_ParseASCII() - 1"
"DEBUG" 6292 "2014-07-19 15:23:40.007" "SMTPClientConnection::_ParseASCII()"
"SMTPC" 6292 3 "2014-07-19 15:23:40.007" "68.87.26.155" "RECEIVED: 250-HELP"
"DEBUG" 6292 "2014-07-19 15:23:40.007" "SMTPClientConnection::~_ParseASCII() - 1"
"DEBUG" 6180 "2014-07-19 15:23:40.007" "SMTPClientConnection::_ParseASCII()"
"SMTPC" 6180 3 "2014-07-19 15:23:40.007" "68.87.26.155" "RECEIVED: 250-AUTH LOGIN PLAIN"
"DEBUG" 6180 "2014-07-19 15:23:40.007" "SMTPClientConnection::~_ParseASCII() - 1"
"DEBUG" 6292 "2014-07-19 15:23:40.007" "SMTPClientConnection::_ParseASCII()"
"SMTPC" 6292 3 "2014-07-19 15:23:40.007" "68.87.26.155" "RECEIVED: 250-SIZE 36700160"
"DEBUG" 6292 "2014-07-19 15:23:40.007" "SMTPClientConnection::~_ParseASCII() - 1"
"DEBUG" 6180 "2014-07-19 15:23:40.007" "SMTPClientConnection::_ParseASCII()"
"SMTPC" 6180 3 "2014-07-19 15:23:40.007" "68.87.26.155" "RECEIVED: 250-ENHANCEDSTATUSCODES"
"DEBUG" 6180 "2014-07-19 15:23:40.007" "SMTPClientConnection::~_ParseASCII() - 1"
"DEBUG" 6292 "2014-07-19 15:23:40.007" "SMTPClientConnection::_ParseASCII()"
"SMTPC" 6292 3 "2014-07-19 15:23:40.007" "68.87.26.155" "RECEIVED: 250-8BITMIME"
"DEBUG" 6292 "2014-07-19 15:23:40.007" "SMTPClientConnection::~_ParseASCII() - 1"
"DEBUG" 6180 "2014-07-19 15:23:40.007" "SMTPClientConnection::_ParseASCII()"
"SMTPC" 6180 3 "2014-07-19 15:23:40.007" "68.87.26.155" "RECEIVED: 250 OK"
"SMTPC" 6180 3 "2014-07-19 15:23:40.007" "68.87.26.155" "SENT: AUTH LOGIN"
"DEBUG" 6292 "2014-07-19 15:23:40.054" "SMTPClientConnection::_ParseASCII()"
"SMTPC" 6292 3 "2014-07-19 15:23:40.054" "68.87.26.155" "RECEIVED: 334 VXNlcm5hbWU6"
"SMTPC" 6292 3 "2014-07-19 15:23:40.054" "68.87.26.155" "SENT: YmpzaGVybWFu"
"DEBUG" 6292 "2014-07-19 15:23:40.100" "SMTPClientConnection::_ParseASCII()"
"SMTPC" 6292 3 "2014-07-19 15:23:40.100" "68.87.26.155" "RECEIVED: 334 UGFzc3dvcmQ6"
"SMTPC" 6292 3 "2014-07-19 15:23:40.100" "68.87.26.155" "SENT: ***"
"DEBUG" 6292 "2014-07-19 15:23:40.147" "SMTPClientConnection::_ParseASCII()"
"SMTPC" 6292 3 "2014-07-19 15:23:40.147" "68.87.26.155" "RECEIVED: 235 2.7.0 ... Authentication succeeded"
"SMTPC" 6292 3 "2014-07-19 15:23:40.147" "68.87.26.155" "SENT: MAIL FROM:<Home@BillSandra.local>"
"DEBUG" 6292 "2014-07-19 15:23:40.147" "SMTPClientConnection::~_ParseASCII() - 4"
"DEBUG" 6292 "2014-07-19 15:23:40.194" "SMTPClientConnection::_ParseASCII()"

"SMTPC" 6292 3 "2014-07-19 15:23:40.194" "68.87.26.155" "RECEIVED: 550 5.1.0 <home@billsandra.local> sender rejected : invalid sender domain"

"SMTPC" 6292 3 "2014-07-19 15:23:40.194" "68.87.26.155" "SENT: QUIT"
"DEBUG" 5628 "2014-07-19 15:23:40.194" "The read operation failed. Bytes transferred: 0 Remote IP: 68.87.26.155, Session: 3, Code: 335544539, Message: short read"
"DEBUG" 8096 "2014-07-19 15:23:40.194" "SD::~_InitiateExternalConnection-5"
"DEBUG" 8096 "2014-07-19 15:23:40.194" "Ending session 3"
"DEBUG" 8096 "2014-07-19 15:23:40.194" "SD::~_DeliverToExternalAccounts-1"
"DEBUG" 8096 "2014-07-19 15:23:40.194" "Collect delivery result"
"DEBUG" 8096 "2014-07-19 15:23:40.194" "AWStats::LogDeliveryFailure"
"DEBUG" 8096 "2014-07-19 15:23:40.194" "AWStats::LogDeliveryFailure"
"DEBUG" 8096 "2014-07-19 15:23:40.194" "Collect delivery result - Done"
"DEBUG" 8096 "2014-07-19 15:23:40.194" "SD::_SubmitErrorLog"
"DEBUG" 8096 "2014-07-19 15:23:40.194" "Saving message: {E39C848E-14BC-4914-9DE7-DE73887282E4}.eml"
"DEBUG" 8096 "2014-07-19 15:23:40.210" "SD::~_SubmitErrorLog"
"DEBUG" 8096 "2014-07-19 15:23:40.210" "Deleting message"
"DEBUG" 8096 "2014-07-19 15:23:40.210" "Deleting message file."
"APPLICATION" 8096 "2014-07-19 15:23:40.210" "SMTPDeliverer - Message 4116: Message delivery thread completed."

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Using SMTP Relayer with NO Domains

Post by percepts » 2014-07-19 21:52

Looks like your ISP is only allowing sending from its own local domains.

In your MyComputer IP-Range, untick external to external requires authentication

and in your software use an email address you have setup on your ISP relay as the sender. The same user as you specified in smtp relayer will probably work if that was an email address.

I think that should do it.

bjsherman
New user
New user
Posts: 4
Joined: 2014-07-19 16:28

Re: Using SMTP Relayer with NO Domains

Post by bjsherman » 2014-07-19 22:23

SUCCESS. Thank you all so much.

"SMTPC" 7832 9 "2014-07-19 16:09:39.710" "68.87.26.155" "RECEIVED: 250 2.0.0 UL9e1o00E4jweYw3ZL9eXL mail accepted for delivery"

Now, that it is connecting and sending, what should I close up/tighten/lock down? Are there any tips for making it more secure to protect against becoming a spam target?

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Using SMTP Relayer with NO Domains

Post by percepts » 2014-07-19 22:28

Since you only have IP 127.0.0.1 and a lan address in IP ranges (neither of them public IPs) I don't think it's possible for anyone externally (they would need to use a public IP which your setup doesn't allow) to send to you or from you so its about as secure as possible from that aspect.

Post Reply