Forum OpenACS Q&A: Re: E-mail responses to forum/bboard postings?

Collapse
Posted by Reuven Lerner on
Thanks for all of the feedback!

Ironically, it seems that the client was primarily asking if it was possible to get notifications via e-mail, not submit responses via e-mail.  But the information that you folks provided here was very useful.  If we decide to go ahead with forum submissions via e-mail, I'll be sure to coordinate my work with others, so that everyone can benefit from the result.

This is a (very) old post but, is it possible to answer a forum (for example developer forum here) via e-mail (not via web form).

I suppose that it needs configuration in email server, but is it work (Openacs Forum or as a general service)

Collapse
Posted by Gustaf Neumann on
Up to my knowledge, There is nothing ready to use for forums, but it is not unlikely, that several have implemented this based on the available infrastructure. The acs-mail-lite (part of acs-core) has some functionality to process incoming mails (e.g. mail bounces) and provides means to extend mail processing via callbacks and a ReplyPrefix. Arbitrary application packages can provide callback to handle the parsed mails. If you are interested, you can check in the notification package or in the bug-tracker for examples of such callbacks

A short online description is here:
https://openacs.org/api-doc/proc-view?proc=acs_mail_lite%3a%3aload_mails

Collapse
Posted by Dave Bauer on
Cesareo,

There is a feature for accepting email replies for forums.

The notifications package has a feature to handle incoming notifications and one route is via email.

The basic idea is to setup an incoming email and deposit the valid replies into a Maildir formatted directory with one file for each incoming message.

I have listed some quite old instructions for this that might be of value, but will most likely require some interpretation and updating:

This tutorial guides you in setting up "reply by email" for the forums package. The forums package will email an article to users who are subscribed to notifications. The "reply by email" feature allows recipients of the notification to reply to the forum post by email. The system is configured to receive the email and post the reply to the appropriate forum article.

1. Have the mails delivered in a Maildir formatted directory which the site has read and write access to.

Assuming user web is running the server, the email sender prefix is "notification" and the domain is "domain.com", here are a couple of ways to do this:

a. Mail server in the same machine
- Install a mail server which supports Maildir (e.g. Postfix) in the server.
- Add an MX entry for domain.com pointing to the server on your DNS.
- Configure the mail to deliver all mailto:notification-*@domain.com to user web.
- Create a .forward file in web's home directory containing the location of the Maildir directory

b. Mail server in a different machine (RECOMMENDED)
- Install fetchmail and procmail
- In web's home directory, create a .fetchmailrc file and put:

poll <your.mail.server> protocol pop3 user "<email.account.username>" password "<password>", is web here and wants mda "</location/of/procmail>"
- get demime from http://scifi.squawk.com/demime.stable, save it as demime.pl and give it execute permissions

chmod 755 demime.pl
- Then create a .procmailrc file and put:

:0 w
\* ^subject:.*Out of Office AutoReply
/dev/null

:0 B f b w i
\* ^>
| /usr/bin/sed -e '/^ *>/d'

:0 f w
| /home/<project_name>/demime.pl -

:0 w
</location/of/Maildir/>
NOTE : remove the '\' in '\*'

The first three lines filter out Outlook auto-replies.
The second set of three lines remove quoted replies.
While the 3rd set of lines calls demime.pl to clean the html of attachments and other html that may have been produced by richtext formatting in MS Outlook.

2. Setup the OpenACS notifications package

EmailDomain: domain.com
EmailQmailQueue: /location/of/Maildir
EmailQmailQueueScanP: 1
EmailReplyAddressPrefix: notification
NOTE : Line breaks seems to be getting ignored. To prevent this in forums, locate forums/tcl/. Remove the ad_convert_html_to_text proc around \$reply(content).

3. Restart OpenACS

Hi

Amazing! 😊

One of my "openacs mantras" is "if you have thought about it somebody has done it" (sorry about my spanglish)

I'll try to set it up in some days and I'll keep my experience here (now I'm upgrading my system).

Thanks!

Hi

I'm trying to set this up (email responses to forum). So far I could do it only by email. I mean, mail is not sourced to forum thread.

So far it was very easy. All I have to do was to do: https://openacs.org/xowiki/incoming_email

But, I think each package (i.e forum) need to parse those email, right? Any work on this?

Collapse
Posted by Dave Bauer on
Forums package already supports this.

If acs-mail-lite is scanning the emails it should be picked up by the forums package.

My settings now:

* Mail Service .. Parameters
BounceDomain www.myserver.com
BounceMailDir /home/openacs/Maildir
BounceDomain www.myserver.com
BounceScanQueue 90 (every 1.5 minute)

* Notification .. Parameters (I'd missed this)
EmailDomain www.myserver.com
EmailQmailQueue /home/openacs/Maildir
EmailQmailQueueScanP 1
EmailReplyAddressPrefix notification

I had to add EmailDomain to fix email domain so I could get an alias in postfix to manage all @www.myserver.com addressses (mailto:notification*@www.myserver.com and mailto:bounces*@www.myserver.com)

BUT It seems that acs-mail-lite doesn't scan openacs/Maildir

Any idea to solve that?

I had a problem (an alias for openacs user). I've removed that alias and it seems to work.

My problem now is some "garbage" in content. I'd like to "post automatically" only the main content (and not all reply).