FUDforum - خوراک RDF
http://fudforum.org/forum/index.php
Using mailman, fud, /etc/aliases, maillist.php, and custom filter scripts
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=17220&th=3573#msg_17220
fud-kias-general: "|/home/sites/kias/fudforum/data/scripts/maillist.php 1"
I added fud-kias-general to the kias-general membership with the 'not metoo' flag set to prevent looping. When a message is sent to the list, it also goes to fud-kias-general which points it to the maillist.php script which in turn posts it to the forum.
Note: in order for postfix to execute the script I had to make maillist.php executable, which by default is not.
Up until recently this had worked fine for me; however, I decided I needed more.
All of my forums get filled up with extra crap like quoted material and mailman footers.
Since I am no guru of regex, I had to resort to writing my own filter in perl using a combination of loops and keywords added to the mailman footer. Because postfix does not allow multiple pipes in /etc/aliases, e.g., fud-kias-general: "| filter.pl | maillist.php 1", I had to wrap the filter around maillist.php as such, fud-kias-general: "|filter.pl 1".
For those of you who know perl, this is a no brainer:
filter.pl:
--
#!/usr/bin/perl
use strict;
use warnings;
# Path to maillist.php
my $maillist = "/home/sites/kias/fudforum/data/scripts/maillist.php";
my $tag = "~mailing list information~"; # prepend mailman footer
my $endtag = "~~"; # append mailman footer
my $footer = 0;
# Open a pipe to maillist.php
# $ARGV[0] passes the list number 1 to maillist.php
open FUD, "|-", "$maillist $ARGV[0]" or die "Cannot open: $!";
# Pass through to maillist.php each line of the message
while (<STDIN>) {
$footer = 1 if ($_ =~ /($tag)/); # Start of mailman footer
print FUD $_ if ($footer ne 1);
$footer = 0 if ($_ =~ /($endtag)/); # End of mailman footer
}
print FUD "[mailing list footer removed]"; # added to bottom of email
close FUD; # close the pipe
--
Now I have filtered everything between and including $tag and $endtag sending a cleaner post to the forum.
I hope this helps someone else.]]>Marticus2004-03-19T22:16:24-00:00Re: Using mailman, fud, /etc/aliases, maillist.php, and custom filter scripts
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=19896&th=3573#msg_19896
rhinofly2004-09-15T10:08:26-00:00Re: Using mailman, fud, /etc/aliases, maillist.php, and custom filter scripts
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=167874&th=3573#msg_167874
With this command :
"/var/www/FUDforum/scripts/maillist.php 2" in /etc/aliases file,
regards
Ganesh Kumar]]>ganesh2012-10-29T12:53:49-00:00Re: Using mailman, fud, /etc/aliases, maillist.php, and custom filter scripts
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=167875&th=3573#msg_167875
PHP Warning: include_once(/var/www/FUDforum/include/mime_decode.inc): failed to open stream: Permission denied in /var/www/FUDforum/include/core.inc on line 78
PHP Warning: include_once(): Failed opening '/var/www/FUDforum/include/mime_decode.inc' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/FUDforum/include/core.inc on line 78
PHP Warning: include_once(/var/www/FUDforum/include/scripts_common.inc): failed to open stream: Permission denied in /var/www/FUDforum/include/core.inc on line 78
PHP Warning: include_once(): Failed opening '/var/www/FUDforum/include/scripts_common.inc' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/FUDforum/include/core.inc on line 78
PHP Fatal error: Class 'fud_mime_msg' not found in /var/www/FUDforum/scripts/maillist.php on line 131
554 5.3.0 unknown mailer error 255
chmod 777 also doesnt solve this problem. Can anybody help me out?]]>ganesh2012-10-30T03:22:52-00:00