-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of [email protected]:virtualmin/virtualmin-mailman
- Loading branch information
Showing
5 changed files
with
56 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
before_install: | ||
- sudo apt-get update -qq | ||
- sudo apt-get install -qq perl libtest-strict-perl | ||
script: prove |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[![Build Status](https://travis-ci.org/virtualmin/virtualmin-mailman.svg?branch=master)](https://travis-ci.org/virtualmin/virtualmin-mailman) | ||
|
||
# virtualmin-mailman | ||
|
||
Virtualmin plugin to allow domain owners to manage mailman mailing lists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env perl | ||
use strict; | ||
use warnings; | ||
use Test::Strict 'no_plan'; | ||
|
||
all_perl_files_ok(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,34 @@ | ||
#!/usr/local/bin/perl | ||
# Output some mailman icon | ||
use strict; | ||
use warnings; | ||
|
||
# Global | ||
our %text; | ||
our $trust_unknown_referers; | ||
our $icons_dir; | ||
|
||
chdir(".."); | ||
delete($ENV{'HTTP_REFERER'}); # So that links from webmail work | ||
$trust_unknown_referers = 1; | ||
require './virtualmin-mailman-lib.pl'; | ||
$ENV{'PATH_INFO'} =~ /^\/(.*)/ || | ||
&error($text{'edit_eurl'}); | ||
$icon = $1; | ||
my $icon = $1; | ||
if ($icon =~ /\.\./ || $icon =~ /\0/) { | ||
&error($text{'edit_eurl'}); | ||
} | ||
|
||
$type = &guess_mime_type("$icons_dir/$icon"); | ||
@st = stat("$icons_dir/$icon"); | ||
my $type = &guess_mime_type("$icons_dir/$icon"); | ||
my @st = stat("$icons_dir/$icon"); | ||
print "Content-type: $type\n"; | ||
print "Content-length: ",$st[7],"\n"; | ||
print "Last-Modified: ",&http_date($st[9]),"\n"; | ||
print "Expires: ",&http_date(time()+7*24*60*60),"\n"; | ||
print "\n"; | ||
open(ICON, "$icons_dir/$icon"); | ||
while(<ICON>) { | ||
open(my $ICON, "$icons_dir/$icon"); | ||
while(<$ICON>) { | ||
print $_; | ||
} | ||
close(ICON); | ||
close($ICON); | ||
|