Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

Automatic posting via email?

Quote Reply
Automatic posting via email?
Hello,

I am new to Gossamer Forums and have a seemingly simple mod that I would like to implement, I just have to figure out the best way to do so!

Basically, I would like to have an email message parsed and posted to a specific forum automatically upon receipt. I have looked at at Post/Write.pm module, but it seems to be pretty specific to receving a POST method from a browser. I was thinking about stripping out the functionality and creating a new "atomic_post" method, but before I did this I wanted to see if it had already been done.

Any ideas? Does anyone know, off the top of their head, what exactly is involved in posting a message? It looks easy enough, just insert into the db and vioala the magic occurs. I just don't want to miss anything!

BTW, the reason for this is to have a majordomo mailing list automatically feed the forums.

Thanks!
Quote Reply
Re: [Flaaz] Automatic posting via email? In reply to
The Mail Archive plugin accomplishes this. An example would be http://www.gossamer-threads.com/perl/mailarc/gforum.cgi

Adrian

Last edited by:

brewt: Feb 3, 2002, 1:03 AM
Quote Reply
Re: [brewt] Automatic posting via email? In reply to
Currently I am trying MailArc and it seems just the job ... however I am having problems getting the mail actually sent to the forum. We are on a virtual Server and the
| /path/to/admin/Plugins/GForum/Archive.pl --forum=x has to have virtual added after the |.

Despite adding this and running sendmail -bi all I am getting is user virtual not found.

Anyone else on a virtual using this plugin - Alex is looking into it for us but the result may assist others in similar circumstances.

We have accomplished mailing out of a forum into an existing mailing list and I hope to get our Perl guru to post this for all very soon.

Wayne
Quote Reply
Re: [brewt] Automatic posting via email? In reply to
Wow, the timing of this is incredible. Thank you!
Quote Reply
Re: [balita] Automatic posting via email? In reply to
In Reply To:
We have accomplished mailing out of a forum into an existing mailing list and I hope to get our Perl guru to post this for all very soon.

Have you accomplished this allready? I would be interested in getting a plugin that sends each message to the forum subscribers immediately as the message is sent to the forum.

Lauri
Quote Reply
Re: [brewt] Automatic posting via email? In reply to
Adrian,

I installed the MailArc Plugin, but am not quite sure how I should proceed now to actually get mails from an existing Mailinglist into the forum.

I added a forum and have the ID of it.
I can create a 'listening user' which I would subscribe to the mailing list.
But what next?

The 'About' text says:
Quote:
If you do not have the level of control to make changes to the "aliases" file or are under a different system, the "archive.pl" script runs as a mail pipe accepting emails from STDIN and places emails into the forum indicated by the --forum=id value. Contact your system administrator for the best option.

How would archive.pl be invoked and where is STDIN feeded from?

(Additional info/problem: All users / mail accounts I can create are actually located on a different system and not on the same machine where GForum is installed. So in fact there is only one 'real' user on the webserver, which is the one that can access shell - but it's not 'root')

Could you please give me a step by step example how to do this?
Or isn't it possible at all under such circumstances?

Thanx

Andreas
-------------------------------------------------
http://www.archaeologie-online.de
Quote Reply
Re: [Digger] Automatic posting via email? In reply to
Smile SmileI need the EXACT same question answered!

I asked this before I flipped the $200 to buy 'gforums' ...after having played with it for 4-5 days.
....I figured gforums seemed complete enough. ..live and learn.Unimpressed


I had just finished a thorough run through evaluation of the
'Discus' system. Smile It appears BOTH gforums and Discus are
afflicted with the lack of a clean solution for this seemingly simple problem. Frown

I'ts become obvious to me, there is not a 'simple' fix to this connection, or
one of these two forum systems would have it working already.
Quote Reply
Re: [Digger] Automatic posting via email? In reply to
Hi,

You need to configure your email server so that whenever your email address receives a message, archive.pl is run.

Unfortunately there are so many different email servers, and ways to set the program up, that one answer can't fit all.

If you are using sendmail, you want to edit /etc/aliases and add:

useraccount: "|/full/path/to/admin/Plugins/MailArc/archive.pl --forum=x"

where

useraccount == the user that is subscribed to the mailing list
x = the forum id you want to subscribe to.

and then rebuild your aliases file. If you were on qmail, you could add a .qmail-username file in the aliases directory with the contents:

|/full/path/to/admin/Plugins/MailArc/archive.pl --forum=x

Postfix, Exim, and other mail servers may be different.

Really, the best thing to do is ask your ISP how to run a program everytime an email is received.

Hope that helps,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Automatic posting via email? In reply to
Hi Alex,

I just called my ISP and asked them if this would be possible. Unfortunately it isn't Frown

What would be possible from their point of view is that I create an account on the mail machine and then have the script fetch mails from this account (maybe via cron) for processing them.

Would it be a lot of work to modifiy archive.pl to achieve this? Or adding another script that fetches the mails and feeds archive.pl?

Angelic

Andreas
-------------------------------------------------
http://www.archaeologie-online.de
Quote Reply
Re: [Digger] Automatic posting via email? In reply to
Hi,

This could be an option. I'll look at getting the Mail Archive plugin modified so you could enter POP information, and it will connect to a POP box and insert every message in the POP box and then delete each message.

You would need to run this via cron every 5 minutes or so (or however fast you want the messages from the list to appear in the archive).

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Automatic posting via email? In reply to
Hi Alex,

Quote:
I'll look at getting the Mail Archive plugin modified so you could enter POP information, and it will connect to a POP box and insert every message in the POP box and then delete each message.

Smile That would be great!

Andreas
-------------------------------------------------
http://www.archaeologie-online.de
Quote Reply
Re: [Digger] Automatic posting via email? In reply to
Done! Download version 1.1, and then setup a cron job:

archive.pl --forum=1 --pop-host=mailserver.com --pop-user=username --pop-pass=password

and the program will download all the mail in that pop account and insert it into the forum. You can of course still pipe email to the script.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Automatic posting via email? In reply to
Cool
Great!

That was really fast Smile

Thank you!

Just a thought:
Rather than taking a posters mail address as the username that's stored in the database I'd prefer it if the real name of a poster would be taken as the username if available, if not, use the mail address. Is that possible?

Andreas
-------------------------------------------------
http://www.archaeologie-online.de
Quote Reply
Re: [Alex] Automatic posting via email? In reply to
I know that if I ask this question, I probably don't need to be doing it - but how do I set up a cron job?

I see that in forum/admin/cron - you have one cron job, but I do not see how to modify it.
Quote Reply
Re: [shiner] Automatic posting via email? In reply to
Please ignore that last post - here is the answer to my question:

http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=74091