X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fvpopmail.pm;h=62fa8bade2e4553dd1ea34bbb6b47d1f75b62d33;hb=243b248a929e99a9cc64e16f29e4a49afeb87a3c;hp=a505a0f47beed4f36327019ba156f531d323366b;hpb=eb9668a6f3181ee02cb335272c5ee4616e61fd09;p=freeside.git
diff --git a/FS/FS/part_export/vpopmail.pm b/FS/FS/part_export/vpopmail.pm
index a505a0f47..62fa8bade 100644
--- a/FS/FS/part_export/vpopmail.pm
+++ b/FS/FS/part_export/vpopmail.pm
@@ -1,13 +1,38 @@
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'
+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. See shellcommands_withdomain for an
+export that uses vpopmail commands instead.
+END
+);
+
@saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' );
sub rebless { shift; }
@@ -223,4 +248,5 @@ sub vpopmail_sync {
ssh("vpopmail\@$machine", $restart) if $restart;
}
+1;