Title: Discard &#8220;Automatic reply:&#8221;
Last modified: December 14, 2016

---

# Discard “Automatic reply:”

 *  Resolved [gizmomol](https://wordpress.org/support/users/gizmomol/)
 * (@gizmomol)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/discard-automatic-reply/)
 * Thanks for continuing to develop Postie, a very useful plugin.
 * I would like Postie to ignore any email received with “Automatic reply:” in the
   subject.
 * I have tried various postieFilter functions but all my attempts have resulted
   in two posts, “tmpFile” and “tmptitle”.
 * Is there a Postie option or filter to ignore a post based on subject?

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [Wayne Allen](https://wordpress.org/support/users/wayneallen-1/)
 * (@wayneallen-1)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/discard-automatic-reply/#post-8554124)
 * There is nothing built in. It shouldn’t be too difficult in a filter. Can you
   post what you tried?
 *  Thread Starter [gizmomol](https://wordpress.org/support/users/gizmomol/)
 * (@gizmomol)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/discard-automatic-reply/#post-8554506)
 * 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;
       }
       ```
   
 *  Plugin Author [Wayne Allen](https://wordpress.org/support/users/wayneallen-1/)
 * (@wayneallen-1)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/discard-automatic-reply/#post-8557689)
 * 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/](http://postieplugin.com/faq/override-post-categories/)
   for background.
 *  Thread Starter [gizmomol](https://wordpress.org/support/users/gizmomol/)
 * (@gizmomol)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/discard-automatic-reply/#post-8558140)
 * Thanks, I checked and see all the Postie category options are already set to “
   No”.
 *  Thread Starter [gizmomol](https://wordpress.org/support/users/gizmomol/)
 * (@gizmomol)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/discard-automatic-reply/#post-8558166)
 * 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”.
 *  Plugin Author [Wayne Allen](https://wordpress.org/support/users/wayneallen-1/)
 * (@wayneallen-1)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/discard-automatic-reply/#post-8558438)
 * 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 [help@postieplugin.com](https://wordpress.org/support/topic/discard-automatic-reply/help@postieplugin.com?output_format=md)
 *  Thread Starter [gizmomol](https://wordpress.org/support/users/gizmomol/)
 * (@gizmomol)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/discard-automatic-reply/#post-8558550)
 * I just sent it.
 * Thanks
 *  Thread Starter [gizmomol](https://wordpress.org/support/users/gizmomol/)
 * (@gizmomol)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/discard-automatic-reply/#post-8558622)
 * 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.
 *  Plugin Author [Wayne Allen](https://wordpress.org/support/users/wayneallen-1/)
 * (@wayneallen-1)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/discard-automatic-reply/#post-8564534)
 * 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?
 *  Thread Starter [gizmomol](https://wordpress.org/support/users/gizmomol/)
 * (@gizmomol)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/discard-automatic-reply/#post-8566200)
 * 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
 *  Plugin Author [Wayne Allen](https://wordpress.org/support/users/wayneallen-1/)
 * (@wayneallen-1)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/discard-automatic-reply/#post-8566391)
 * Glad you got it sorted!

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Discard “Automatic reply:”’ is closed to new replies.

 * ![](https://ps.w.org/postie/assets/icon-256x256.png?rev=970083)
 * [Postie](https://wordpress.org/plugins/postie/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/postie/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/postie/)
 * [Active Topics](https://wordpress.org/support/plugin/postie/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/postie/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/postie/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [Wayne Allen](https://wordpress.org/support/users/wayneallen-1/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/discard-automatic-reply/#post-8566391)
 * Status: resolved