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

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).