Mailing list integration help? [message #12058] |
Sun, 27 July 2003 08:50 |
blackops
Messages: 12 Registered: July 2003
Karma: 0
|
Junior Member |
|
|
I am trying to implement mailing list integration on a site where the client uses a shared hosting setup that does not allow the use of procmail, etc., to process incoming mail. Basically, the shared mail server is inaccessible to the client's account.
The feature to send new posts from a forum to the mailing list works fine, but, obviously, new messages to the mailing list do not get posted to the forums. Is there any way to make this work (some sort of email alias, or something?) without being able to pipe the incoming mail to maillist.php?
This may sound like a stupid question, but I just want to make sure I exhaust all possibilities, before I tell my client this won't work. Thanks in advance!
|
|
|
Re: Mailing list integration help? [message #12064 is a reply to message #12058] |
Sun, 27 July 2003 17:19 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
maillist.php is pretty flexible in the way it can accept a message. To put it simply, you can pipe the entire message to the maillist.php script and it'll work.
So you could do something like this:
<?php exec("cat message | php -q maillist.php [list_id]"); ?>
FUDforum Core Developer
|
|
|
Re: Mailing list integration help? [message #12107 is a reply to message #12064] |
Mon, 28 July 2003 19:35 |
blackops
Messages: 12 Registered: July 2003
Karma: 0
|
Junior Member |
|
|
Thanks for the quick reply. I know that procmail isn't the only way to pipe the messages. I guess my real problem probably stems from a lack of *NIX knowledge.
If my mail server is on a different machine, and the messages are received there, and then delivered...and I don't have access to that machine...I do not know of a way to get the contents of those messages routed to a place from which I can pipe them into maillist.php. I'm pretty sure the answer is, "You can't," but I wanted to try.
Thanks again.
[edit]
BTW, I think FUDForum is great. Flexible and well-written. A worthy competitor to the more popular forums out there.
[Updated on: Mon, 28 July 2003 19:40] Report message to a moderator
|
|
|
Re: Mailing list integration help? [message #12110 is a reply to message #12107] |
Mon, 28 July 2003 19:57 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
I am guessing that to fetch the messages from the remote server you use POP3 or IMAP. The solution then is to write a simple POP3 or IMAP fetch code that would fetch the message and pipe it to the maillist.php script. PHP has an imap extension that could make this very easy to implement using PHP.
FUDforum Core Developer
|
|
|
Re: Mailing list integration help? [message #12111 is a reply to message #12110] |
Mon, 28 July 2003 20:00 |
blackops
Messages: 12 Registered: July 2003
Karma: 0
|
Junior Member |
|
|
Ah...yes, that is exactly what I was looking for. In other words, if I set up an alias that sends messages to the actual mailing list, as well as a pop account, I could grab the messages from the pop account on a regular basis and populate the forum threads. Excellent. Thanks for the suggestion! I'll reply back with my status when I've given it a try.
Thanks.
[Updated on: Mon, 28 July 2003 20:01] Report message to a moderator
|
|
|
|
|
Re: Mailing list integration help? [message #12140 is a reply to message #12128] |
Tue, 29 July 2003 22:11 |
blackops
Messages: 12 Registered: July 2003
Karma: 0
|
Junior Member |
|
|
Okay. I have written a PHP script that reads a message and outputs the header+body. If I cat that result into maillist.php with the proper ID number, then the message shows up as a new post in the forum.
The only catch is, every single message seems to show up as a new post, even if it is a reply to a previous message...that doesn't seem like it's the intended result. Any suggestions?
[Updated on: Tue, 29 July 2003 22:11] Report message to a moderator
|
|
|
Re: Mailing list integration help? [message #12142 is a reply to message #12140] |
Tue, 29 July 2003 22:13 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Hmm sounds like your messages are missing a header that helps the forum identify replies. Make sure that ALL headers are included in the data that you pass.
FUDforum Core Developer
|
|
|
|
|
|
|
Re: Mailing list integration help? [message #14824 is a reply to message #14792] |
Fri, 21 November 2003 18:24 |
blackops
Messages: 12 Registered: July 2003
Karma: 0
|
Junior Member |
|
|
I have written a script that logs into a POP server and grabs one message at a time, routing them through mailinglist.php. Here is the code. Notice the few places I have <TEXT>. Please replace those occurrances (including the "<" and ">") with the actual values.
This script creates a temp file, logs into a POP server, downloads one message at a time, storing it in the temp file, and pipes the contents of that file into maillist.php. It expects two command-line arguments: POP_account_name and list_id.
Example from the command line:
php -q /home/virtual/site2/fst/var/www/html/test/fmail.php f-general-user 2
[EDIT: instead of pasting script contents, attached script as file.]
-
Attachment: fudmail.php
(Size: 1.25KB, Downloaded 576 times)
[Updated on: Fri, 21 November 2003 18:26] Report message to a moderator
|
|
|
Re: Mailing list integration help? [message #14826 is a reply to message #14824] |
Fri, 21 November 2003 18:32 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Please reports this in the hacks forums, where people who maybe looking for similar code would be looking for it.
Thanks.
FUDforum Core Developer
|
|
|