[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - filter in OnAdd Event causes download failure

filter in OnAdd Event causes download failure

Help and advice on using Barca

Moderators: Eric, Tomas, robin

filter in OnAdd Event causes download failure

Postby ChrisKnight » Tue Aug 21, 2007 11:46 am

I discovered something today that doesn't make sense to me. I'm hoping someone has some knowledge as to why Barca behaved this way.

What I did was create a simple filter to be run on the OnAdd event of the In box. The filter looked at the from for an exact match of "spamcop@devnull.spamcop.net" and if it is found move the email to a subfolder of the In box called "! SpamCop". That is it, pretty simple. What happened though is Barca stopped auto-downloading email and reported that there had been and error and to look in the error log and like normal the error log did tell me anything except that mail was left on the server.

What I then did was disable the event and click the check mail and everything downloaded as expected.

I deleted the event and created a pre-download filter identical to the one described previously and this works as expected.

Does anyone know why one works and one does not?

Thanks,
Chris
ChrisKnight
Poco Tourist
 
Posts: 26
Joined: Sat Jul 01, 2006 6:27 am
Location: Portland, OR

Re: filter in OnAdd Event causes download failure

Postby Eric » Wed Aug 22, 2007 12:36 am

ChrisKnight wrote:I discovered something today that doesn't make sense to me. I'm hoping someone has some knowledge as to why Barca behaved this way.
No knowledge about that, but I don't use Events this way.
What I did was create a simple filter to be run on the OnAdd event of the In box. The filter looked at the from for an exact match of "spamcop@devnull.spamcop.net" and if it is found move the email to a subfolder of the In box called "! SpamCop". That is it, pretty simple.
Don't know why you created an OnAdd event, since those actions can be done through an incoming filter or a pre-download filter.
Doesn't make much sense to use an Event :?:
What happened though is Barca stopped auto-downloading email and reported that there had been and error and to look in the error log and like normal the error log did tell me anything except that mail was left on the server.
An event doesn't work on the server, only a pre-download filter.
Weird why it stopped the download for those messages. :?

FYI: Moving this topic to Barca instead of Junk Mail Filtering. :wink:
Eric
 

Postby ChrisKnight » Wed Aug 22, 2007 3:08 am

Eric,

I should thank you for at least replying. Unfortunately it doesn't seem that you know why Barca behaves this way.

I should ask you since you stated that, "Doesn't make much sense to use a Event", Why?

Yes it can be done with a pre-download filter as I stated I did. My first choice was an event. My line of thinking is the filter would only run if something was put in the IN basket, not on every header that is on the server that the pre-download filter must examine to see if it matches the filters rules.

Do YOU know a reason why it should not be an Event? (Other than the obvious it isn't working, though I have no reason yet to believe that is by design and not a bug. The documentation does not mention this scenario as a problem. And for that matter, if it would be a problem, then the program should not allow me to create the event in the first place.)

~Chris
ChrisKnight
Poco Tourist
 
Posts: 26
Joined: Sat Jul 01, 2006 6:27 am
Location: Portland, OR

Postby Eric » Wed Aug 22, 2007 3:22 am

ChrisKnight wrote:I should thank you for at least replying. Unfortunately it doesn't seem that you know why Barca behaves this way.
My pleasure Chris.
I never used an event like you did, so unless I try it myself, I won't know if I can obtain the same results. :?
Yes it can be done with a pre-download filter as I stated I did. My first choice was an event. My line of thinking is the filter would only run if something was put in the IN basket, not on every header that is on the server that the pre-download filter must examine to see if it matches the filters rules.
IMO an OnAdd event should be used to reply with a template or to execute a script or adding a label, not move to another folder.

If you create an incoming filter, like you already did (pre-download), than it will filter those messages which meet the condition you set.
Do YOU know a reason why it should not be an Event?
NO, although I personally will never use an Event to move an incoming message.
(Other than the obvious it isn't working, though I have no reason yet to believe that is by design and not a bug.
Not sure why it won't work. Will have to try that out to see if I can reproduce it. :)
The documentation does not mention this scenario as a problem. And for that matter, if it would be a problem, then the program should not allow me to create the event in the first place.)
There's not a lot to be found in that documentation. Most tips & tricks can be found here on the forum.
No-one ever mentionned using an OnAdd event to move messages, so I don't know if it causes problems.

Will report back with my findings about it. :wink:
Eric
 

My results

Postby Eric » Wed Aug 22, 2007 4:14 am

I create an OnAdd event to move the message from my In folder to my Follow Up folder if it contained the subject 'Test OnAdd'.

Next I sent a message from my other email client to Barca.
The message comes in and is moved by the event to my Follow Up folder. :)

Image

However on the next mailcheck I do receive an error, but when viewing the log it says one message on the server.
Code: Select all
Checking mail for Eric (22/08/2007 19:53:36)...

Logging into in.telenet.be POP server as user <snip>
1 message waiting on server;
Viewing the Online folder shows the same message which was downloaded previously.
Deactivating the event deletes this message from the server when a mailcheck occurs. :shock:

Why Barca does that, I really don't know.
There's something wrong when using an event OnAdd which moves a message, so it confirms your findings Chris. :wink:
Eric
 

Postby ChrisKnight » Wed Aug 22, 2007 6:53 am

Hi Eric,

Thank you for the confirmation that my observation can be duplicated.

Now we wait to see if one of the people in the know at PSI will take the time to read this forum thread and comment on the behavior.

~Chris
ChrisKnight
Poco Tourist
 
Posts: 26
Joined: Sat Jul 01, 2006 6:27 am
Location: Portland, OR

Postby Eric » Wed Aug 22, 2007 7:33 am

ChrisKnight wrote:Thank you for the confirmation that my observation can be duplicated.
You're welcome Chris. :)
Now we wait to see if one of the people in the know at PSI will take the time to read this forum thread and comment on the behavior.
They do read all, but better to send it to Support, in case they missed it.

Take care. ;)
Eric
 


Return to Barca Help and How-To

Who is online

Users browsing this forum: No registered users and 2 guests

cron