X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fvpopmail.pm;h=0fc8266ea15840230f194ebffedff29bd021356b;hb=c2829eb15ff44d34ce82ae02c88810a321614ce9;hp=646af44cd2e325d333b4801d4eb33458027544b3;hpb=e31feacedbd07e333183b83360d20d21bcb611bd;p=freeside.git
diff --git a/FS/FS/part_export/vpopmail.pm b/FS/FS/part_export/vpopmail.pm
index 646af44cd..0fc8266ea 100644
--- a/FS/FS/part_export/vpopmail.pm
+++ b/FS/FS/part_export/vpopmail.pm
@@ -1,13 +1,40 @@
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,
+ '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; }
@@ -217,10 +244,11 @@ sub vpopmail_sync {
'STDOUT: '. join(" / ", $rsync->out);
}
- eval "use Net::SSH;";
+ eval "use Net::SSH qw(ssh);";
die $@ if $@;
ssh("vpopmail\@$machine", $restart) if $restart;
}
+1;