fixed the underscore in email addresses

This commit is contained in:
SJ 2012-11-28 23:54:55 +01:00
parent b137a1b0ef
commit 34568e7d82
3 changed files with 4 additions and 2 deletions

View File

@ -13,7 +13,7 @@
#define VERSION "0.1.22"
#define BUILD 729
#define BUILD 731
#define HOSTID "mailarchiver"

View File

@ -512,6 +512,8 @@ void translateLine(unsigned char *p, struct _state *state){
if( (state->message_state == MSG_RECEIVED || state->message_state == MSG_FROM || state->message_state == MSG_TO || state->message_state == MSG_CC || state->message_state == MSG_RECIPIENT) && *p == '@'){ continue; }
if( (state->message_state == MSG_FROM || state->message_state == MSG_TO || state->message_state == MSG_CC || state->message_state == MSG_RECIPIENT) && *p == '_'){ continue; }
if(state->message_state == MSG_SUBJECT && (*p == '%' || *p == '_' || *p == '&') ){ continue; }
if(state->message_state == MSG_CONTENT_TYPE && *p == '_' ){ continue; }

View File

@ -646,7 +646,7 @@ class ModelSearchSearch extends Model {
private function fix_email_address_for_sphinx($email = '') {
$email = preg_replace("/\|@/", "|", $email);
return preg_replace("/[\@\.\+\-]/", "X", $email);
return preg_replace("/[\@\.\+\-\_]/", "X", $email);
}