I followed this howto: http://drupal.org/node/40777
I posted a comment there before I realized this issue tracker was not just for Bugs. here is my post..

Hi folks, I have this mostly working. I have seen some inconsistencies from this guide and my own behavior though.

Threads started on email are published in the forum automatically, as i desire. However replies coming from email were always moderated. After I click retrieve from MailHandler it says

"1 message retrieved for email@example.com.
Your comment has been queued for moderation by site administrators and will be published after approval."

for default commands I have tried both

tid: 1
status: 1

and just:

tid: 1

Now the funny thing is I got it to automatically publish the comments by *unchecking* "post comments without approval" for the Authenticated User role in the User Permissions.

But then my authenticated users' comments are moderated..

honestly this seems like a bug.. unless I'm missing something.

[root@vission modules]# rpm -q drupal
drupal-6.19-1.fc13.noarch

; Information added by drupal.org packaging script on 2010-06-13
version = "6.x-1.11"
core = "6.x"
project = "mailhandler"
datestamp = "1276452306"

thoughts?

Comments

JBstrikesagain’s picture

Category: support » bug

I'm changing this to a bug report. I reproduced this again tonight on a fresh Drupal 6.19 install.

cor3huis’s picture

Just something that I thought of, maybe setting in the mailhandler commands

moderate: 0

or 1 or other values will help.

cor3huis’s picture

Yes, same issue here with Drupal 6.19 and Mailhandler 6.x.11. and even if the "moderate:" command or others command setting would set it to publis it should not be that way. Users Permission should be the setteng where it should happen and then just work. Investigating now. If anthing sensible comes up or if I solved it I'll post result (or even patch ) here

cor3huis’s picture

Looked into the mailhandler.module code (The code is the documentation ;) and found:

  ...
  // comment_save will not fall back to permission system if we set the status explicitly
  // See comment_save.  += will not overwrite an existing array property.
  if (property_exists($node, 'status')) {
    // In comment module, status of 1 means unpublished, status of 0 means published.
    $node->status == 1 ? $node->status = 0 : $node->status = 1;
  }
  ...

That part looks just fine OK, status value is set correctly as it is swapped for node of type comment, however as we can see if you do set the status value in the mailhandler textbox Default commands: explicitly then the permissions system is from that point on not taken into account.

Therefore, as probably the bugreporter also uses listhandler, which in turn will not use the permission system anymore and thus also not the (not proven yet...) set the moderate permissions anymore.

Investigation ongoing.... we will get the beast ;-)

cor3huis’s picture

Component: User interface » Code
Status: Active » Needs review

Probably duplicate of http://drupal.org/node/716768 could the bugreporter check the fix plz.

cor3huis’s picture

Status: Needs review » Active
cor3huis’s picture

Status: Active » Reviewed & tested by the community

Adusting the Listhandler source like in the patch of http://drupal.org/files/issues/listhandler.module.set_.status.diff made it work, therefore not a Mailhandler issue

Reporter of the defect, plz re-test also and the close this defect.

JBstrikesagain’s picture

Status: Reviewed & tested by the community » Closed (works as designed)

The patch referenced in comment #7 fixed the issue.

cor3huis thank you so much for researching this issue for me. I was stuck. I'm sorry it was a duplicate issue and with listhandler and not mailhandler. I tried to search for it but I obviously didn't find that entry.. maybe I didn't search in listhandler issue queue as much as mailhandler (I thought it was a mailhandler issue obviously)

Anyway I will close this out.

Thanks again.