X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fvpopmail.pm;h=5fca1704ce4b1f0cc6440687bb71ca3012cbd516;hb=68cdfc7f046ac2496ed880d93e07f0eae34a5366;hp=a505a0f47beed4f36327019ba156f531d323366b;hpb=0ebeec96313dd7edfca340f01f8fbbbac1f4aa1d;p=freeside.git
diff --git a/FS/FS/part_export/vpopmail.pm b/FS/FS/part_export/vpopmail.pm
index a505a0f47..5fca1704c 100644
--- a/FS/FS/part_export/vpopmail.pm
+++ b/FS/FS/part_export/vpopmail.pm
@@ -1,13 +1,41 @@
package FS::part_export::vpopmail;
-use vars qw(@ISA @saltset $exportdir);
+use vars qw(@ISA %info @saltset $exportdir);
use Fcntl qw(:flock);
+use Tie::IxHash;
use File::Path;
use FS::UID qw( datasrc );
use FS::part_export;
@ISA = qw(FS::part_export);
+tie my %options, 'Tie::IxHash',
+ #'machine' => { label=>'vpopmail machine', },
+ 'dir' => { label=>'directory', }, # ?more info? default?
+ 'uid' => { label=>'vpopmail uid' },
+ 'gid' => { label=>'vpopmail gid' },
+ 'restart' => { label=> 'vpopmail restart command',
+ default=> 'cd /home/vpopmail/domains; for domain in *; do /home/vpopmail/bin/vmkpasswd $domain; done; /var/qmail/bin/qmail-newu; killall -HUP qmail-send',
+ },
+;
+
+%info = (
+ 'svc' => 'svc_acct',
+ 'desc' => 'Real-time export to vpopmail text files',
+ 'options' => \%options,
+ 'default_svc_class' => 'Email',
+ 'notes' => <<'END'
+This export is currently unmaintained. See shellcommands_withdomain for an
+export that uses vpopmail CLI commands instead.
+
+Real time export to vpopmail text
+files. File::Rsync
+must be installed, and you will need to
+setup SSH for unattended operation
+to vpopmail@export.host.
+END
+);
+
@saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' );
sub rebless { shift; }
@@ -60,7 +88,7 @@ sub _export_delete {
sub vpopmail_queue {
my( $self, $svcnum, $method ) = (shift, shift, shift);
- my $exportdir = "/usr/local/etc/freeside/export." . datasrc;
+ my $exportdir = "%%%FREESIDE_EXPORT%%%/export." . datasrc;
mkdir $exportdir, 0700 or die $! unless -d $exportdir;
$exportdir .= "/vpopmail";
mkdir $exportdir, 0700 or die $! unless -d $exportdir;
@@ -223,4 +251,5 @@ sub vpopmail_sync {
ssh("vpopmail\@$machine", $restart) if $restart;
}
+1;