There is nothing built in. It shouldn’t be too difficult in a filter. Can you post what you tried?
I have a ‘postie_post_before’ filter like the code below:
add_filter('postie_post_before', 'filter_title');
function filter_title($post) {
if (substr($post['post_title'], 0, 16) == 'Automatic reply:') {
return null;
}
return $post;
}
It is possible the category logic is altering the post title before postie_post_before sees it. Try setting “Use colon to match category” to no.
See http://postieplugin.com/faq/override-post-categories/ for background.
Thanks, I checked and see all the Postie category options are already set to “No”.
The ‘postie_post_before’ filter, as above, did cause a result, just not the ignore result I hoped for.
Instead of completely ignoring the email, it left the two temporary Postie files “tmpFile” and “tmptitle”.
It shouldn’t. That should only happen if there problem. Can you click the debug button when one of those emails in waiting and email the output to [email protected]
I have three “postie_post_before” filters enabled. I discovered that when I moved the above “filter_title” function last, it discards the “Automatic reply” email.
So when a filter makes the $POST null, it can cause any following filters to misbehave.
Is it wrong to return null? I suppose all filters should check if $POST is null first before doing anything.
Returning null is the correct thing to do. However, I do see this in the log:
Post postie_post filter
Array
(
[post_content] => <br/>
[post_category] => Array
(
)
)
This shows what is in $post after the postie_post_before filter, as you can see it is not null. I suspect you have another Postie addon installed, is that true?
I have three “postie_post_before” filters in filterPostie.php.
Today, I added a test for an empty $post array at the beginning of all three filters which return null if empty.
There were some conditions where I added the ‘<br/>’ tag at the end of the content in two of these filters. Updated to only add the tag if content is not empty.
For the specific problem of “Automated reply:”, the debug output for “Post postie_post filter” is:
Post postie_post filter
postie_post filter cleared the post, not saving.
Done
I believe this solved my support question.
Thanks for your support