![]() |
|
#1
|
||||
|
||||
|
The following patch failed to apply correctly into my tree and started getting the following error. [WARN]: [Parser] Invalid 'From' address: Array. But my bigger concern is that the mail was lost. I though if the Parser failed the messages were moved in failed? We lost about 10 hours worth of tickets before I figured out was going on. The question I have is why wasn't the messages moved to fail. Note the issue with the patch is for so reason the new lines were added but the removed lines weren't removed. Should a failure in the pre-processor send the message to fail?
Thanks Robert http://github.com/wgm/cerb4/commit/5...3d5a7c58834b71 Last edited by rmiddle; 08-09-2009 at 03:17 PM. |
|
#2
|
||||
|
||||
|
It *should* leave failed messages in /storage/mail/fail; but how did your patch fail? Was it a bad merge with Git? The code can't always handle a bad merge gracefully -- especially with a subtle 'warning' level error that results from it.
You should not count on /storage/mail/fail to be your only defense, and then be surprised if something ate mail; especially if you run development versions or have local changes. If your business mail is important (and it should be) then send a copy of all your incoming mail to an 'audit' mailbox as well as the POP3 dropbox you have Cerb4 pull from. You can purge it every couple days from the mail server, but if you suspect a problem (like this) you can 'grep' the mail headers and move the messages into /storage/mail/new for delivery (by date or anything). We do the same kind of thing on our live helpdesk. We have an external copy of every message we receive. We spot check it occasionally against the messages table. If we set up a filter that ate something, we can always recover it. It should only take a couple minutes to set up a mail account that's both a mailbox and a redirect. You can even redirect a copy to Gmail or something. It's something the code has to be conscious of, but you need to be conscious of as an admin as well. ![]()
__________________
Jeff Standen, Cerb5 Architect, WebGroup Media LLC. LinkedIn | GitHub Resources: Knowledgebase | Wiki | Bugs/Wishlist | Book | Help Stay informed: Facebook | Twitter |
|
#3
|
||||
|
||||
|
Quote:
Link to the commit were I commented out the sections that was left in my code. This solved the processing problem. http://github.com/rmiddle/cerb4/comm...e697c537ef58f2 Thanks Robert |
|
#4
|
||||
|
||||
|
To make it clear. The problem was mine for the Parser failing. My concern is that since from format changed I was pushing an error and returning Null. That should have either stopped all processing or moved the mail to fail shouldn't it? I have't looked at the calling function to know how it handles Null. But the current code still returns Null on error? It also looks like it returns NULL on bounce, redirect, or blackhole. Does this mean that errors in this functions just throws the mail away?
Thanks Robert |
|
#5
|
||||
|
||||
|
I'd have to test and reproduce it. It's possible.
Though if "errors of this kind" mean merges that mix two difference releases into a single codebase, that shouldn't happen in production. |
|
#6
|
||||
|
||||
|
Quote:
static public function parseMessage(CerberusParserMessage $message, $options=array()) { You have. switch($action_key) { case 'blackhole': return NULL; break; and if(null == ($fromAddressInst = CerberusParser::getAddressFromHeaders($headers))) { $logger->err("[Parser] 'From' address could not be created."); return NULL; } Thanks Robert |
|
#7
|
||||
|
||||
|
Did a little more digging and found this is the code that calls that function. It doesn't do anything with the return at all. It just removes the file. So if some place else in the code it doesn't copy the file out then this will wipe it out. I think some error checking needs to be inserted.
PHP Code:
Thanks Robert |
|
#8
|
||||
|
||||
|
Ok after have a good nights sleep I looked over the code and I think I can fix this with only a handful of changes. First up a few changes to ParseMessage
PHP Code:
PHP Code:
plugins/usermeet.core/api/sc/uri/contact.php plugins/cerberusweb.webapi/api/App.php Last edited by rmiddle; 08-07-2009 at 09:05 PM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| lost the abilty to permalink to KB | itbackoffice | Priority Support for VIPs | 6 | 02-03-2010 05:51 PM |
| Flagged by in 3.6 lost upon import to 4.1? | wils | Priority Support for VIPs | 4 | 06-04-2009 09:50 PM |
| Patch.php script failing | bbillings | General Help | 2 | 04-05-2009 04:13 AM |
| Blog: Important Security Patch! | dsugita | Announcements | 3 | 05-16-2008 09:08 PM |
| Customize Settings Lost on Log Out | Carl@AWS | General Help | 5 | 11-27-2007 12:03 AM |