X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fvpopmail.pm;h=62fa8bade2e4553dd1ea34bbb6b47d1f75b62d33;hp=a505a0f47beed4f36327019ba156f531d323366b;hb=dabdf357484badff95afcae50b08ec1c3bb58343;hpb=7de51deb0e3e3fe1b0a9e06be6498256d5511bd0 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;