OpenPop and Web Beacons error with GetMessages - email

Has anyone working with OpenPop get errors when the emails being processed have web beacons in them? I have two services that process inboxs, extracting attachments, and creates blobs for processing, but whenever an email that has a web beacon (code to single back to the mothership) the openPop dies on GetMessages. If I forward the message right back to the same mailbox, the forward removes the web beacon and all is well.
We had to setup an OWA rule that detects messages, for example from quickbooks#notification.intuit.com and forwards them right back to the same inbox. This automatically cleans out the web beacon, but the sender is no longer known and we cannot notify them and let them know we received their invoice.
Not sure how to get rid of the web beacons, but retain the sender.
Any help appreciated.
Here is where it dies, and what the error is:
Errors I trap
1/3/2017 7:47 PM: ProcessAllMessages - GetAllMessages Exception - Length cannot be less than zero.
Parameter name: length
1/3/2017 7:47 PM: ProcessAllMessages - Retrieved 0 out of 1 email(s) successfully.

We had to move off of the OpenPop as it appears there were just some core issues handling certain mime types that came in by email. Since no one can control devices, email clients of email senders we needed a more robust solution that handled exceptions rather than quit at an exception.
We migrated/rewrote using exchange web services
https://msdn.microsoft.com/en-us/library/office/dn567668.aspx
it was pretty easy to migrate the code as we only had to change connections and a few basic objects. The majority of the framework we had written was not changed at all.

Related

Mailkit - fetch & search not returning new mails after a while

For some time I was using an IMAP-subscribe/event MailKit based solution to gather & identify new mails which worked reliably. Suddenly a strange behaviour appeared: the first few events were fired but then MailKit seemed not to receive any new CountChanged events - even though the connection remained online.
So I tried to switch to a simple sleep-60 loop that fetches all mails in the inbox which worked - for some iterations. After a few minutes the fetch command did not return new mails anymore. The system behaves like there is a cache that is not updated after a while so MailKit always receives the same results - for both, event-based as well as polling-fetch/search methodology. I do not know whether there have been changes to the Exchange system.
Does anyone have a clue what the reason for this behaviour could be or in what directions I continue my investigations?
MailKit 2.1.3.0, Exchange version couldn't be determined

Processing e-mail in Odoo 11 without previous threads – is this possible?

This Odoo company we're working with basically sends a lot of e-mail. One e-mail thread can turn into 100+ e-mails with different people brought into the conversation (CC'd) at different times. Due to the complexity of their e-mail management, they want to use their Gmail interface (Google Hosted) and CC an e-mail into odoo and they want it to get tracked in a thread. I've basically already done that... they have an e-mail like odoo+res.partner-432#domain.com (although it's hashed to not be easily readable) - they CC this and the full body thread gets included in chatter (mail.message) under respective model / id.
The challenge with this: the chatter messages can get huge very fast, due to their e-mail messages (because each e-mail includes main reply, and all previous history on thread). I've looked into some systems that have a "reply above this line" - and it just takes the latest message. And in those systems, eg. ticketing systems such as Zendesk, help scout, I believe the teams are using the ticketing system (not a gmail) and thus there is much more control over the inbox and incoming email (not to mention, those e-mails are usually 1-to-1, not including groups).
My questions:
Is there any other workaround that you see here to have odoo pull in only the last e-mail reply and not the full e-mail thread? I could probably build something like this: https://github.com/zapier/email-reply-parser - and hook it into odoos e-mail parsing, but that works on text format e-mails only (not HTML)... only. So it's not bulletproof, and I'm not sure it's worth it.
Even if this client DID use odoo 100%, I still don't think it would be possible to get it to work the way they want without major customizations (eg. Odoo's default behavior is to include all past e-mail threads)
I'm curious if anyone here see's any other solutions, otherwise – I doubt there is something here I haven't seen. :) (But very open to be proven incorrect!)

PHPlist - running it from localhost with tracking via live website

I've got a significantly large mailing list - 50K+ subscribers. To avoid stressing my servers, I would like to avoid sending emails through a components embedded on my website. Sending through here sends the CPU usage through the roof - so I'd like to be able to send emails locally. I can easily send emails through mandrillapp, so sending the emails out is not a problem. However, I've hit a bit of a snag.
Phplist seems to assume it is living on a public site, and inserts tracking info which routes the users to a phplist directory on my site (which obviously) does not exist.
Question 1: First of all, I'd like to avoid embedding this tracking - is this possible? Or else is there someway to include it and avoid the 404 error. Would I have to install phplist anyway on the server?
Question 2: I've already got acymailing to handle unsubscribes, so is it actually possible to keep this in place - just to make sure the acymailing is still my point of reference?
Question 3: How do people handle sending out large mailing lists? I know CampaignMonitor, MailChimp etc, but these get a bit expensive for my situation. I'd like to keep sending "internally" so to speak. Is there an elegant solution which will NOT kill my server but is not too expensive? I know I want to have the cake and eat, but it would be nice to hear what people out there are doing.
TIA
David

iPhone App, server-side component, parse integration

This will be my first iOS app with any bit of complexity. I'd like to outline the components and structure to get some feedback before I dive into attempting it.
From the user's perspective, the app monitors the water level of a local lake and receives push notifications when the water level changes a user-specified amount. I think using Parse will be easiest to manage user data and I will attempt a Node.js server-side component on Nodester (I know some basic JS and figure its an good up and coming language to get familiar with). Here's how I see it working...
The user creates an account on the device and specifies a lakeLevelChange amount in which they will receive a push notification. The user's data is pushed to Parse's data mgt.
The server side component will run this program 3-6 times a day:
Pulls a currentLakeLevel via HTTP request
Pulls user data from Parse
Compares the currentLakeLevel to the user specified lakeLevelChange
If the difference is => lakeLevelChange, a push notification HTTP Post request is sent, per user which their specified condition is met
Parse receives POST request and sends a push notification to APNS server
Client receives push notification
It actually doesn't sound terribly complex when its typed out. Is this the proper way of structuring this functionality? Am I missing anything? Suggestions are greatly appreciated!
Bit of a logic problem:
The server side component will run this program 3-6 times a day:
Pulls a currentLakeLevel via HTTP request.
Pulls user data from Parse
Compares the currentLakeLevel to the user specified lakeLevelChange
If the difference is => lakeLevelChange, a push notification HTTP Post request is sent, per user which their specified condition is met
You actually need to store the level at last alert for each user, too. Otherwise incremental changes could creep over your users' threshhold and never trigger an alert.
Imagine if I said I want to be alerted when the level has changed by 6 inches. You then record seven events in which the level rises by an inch each time. At no point did you observe more than 6 inches of change, but the total change is over my threshold for notification, and I probably meant to have you notify me about that.
So when you fire an alert, you need to store the current level, and then on each change event, you compare that to the last level you notified them about.
You're missing the unhappy path. It's the path programmers never travel while programs always travel. Nothing goes the way we plan it so we have to plan for failures. Ask yourself questions like, "What happens when the server powers down for maintenance or outages and misses one or all of its 3-6 scheduled runs?" "Should the missed executions queue up and send out a bunch of missed notifications?" "What happens when the user changes what they specified as lakeLevelChange but the radio is out and/or the server request cannot complete?" "What happens when Parse gets garbage data in or produces garbage date?" Asking just a few of these will steer you towards an optimal design.

Periodical status messages by Jopr?

I'm evaluating Jopr 2.3.1 to monitor a JBoss 4.2.3 Application Server.
Jopr, based on the better known RHQ Project from Redhat, supports to send email notifications triggered by so called alerts. Alerts can be defined to react to certain changes of system parameter such as metrics (e.g. 'Active Thread Count', 'JVM Free Memory') or the availability (e.g. goes UP, goes DOWN) changes.
I'm now wondering if it's also possible to send a for instance weekly status report by email?
Just to make sure: This email notification is to be send periodically, indipendent of the regular alter notification, rather problems occured or not.
Many thanks in advance - every hint is appreciated
Tobias
RHQ 3 (anything Jopr related is old and outdated) has server side plugins.
They can be alert notification senders that let you e.g. connect to a trouble ticket system for alert notifications.
They can also be more generic and can be triggered periodically via an "internal cron". The latter may be what you want for report sending. In fact, Mazz has already written an example plugin generating a report on file system - you would only need to change the "write to disk" to "send email".
http://rhq-project.org/