Firefox PHP

Module: External Phorummail

Posted by Thomas Seifert 
Re: Module: External Phorummail
September 23, 2009 01:53PM
Thanks for the quick reply! The /usr/bin directory has the following directories...
php
php-cgi
php-cli
php-config
php5
php5-cgi
php5-cli
phpize

I tried putting it in as a cron from the cPanel, and I'm supposed to get an email with the output (I removed the "> /dev/null"), but I haven't got any output in my email yet. I'll post back in a bit with an update unless you have any more ideas to share.

-Jake
Re: Module: External Phorummail
September 23, 2009 02:21PM
If that does not work, with cPanel you may be able to use:

cd /home/obioorg1/public_html/forums && php ./script.php --scheduled


If not, try:

cd /home/obioorg1/public_html/forums && /usr/local/bin/php ./script.php --scheduled
Re: Module: External Phorummail
September 24, 2009 01:41AM
Thomas,

We are running into an issue with attachments. The biggest issue is that some text attachments are being displayed inline, and not as attachments. This might not be a big issue ordinarily, but we ran into a problem when a posted patch failed because of this.

See [forum.nginx.org] - the fourth post in the thread - for this case. Copying and pasting the inline patch failed, but using the attachment that came (I was able to save it and download it as my site receives two copies) worked fine.

In the case above, the headers included:

Quote

Content-Type: multipart/mixed; boundary="gKMricLos+KVdGMg"
Content-Disposition: inline

Another example is at [forum.nginx.org] where two separate attachments were displayed inline as one.

In this case there was no "Content-Disposition" header but there was:

Quote

Content-Type: multipart/mixed; boundary=\"------------040400010002060103050906\"

Is there some setting in the code where we can force these attachments to come as attachments, and not inline?

Thanks in advance.
Re: Module: External Phorummail
September 24, 2009 03:15AM
No, there's no setting for that.
Text attachments are simply appended to the body as there's no simple rule to determine which text attachment is the body and which one a real attachment.


Thomas Seifert
Re: Module: External Phorummail
September 24, 2009 04:42PM
Thanks guys! I got it working!

This is an awesome mod! It's by far the most important mod for me at the moment, and the reason I switched from phpBB to Phorum.

I have a couple feature requests that hopefully are pretty simple...

#1 Stripping the "Re:" from the subject line. I have a number of topics starting with "Re:". I realize that this probably won't happen when the initial list post is entered, but there's really no reason to have the "Re:" in any topics so it would be nice if they could be stripped.

#2 I'm using the module to integrate a mailing list with the forum, so it would be great if the module could make sure that only mail from the listserv address got posted. This would help prevent spam from getting auto posted. For non-list users it might be a good idea to check for a certain character in the mail subject or body to make sure it's not just run of the mill spam.

I hope that's not too hard to do. If there's any way I can help, or if you could point me to some info on how to do this myself, please let me know. And thanks again for this very useful module!


-Jake
Re: Module: External Phorummail
September 24, 2009 05:26PM
I have no plans for either one:
#1 makes no sense. Phorum uses Re: for the replies anyway and as you have guessed already with the thread starting message available it should be no problem.

#2 as far as I know there is no reliable way to determine "the listserv address" or even that he mail is delivered from the address given.


Thomas Seifert
Re: Module: External Phorummail
September 24, 2009 06:47PM
Quote
Thomas Seifert
#2 as far as I know there is no reliable way to determine "the listserv address" or even that he mail is delivered from the address given.

Point taken on #1. As for #2 what I mean is to have an option in the settings or a variable in the code that would allow you to specify that only messages from a certain address would be posted in the forum and the rest discarded.

I'm just worried that random spam from random spammer addresses might make it's way into the mailbox I use for the gateway and they'll end up as spam in the forum. I realize it's easy to put whatever address you want as the sender in an email, so this wouldn't be a security feature, just a spam reduction feature.

I realize you're busy doing great stuff, but I'm hoping you might have time to whip out a few code snippets that might do the trick. I'd be happy to test them and try to get it working.

One other thing I was wondering... Was how hard it would be to trim leading or trailing whitespace from the emails and how I could go about removing the footer list unsubscribe information from the body. If you can think of a code example that might lead me in the right direction of working that out I'd really appreciate it.


-Jake
Re: Module: External Phorummail
September 24, 2009 10:35PM
Quote
JakeStew
Thanks guys! I got it working!

This is an awesome mod! It's by far the most important mod for me at the moment, and the reason I switched from phpBB to Phorum.

I have a couple feature requests that hopefully are pretty simple...

#1 Stripping the "Re:" from the subject line. I have a number of topics starting with "Re:". I realize that this probably won't happen when the initial list post is entered, but there's really no reason to have the "Re:" in any topics so it would be nice if they could be stripped.

#2 I'm using the module to integrate a mailing list with the forum, so it would be great if the module could make sure that only mail from the listserv address got posted. This would help prevent spam from getting auto posted. For non-list users it might be a good idea to check for a certain character in the mail subject or body to make sure it's not just run of the mill spam.

I hope that's not too hard to do. If there's any way I can help, or if you could point me to some info on how to do this myself, please let me know. And thanks again for this very useful module!


-Jake

On point one you may not want to do this if people are using email clients that do not send proper headers, as this will be one way that the proper thread is matched.

On point two, you can do one of two things. For each list subscribe with two email address, the common one that your forum uses for outgoing mail, and a private one that you will only use for incoming mail and never make public. This way, your outgoing mail address is public but you never import the messages that arrive in that mailbox. You only import the messages that come to the private mailbox. Phorum is smart enough to delete the repeat of the incoming message so you don't get double posts, and since the incoming email never sends to the list it gets no spam. This is the method that I use for integrating seven lists. They each have a separate mailbox but mail goes out from only one address. I run a cron job to delete the mails that come into that box.

The second method is to use Procmail and set a rule to look for a header specific to the mailing list. Most lists have some headers that are unique to it for just this purpose. You need to make sure that p place a .procmailrc file in the home directory of the user who is receiving the mail. There are lots of Procmail recipes available if you search Google. I believe I have used the one at [www.ii.com].

A typical .procmailrc file might look like:

SHELL=/bin/sh
PMDIR=$HOME/Procmail
LOGFILE=$PMDIR/pmlog
MAILDIR=/var/mail
INCLUDERC=$PMDIR/rc.subscriptions

You then create a subdirectory Procmail within the home directory and within it place the rc.subscriptions file.

A frequent header in mailing lists is the "X-BeenThere" header. It can be faked of course, as can any header, but spammers send out bulk email and aren't likely to bother adding the header for that group.

So something like:

:0:
* !^X-BeenThere:.*[INSERT ACTUAL HEADER HERE]
/dev/null

might work. This will send any email without that header into the proverbial cornfield. This won't work if you have two lists. You'd then need to use positive rules, not a negative one. YMMV of course.

Jim

Nginx Forum
Re: Module: External Phorummail
September 29, 2009 06:44AM
Thx a lot for this module it works so GREAT !!!! It will permit me to import old news from a database :-)

THX again !!!

IZ
Re: Module: External Phorummail
October 21, 2009 04:50PM
Unpacking the mod gives me one dir containing a single file called 'ext_phorummail-2.0.6' - uploaded the dir to mods.
Went to admin/modules and this message is at the top of the page.

Quote

Warning: possible module "ext_phorummail" found, but no module information is available for that module.

Is there something missing, or something I'm missing?

TIA
Sorry, only registered users may post in this forum.

Click here to login