Hello all,
I am new to ElkArte but I am really looking forward to using it!
I've tried setting up post/reply by email and it doesn't seem to be working. I've done the following:
-Enabled the core feature
-Added the proper forwarding addresses with piping enabled to the PHP scripts
-Changed permissions of the emailpost and emailtopic files to 755.
Now, nothing seems to happen when I try to reply or post. There's nothing in the PHP error log, and I don't receive any bounced-back messages.
Any suggestions?
Make sure the shebang line at the start of emailpost and emailtopic are correct for your system/os ... Read the leading comment in those files for some help on how to check.
OK, tried changing it, but now I'm getting a bounceback with the following error message:
PHP Notice: Undefined index: default_forum_action in /home/wdwbbjsw/forum.gtamaid.info/themes/default/Theme.php on line 737
OK ... well at least thats progress, we know the return mail is making it to the system. I'll have a look into that error.
Thanks so much!
Could you tell me which version of ElkArte you are using?
It's 1.1.3
Could you attach your bootstrap.php file here, I just want to check that its current.
Sure, here it is
That file is fine ... I'm really not sure how you are able to generate that error.
I just installed 1.1.3 to a test forum and the email reply function worked (after I worked around an unrelated issue that needs to be fixed in 1.1.4)
Do you see any errors in the server mail.log or other error somewhere? How did you pipe the inbound email to the emailpost.php script? Just to make sure, you are receiving an email from your forum, like when there is a new post on a board you subscribed to, you then reply to that and then get a return email bounce with above error?
Hi,
I'm using Cpanel so not sure that I can access mail logs easily... The inbound mail is piped through Cpanel. I'll try once more but yes, I post a new topic on the website, get an email about it, then try to reply that email.
Cpanel should do it just fine .... have not used it in years but did successfully use it with this function.
I think you need to make sure both the script and the directory it is in have permissions of 0755 then you have to setup a new email filter, give it a name and then specify the destination as |/home/username/path/to/emailpost.php (and emailtopic.php only if you are allowing new topics my email)
Tried it but still causing the same error message... I'll attach the whole bounced message for your reference.
Try removing your | character from your filter ... not sure that's it or not, but the text of your message appears to indicate you are pointing to an invalid endpoint.
The pipe is added by Cpanel automatically.
Do you know of any quick script I could use to just test the piping process?
When I went to your site via
http://forum.gtamaid.info/emailpost.php
it said
#!/usr/bin/env php
Please check the first line of your emailpost.php script ... it should be like #!/usr/bin/env/php -q or wherever your php command is located. Notice in the response there is no / after the env in that response .... You need to enter the full path command line to run php .... don't forget the -q ....
Still getting the same error message even when I changed the shebang.
I even tried switching to IMAP instead of piping, and I get a "Missing Key" error. It's just not my night for forums! ;)
What does the shebang line look like and what flavor of *nix are you running?
IMAP is fine, its just not "instantaneous" so to speak.
The missing key is the "other" error I referred to above, a little bug introduced in 1.1.3, that we can fix and get you going!
I think I might just stick with IMAP if it's easily doable-- what's the fix?
For now edit Mail.subs.php (I'm not sure this will be the 1.1.4 fix, so keep an eye on things)
$unq_head = $unq_head_array[0] . '-' . $unq_head_array[2];
$unq_head = $unq_head_array[0] . '-' . $unq_head_array[1] . $unq_head_array[2];
Thanks, this seems to work so far. However, one more issue has come up: I'm getting a "Key Expired" message if I try to reply to a given message more than once. (I've set the key expiration setting to 90 days or something like that in the settings.)
Looking at the code you can only reply to the post once via email until another email is generated by someone else replying. If that makes sense.
Correct ... they are use once keys to prevent spamming.
The key expired means that at least its a legit key, user and topic/message are legit ... so you the admin can still approve it. I don't see that happen to often but it does happen.
I guess the issue is that if multiple people respond simultaneously to a new topic then it won't work. This seems to happen to fairly frequently on our listserv, so I'm not sure if this is going to work...
Its unique to each specific user ... not to the message. So if 100 users "subscribe" each can reply to the original message w/o any issue.
Ah, ok, I see...
One more thing -- and I'm so sorry to keep bugging you about all this!
I've tried replying by email with a file attachment and the attachments gets posted to the forum but gets attached to the wrong reply (see screenshot, the PDF file 'billing units' is supposed to be attached to the last reply.) The attachment doesn't seem to make it through by email.
Any suggestions? Known bug?
I'll have to check the attachment code, that sounds like a bug.
While you're at it... Are attachments supposed to be forwarded to people who are subscribed to a topic?
(Thanks, I owe you guys if this all does work out for us!)
If I recall correctly, it will only report that there are attachments and provide the link, I don't think it includes them in the outbound notification.
Quick update... I discovered that even when using cron to fetch the IMAP messages, it only works if guest browsing is enabled. (I posted a new bug report about this.) Now, when I try piping, this is the error message I get when the email bounces back:
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
pipe to |/home/wdwbbjsw/forum.gtamaid.info/emailpost.php
generated by test@forum.gtamaid.info
The following text was generated during the delivery attempt:
------ pipe to |/home/wdwbbjsw/forum.gtamaid.info/emailpost.php
generated by test@forum.gtamaid.info ------
X-Powered-By: PHP/7.1.17
Content-type: text/html; charset=UTF-8
Reporting-MTA: dns; s1.kickassd.com
Action: failed
Final-Recipient: rfc822;|/home/wdwbbjsw/forum.gtamaid.info/emailpost.php
Status: 5.0.0