X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fcommunigate_pro.pm;h=6da201799a4ce2ee78363d8b0d372db637a634cb;hb=35effa1bf4ac902547615c816960bbc8db8e7256;hp=aa038f08e47a983edc1fd7e7415beee1cc002309;hpb=6569ee0ceffd720ca55594dc0f5a454187ee3b75;p=freeside.git diff --git a/FS/FS/part_export/communigate_pro.pm b/FS/FS/part_export/communigate_pro.pm index aa038f08e..6da201799 100644 --- a/FS/FS/part_export/communigate_pro.pm +++ b/FS/FS/part_export/communigate_pro.pm @@ -1,11 +1,42 @@ package FS::part_export::communigate_pro; -use vars qw(@ISA); +use vars qw(@ISA %info %options); +use Tie::IxHash; use FS::part_export; use FS::queue; @ISA = qw(FS::part_export); +tie %options, 'Tie::IxHash', + 'port' => { label=>'Port number', default=>'106', }, + 'login' => { label=>'The administrator account name. The name can contain a domain part.', }, + 'password' => { label=>'The administrator account password.', }, + 'accountType' => { label=>'Type for newly-created accounts', + type=>'select', + options=>[qw( MultiMailbox TextMailbox MailDirMailbox )], + default=>'MultiMailbox', + }, + 'externalFlag' => { label=> 'Create accounts with an external (visible for legacy mailers) INBOX.', + type=>'checkbox', + }, + 'AccessModes' => { label=>'Access modes', + default=>'Mail POP IMAP PWD WebMail WebSite', + }, +; + +%info = ( + 'svc' => 'svc_acct', + 'desc' => 'Real-time export to a CommuniGate Pro mail server', + 'options' => \%options, + 'notes' => <<'END' +Real time export to a +CommuniGate Pro +mail server. The +CommuniGate Pro Perl Interface +must be installed as CGP::CLI. +END +); + sub rebless { shift; } sub export_username { @@ -31,10 +62,10 @@ sub _export_insert { sub _export_replace { my( $self, $new, $old ) = (shift, shift, shift); - return "can't (yet) change domain with CommuniGate Pro" - if $old->domain ne $new->domain; return "can't (yet) change username with CommuniGate Pro" if $old->username ne $new->username; + return "can't (yet) change domain with CommuniGate Pro" + if $self->export_username($old) ne $self->export_username($new); return "can't (yet) change GECOS with CommuniGate Pro" if $old->finger ne $new->finger; return "can't (yet) change quota with CommuniGate Pro" @@ -142,3 +173,6 @@ sub communigate_pro_command { #subroutine, not method $cli->Logout or die "Can't logout of CGPro: $CGP::ERR_STRING\n"; } + +1; +