FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » General Chit Chat » Working with maillist.php
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Working with maillist.php [message #17188] Fri, 19 March 2004 03:23 Go to previous message
Marticus   United States
Messages: 272
Registered: June 2002
Karma:
Senior Member
Hello. maillist.php seems to work just fine for my mailing lists; however, when I attempt to wrap the gateway script in a filter script I wrote in perl, the posting doesn't have a body.

Please let me know if I need to do some special magic when working with this stuff; I know it can be a bit tricky. This code receives the message on stdin and filters out everything between $tag and the string ~~ and sends the new message to maillist.php. Note that ARGV sends the maillist.php number listed in the following /etc/aliases entry (in this case it's 1):

fud-kias-general: "|/usr/local/bin/rmfooter.pl 1"

rmfooter.pl
#!/usr/bin/perl
use strict;
use warnings;

my $maillist = "/home/sites/kias/fudforum/data/scripts/maillist.php";
my $tag = "~mailing list information~";
my $footer = 0;

open FUD, "|-", "$maillist $ARGV[0]" or die "Cannot open: $!";
#print FUD $_ while <STDIN>;
while (<STDIN>) {
$footer = 1 if ($_ =~ /($tag)/);
print FUD $_ if ($footer ne 1);
$footer = 0 if ($_ =~ /(~~)/);
}
print FUD "[mailing list footer removed]";
close FUD;
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Accelerators.
Next Topic: File Uploading - Where's it go?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 00:34:00 GMT 2024

Total time taken to generate the page: 0.04369 seconds