gpg-ezmlm/gpg-ezmlm-convert.pl

89 lines
2.7 KiB
Perl
Executable File

#/usr/bin/perl -w
#gpg-ezmlm-convert is a tool to convert a currently existing ezmlm
#list into a gpg-ezmlm list, by replacing the appropriate lines,
#creating the appropriate subdirs, and generating a list key for you.
use strict;
my $dir = shift;
my $dot = shift;
if (!(-d $dir)) {
die "No such directory $maildirlist\n";
}
mkdir "$dir/.gnupg", 0700 or
die "Cannot make $maildirlist/.gnupg: $!\n";
mkdir "$dir/tmp", 0700 or
die "Cannot make $maildirlist/tmp: $!\n";
open NEWSEND, ">$dot.n" or die "Cannot make temporary file $dot.n: $!\n";
open NEWDEFAULT, ">$dot-default.n" or
die 'Cannot make temporary file $dot-default.n: $!\n";
open CONFIG, ">$dir/config" or
die "Cannot open $dir/config: $!\n";
print CONFIG << ENDCONFIG;
#This is the configuration file for gpg-ezmlm. The file as distributed
#with the package contains all options set to their default values,
#and commented out. To change these options, uncomment the line,
#and set the option appropriately. Most options take either yes or no
#as options. Options are case insensitive.
#GnuPG is the location of your gpg executable
#
# GnuPG /usr/local/bin/gpg
#qmailBin is where all of your qmail executables are located
#
# qmailBin /var/qmail/bin
#keyDir is the location of the keyring for this particular mailing
#list. gpg-ezmlm supports a separate keyring for each ml, or you
#can cram them all together if you like by setting the below
#
# keyDir .gnupg
#tempDir is the location of the purgatory keyrings where submitted keys
#are stored before they are added to the main mailing list keyring.
#You should probably not have a reason to change this.
#
# tempDir tmp
#signMessages controls whether gpg-ezmlm signs outgoing messages
#or not. If this is not set, messages may be spoofed as if they
#were from the mailing list
#
# signMessages yes
#If requireSigs is set to yes, then only messages with a valid, trusted
#signature will be forwarded to the rest of the group.
#
# requireSigs no
#Setting NokeyNocrypt to yes will forward the encrypted portions of
#messages unencrypted to recipients for whom gpg-ezmlm does not
#possess a key. By default, those recipients will instead receive
#a message stating "encrypted content not forwarded because I
#don't have a key for you."
#
# NokeyNocrypt no
#VerifiedKeyReq requies that all keys that are used be trusted keys.
#An untrusted key is treated the same as no key at all.
#
# VerifiedKeyReq no
#RequireSub, if set to yes, will require that the sender of a message
#be a subscriber to the email list that he is attempting to post
#messages to. Senders who are not subscribed to the list will
#have their submissions rejected automatically.
#
# RequireSub no
ENDCONFIG
close(CONFIG);