Postie Question - Thread Updated to Include Server Log Snippets

Started by MrLeadFoot, July 11, 2016, 09:47:38 PM

Previous topic - Next topic

MrLeadFoot

I have been using Postie for quite a while now, and have some questions.

I can see how kInit might open a connection at the mail server, and Postie passing kDest and kSendText info to send a message, but how does the connection then get closed? I noticed that there is no function to close a connection once one has been opened, thus assume that the connection is somehow closed automatically (by kSendText maybe?) sometime after the message is sent. If that is the case, how long after the message is sent does this occur?

I'm asking because I am currently using kInit, kDest then kSendText for each message when sending multiple messages, but this process causes problems with some servers, so I would like to know if I can just keep the connection to the server open and pass the info for each message sequentially, like maybe a kDest and kSendText for each message in the group. In other words, can a single kInit statement be used with multiple KDest and kSendText statements when sending more than one message? I suspect that the answer is "no", being that there is no mention of using a "k" function to manually close a connecion.

Along this same vein, is there a function or parameter to have a "Reply To" address that's different than the "From" address?

Suggestions and comments would be appreciated.

MrLeadFoot

Looks like I was barking up the wrong tree.

It looks like Postie may acutally not be doing some things quite right. Below is a snippet from a mail server log in regards to messages being sent via Postie. Note that I have redacted portions of the ip addresses and email addresses to protect the innocent.  ;D

Jul 12 14:05:44 [76.201.85.yyy:xxxxx][US]SMTP Server: Open session [24.129.zzz.yyy]
Jul 12 14:05:44 [76.201.85.yyy:xxxxx][US]SMTP Server: AUTH failed, username , password
Jul 12 14:05:45 [76.201.85.yyy:xxxxx][US]SMTP Server: Authenticated, username abcdefghi, method LOGIN
Jul 12 14:05:45 [76.201.85.yyy:xxxxx][US]SMTP Server: Forwarded Msg 83LHG00. To: recipient@recipeintsdomain.com, From: sender@sendersdomain.com
Jul 12 14:05:45 [76.201.85.yyy:xxxxx][US]SMTP Server: Close session

Note that Postie fails an initial authorization attempt, possibly due to Postie not sending/formatting something quite correctly, but then follows up with another login attempt which is being accepted. While this in itself may not look important, believe me it is. Due to the arduous attempts to thwart spammers, today's mail servers have spam-detection logic built-in. This particualr server looks for 10 login failures from a sending IP address within 60 seconds, which can easily happen in a working office environment, and/or if batches of messages are being sent. When this happens, the logic of the spam-detector blocks the IP address for 20 minutes, as indicated by the related log snippet below. This means that NO ONE at this IP address can send a message for 20 minutes. Can you imagine the panic that ensues when an entire company can't send messages?

Jul 12 14:19:47 [76.201.85.yyy:xxxxx][US]SMTP Server: Open session [24.129.zzz.yyy]
Jul 12 14:19:47 [76.201.85.yyy:xxxxx][US]SMTP Server: AUTH failed, username , password
[W] Jul 12 14:19:47 SMTP AUTH: 10 failures in 60 seconds -- 76.201.85.yyy blocked for 20 minutes

I know how much the folks at WinBatch hate the word "bug", so I will refrain from using it. Let's just say that by all indications, it would appear that Positie could very well have some issues.

Any suggestions or comments are most welcome.

td

Since you have decided the cause is a bug in the Postie extender, use something else to send your email messages.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

MrLeadFoot

I didn't say definitively that it was a bug. I can't know that for sure, because I did not write the function. I said that Postie "appears" to have issues. What does it look like, to you, based on my report and log snippets? Do you think there is anything that can be done on my end, given your knowledge of Postie and its functions? Or, is it something that you can look into?

I would prefer not to use another e-mail program. I had previously been using WB2004A with an older version of Postie for years and never had this problem. I upgraded because of the need for TLS/SSL support, but am encountering this "problem" (perhaps that's a better choice of words?).

Edit: When I look back at my post, I can see how you might be offended by my choice words. For that, I apologize. I'm just one of those "matter-of-fact" type people. I didn't consider that you're probably sick of dealing with all the questions after all these years, and are on your way out. I will try to be more considerate, and choose my words more carefully in the future. Can we get get a clean start here?  :-[

td

I stand corrected and to rephrase then.  Since you have stated that 'by all indications, it would appear'  that the cause is a bug in the Postie extender, use something other than the Postie extender to send your email messages.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

MrLeadFoot

I guess what I meant was, "from what I can find on the documentation on how Postie statements work, and by what we've experienced, I wonder if..."

That said, WinBatch has always been a great tool to use to put into place creative, out-of-the-box ideas. Sure, it can't do everything, nothing can, but I was wondering if there's a way with Postie to open a session on a server, and keep that session open so that multiple messages can be passed before closing a session? Or, does a one of the required functions automatically close the connection, thereby requiring the kInit to be stated for every message? For example, in my mind, what I am trying to describe might look something like this:

kInit....
kDest....
kSendMessage...
kDest....
kSendMessage...
kDest....
kSendMessage...

Or, does kSendMessage automatically close the session after sending?

MW4

I actually have some issues with it as well in the not closing and it kluges up outlook when postie sends.

This is an interesting thread, waiting for the response.

td

Quote from: MW4 on July 13, 2016, 07:38:43 PM
I actually have some issues with it as well in the not closing and it kluges up outlook when postie sends.

This is an interesting thread, waiting for the response.

The documentation for the kInit function more or less describes its functionality, "This function initializes and sets a number of global variables, to be used in the kSendText, kSendFile, kGetMail, and kManageImap4 functions."  That is all it does. It assigns the supplied parameter values to extender global variables (actually to an extender class's static variables but that is a distinction without meaning in the context of the function documentation.)  The same is true of the kDest function, "Required function to set up global variables for other functions in this extender."

The Postie extender is used many times daily in-house on both servers and desktop workstations.   There has never been a report of the extender interfering with the operation of Outlook or any other email client on any of those systems.  That doesn't mean that it's not happening but given that the extender doesn't make any  changes to the system other than possibly writing a file to the file system, its possible effect on other email clients is very limited. There is some remote possibility that it could interfere with another email client because of abnormal termination from a system error.  And if that happened, the extender would let you know about it on it's way out the door.

There are multiple articles on the extender in the Tech Database so it is good place to look for more information.  Just search on 'postie'.  If you want to really know how it works, you can always read the RFC for the SMTP protocol.  There is a link to that in the Tech Database as well or you can just perform a web search to find a copy.   

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

MrLeadFoot

Thanks for the reply. I guess the Postie extender itself controls the opening and closing of a session, not the k functions. So, is it safe to assume that we can't open a session and keep it open while multiple messages are sent via multiple successive ksends before the session is closed, and that Postie is designed to close a sessiom after a ksend statement is processed, therefore we must kinit again before before each ksend?