X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fcommunigate_pro.pm;h=b94eaf66dd96a45bb14614059f031886050011db;hb=5beabbb6a5dfe410545ceab8b4ed0ddcb96fd9c8;hp=37cc6ef265bd39b71cc1885803d00a369f64dcb1;hpb=ad7f49821d40ffd099a45acc32ba91e0e211aede;p=freeside.git diff --git a/FS/FS/part_export/communigate_pro.pm b/FS/FS/part_export/communigate_pro.pm index 37cc6ef26..b94eaf66d 100644 --- a/FS/FS/part_export/communigate_pro.pm +++ b/FS/FS/part_export/communigate_pro.pm @@ -77,12 +77,18 @@ sub _export_insert_svc_acct { ], 'RealName' => $svc_acct->finger, 'Password' => $svc_acct->_password, + + #phase 2: allowed mail rules, RPOP modifications, accepts mail to all, add trailer to sent mail + 'RulesAllowed' => $svc_acct->cgp_rulesallowed, + 'RPOPAllowed' =>($svc_acct->cgp_rpopallowed ?'YES':'NO'), + 'MailToAll' =>($svc_acct->cgp_mailtoall ?'YES':'NO'), + 'AddMailTrailer' =>($svc_acct->cgp_addmailtrailer ?'YES':'NO'), + map { $quotas{$_} => $svc_acct->$_() } grep $svc_acct->$_(), keys %quotas ); - #phase 2: pwdallowed, passwordrecovery, allowed mail rules, - # RPOP modifications, accepts mail to all, add trailer to sent mail - #phase 3: archive messages, mailing lists + #XXX phase 2: pwdallowed, passwordrecovery + #XXX phase 3: archive messages, mailing lists my @options = ( 'CreateAccount', 'accountName' => $self->export_username($svc_acct), @@ -171,6 +177,10 @@ sub _export_insert_svc_domain { 'MaxWebSize' => $svc_domain->acct_def_file_quota, 'MaxWebFile' => $svc_domain->acct_def_file_maxnum, 'MaxFileSize' => $svc_domain->acct_def_file_maxsize, + 'RulesAllowed' => $svc_domain->acct_def_cgp_rulesallowed, + 'RPOPAllowed' =>($svc_domain->acct_def_cgp_rpopallowed ?'YES':'NO'), + 'MailToAll' =>($svc_domain->acct_def_cgp_mailtoall ?'YES':'NO'), + 'AddMailTrailer' =>($svc_domain->acct_def_cgp_addmailtrailer ?'YES':'NO'), ); warn "WARNING: error queueing SetAccountDefaults job: $def_err" if $def_err; @@ -270,9 +280,18 @@ sub _export_replace_svc_acct { if $old->cgp_accessmodes ne $new->cgp_accessmodes || $old->cgp_type ne $new->cgp_type; - #phase 2: pwdallowed, passwordrecovery, allowed mail rules, - # RPOP modifications, accepts mail to all, add trailer to sent mail - #phase 3: archive messages, mailing lists + #phase 2: allowed mail rules, RPOP modifications, accepts mail to all, add trailer to sent mail + $settings{'RulesAllowed'} = $new->cgp_rulesallowed + if $old->cgp_rulesallowed ne $new->cgp_rulesallowed; + $settings{'RPOPAllowed'} = $new->cgp_rpopallowed + if $old->cgp_rpopallowed ne $new->cgp_rpopallowed; + $settings{'MailToAll'} = $new->cgp_mailtoall + if $old->cgp_mailtoall ne $new->cgp_mailtoall; + $settings{'AddMailTrailer'} = $new->cgp_addmailtrailer + if $old->cgp_addmailtrailer ne $new->cgp_addmailtrailer; + + #XXX phase 2: pwdallowed, passwordrecovery + #XXX phase 3: archive messages, mailing lists if ( keys %settings ) { my $error = $self->communigate_pro_queue( @@ -368,6 +387,10 @@ sub _export_replace_svc_domain { 'MaxWebSize' => $new->acct_def_file_quota, 'MaxWebFile' => $new->acct_def_file_maxnum, 'MaxFileSize' => $new->acct_def_file_maxsize, + 'RulesAllowed' => $new->acct_def_cgp_rulesallowed, + 'RPOPAllowed' => ( $new->acct_def_cgp_rpopallowed ? 'YES' : 'NO' ), + 'MailToAll' => ( $new->acct_def_cgp_mailtoall ? 'YES' : 'NO' ), + 'AddMailTrailer' => ( $new->acct_def_cgp_addmailtrailer ? 'YES' : 'NO' ), ); warn "WARNING: error queueing SetAccountDefaults job: $def_err" if $def_err;