FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > Email & Mailing List Management
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 05-29-2004, 08:32 PM   Postid: 113026
Neo541
Registered User

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Apr 2003
Location: 127.0.0.1
Posts: 25
EFM 1.12 Debug Log

I just upgraded from 1.11 to 1.12, and had a quick question.

I've noticed in the new version that I am unable to see the text of email messages in the debug log. I used this to add to my banned words filters, and feel lost without it!

Am I doing something wrong, or any way to put it back?

If not, I think i'll have to go back to 1.11
Neo541 is offline   Reply With Quote
Old 05-30-2004, 02:25 AM   Postid: 113044
sheila
Site Owner
 
sheila's Avatar

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Aug 1999
Location: Metro Los Angeles Area
Posts: 7,398
You might try this...

Look in your emailfilter_n.py file where "n" is replaced with the filter number.

Find this line:

Code:
    #debug('parsed message:\\n%s' % str(msg))
It comes in this section:
Code:
raw_message = StringIO(sys.stdin.read())

try:
    smart_parser_obj = efm_Parser()
    msg = smart_parser_obj.parse(raw_message)
    #debug('parsed message:\\n%s' % str(msg))
    #msg = email.message_from_file(raw_message)
except email.Errors.MessageError:
    import rfc822
    from cStringIO import StringIO
From the line

#debug('parsed message:\\n%s' % str(msg))

Remove the # character at the front of the line in front of the word "debug", moving the entire line to the left one character, so that it is lined up with the front of the lines above and below it.

This will cause the full raw message to be written out to the debug file. It will also make your debug file grow large much more quickly.

Let me know if this does what you want...

spelling correction...
__________________
sheila
http://www.thinkspot.net/sheilaruns/

Last edited by sheila : 05-30-2004 at 02:41 AM.
sheila is offline   Reply With Quote
Old 05-30-2004, 02:27 AM   Postid: 113045
sheila
Site Owner
 
sheila's Avatar

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Aug 1999
Location: Metro Los Angeles Area
Posts: 7,398
P.S. Before doing this, I would recommend saving a backup of the emailfilter_n.py file.

You might find it convenient to do this editing through the File Manager in your CNC. The File Manager will automatically offer you the option to save a backup when you go to save the modified file.
__________________
sheila
http://www.thinkspot.net/sheilaruns/
sheila is offline   Reply With Quote
Old 05-30-2004, 02:45 AM   Postid: 113046
Neo541
Registered User

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Apr 2003
Location: 127.0.0.1
Posts: 25
Sheila,

Thanks for the reply!

I tried what was suggested, and I got this error in my error log:

Quote:
[*** Sun May 30 02:40:33 2004 ***
Traceback (most recent call last):
File "/big/dom/xMYSITE/emailfilter/emailfilter_1.py", line 297, in ?
msg = smart_parser_obj.parse(raw_message)
File "//usr/lib/python2.2/email/Parser.py", line 62, in parse
self._parseheaders(root, fp)
File "/big/dom/xMYSITE/emailfilter/emailfilter_1.py", line 98, in _parseheaders
raise email.Errors.HeaderParseError(
HeaderParseError: Not a header, not a continuation: `` version=2.63'
'

Also, the email did not go through. Any thoughts?
Neo541 is offline   Reply With Quote
Old 05-30-2004, 02:49 AM   Postid: 113047
sheila
Site Owner
 
sheila's Avatar

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Aug 1999
Location: Metro Los Angeles Area
Posts: 7,398
That error was not caused by the change I suggested.

That error would have occured for the particular email that triggered it whether you made the change I suggested or not.

Basically, there are some emails that are so badly formatted (not conforming to Internet email standards) that the email parsing library that EFM uses will throw an error on such emails and not parse them.

We are currently working on a fix for this problem in EFM.

Send yourself a lil ol' test email and see if the change that I suggested does what you requested. Don't send yourself a known spam or virus email for the test, as a possible spam or virus email may trigger the parsing error that you just shared.

Does this make sense?
__________________
sheila
http://www.thinkspot.net/sheilaruns/
sheila is offline   Reply With Quote
Old 05-30-2004, 02:52 AM   Postid: 113048
sheila
Site Owner
 
sheila's Avatar

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Aug 1999
Location: Metro Los Angeles Area
Posts: 7,398
Question about your debug files:

What permissions are set on them? Depending on when you initially installed EFM vs. when you upgraded, the PHP file that writes out the filters may have not run under Secure Mode TM earlier, but may have this time. Thus, the permissions on the debug files may no longer allow EFM to write to them.

Make sure that the debug files have perms 664, if they do not already.
__________________
sheila
http://www.thinkspot.net/sheilaruns/
sheila is offline   Reply With Quote
Old 05-30-2004, 02:53 AM   Postid: 113049
Neo541
Registered User

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Apr 2003
Location: 127.0.0.1
Posts: 25
Makes perfect sense, except the test one I sent created that error.

Also, it set into motion a repeating error, since I had it set to email me with any errors. So, it tried to notify me of an error, that one had an error, so it tried again, and so on.

I replaced that file with my backup and all is normal again.

I'm quite sure that the only change I made was removing the #, but I suppose I could try it again to make sure.
Neo541 is offline   Reply With Quote
Old 05-30-2004, 02:55 AM   Postid: 113050
Neo541
Registered User

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Apr 2003
Location: 127.0.0.1
Posts: 25
dbmail_1.debug and dbmail_1.rjct are set at 644.

emailfilter_n.py are all at 775.

filter_data_n.dat are all at 644.

Which should I switch to 664?
Neo541 is offline   Reply With Quote
Old 05-30-2004, 02:58 AM   Postid: 113051
Neo541
Registered User

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Apr 2003
Location: 127.0.0.1
Posts: 25
Sorry to keep replying, but I do get something in my debug log. For example:

Quote:
*** Sun May 30 02:49:39 2004 ***
dumping header data: for MssgID: <20040530064938.10420.qmail@neo.futurequest.net>
Date: "30 May 2004 06:49:38 -0000"
Subject: Reply to post 'EFM 1.12 Debug Log'
from addys: "FutureQuest Community Forums Mailer" <Service@FutureQuest.net>
to addys: me@myemail.com

*** Sun May 30 02:49:39 2004 ***
Passed banned headers check

*** Sun May 30 02:49:39 2004 ***
Extensionlist is []

*** Sun May 30 02:49:39 2004 ***
Checking for banned words.

*** Sun May 30 02:49:39 2004 ***
message main type is text or None

*** Sun May 30 02:49:39 2004 ***
passed banned-word check

*** Sun May 30 02:49:39 2004 ***
system exit--0
Most of that is the same, but the part that has changed is:

Quote:
message main type is text or None
instead of actually having the message displayed, so I could read the text.
Neo541 is offline   Reply With Quote
Old 05-30-2004, 02:58 AM   Postid: 113052
sheila
Site Owner
 
sheila's Avatar

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Aug 1999
Location: Metro Los Angeles Area
Posts: 7,398
Quote:
Originally posted by Neo541:
dbmail_1.debug and dbmail_1.rjct are set at 644.

emailfilter_n.py are all at 775.

filter_data_n.dat are all at 644.

Which should I switch to 664?
dbmail_1.debug and dbmail_1.rjct should be 664.

An alternative fix, is to simply delete the debug, rjct and err files and let the script recreate them, as it will recreate them with the correct permissions.

Is anything at all being written to your debug files? If the debugging option is turned on, and you send an email through the filter, then there should be at least some small amount of info written to the debug file. At the very minimum, it indicates that an email was received.

If you are not getting even that, then the file permissions are probably the issue.
__________________
sheila
http://www.thinkspot.net/sheilaruns/
sheila is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 06:20 PM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.