App-Regather
view release on metacpan or search on metacpan
etc/regather.conf.sample view on Meta::CPAN
modifiedon = modifyTimestamp
notafter = umiUserCertificateNotAfter
notbefore = umiUserCertificateNotBefore
state = umiOvpnAddStatus
[service ovpn map m]
iroute = umiOvpnCfgIroute
push = umiOvpnCfgPush
[service sieve]
chown = 1
chmod = 0400
out_path = /tmp/2.kill/regather/out_sieve
tt_file = sieve.tt
out_file = .sieve
out_file_pfx = homeDirectory
ctrl_attr = mu-sieveOnReceive
ctrl_srv_re = ^.*,authorizedService=mail@.*,ou=People,.*$
plugin = configfile
[service sieve map s]
lib/App/Regather/Config.pm view on Meta::CPAN
clientcert = STRING
clientkey = STRING
keydecrypt = STRING
ssl = STRING
sslversion = STRING
verify = STRING
[service ANY]
all_attr = NUMBER :default 0
chmod = OCTAL :default 0640
chown = NUMBER :default 1
ctrl_attr = STRING :mandatory :array
ctrl_srv_re = STRING :mandatory
gid = STRING
out_ext = STRING
out_file = STRING
out_file_pfx = STRING
out_path = STRING :check=chk_dir
tt_file = STRING :check=chk_file_tt
uid = STRING
ns_attr = STRING
lib/App/Regather/Plugin/configfile.pm view on Meta::CPAN
] );
if ( $self->cf->is_set($self->service, 'chmod') ) {
$self->log->cc( pr => 'err', fm => "%s: DRYRUN: chmod %s, %s",
ls => [ sprintf("%s:%s",__FILE__,__LINE__), $self->cf->get('service', $self->service, 'chmod'), $out_to ] );
} elsif ( $self->cf->is_set(qw(core chmod)) ) {
$self->log->cc( pr => 'err', fm => "%s: DRYRUN: chmod %s, %s",
ls => [ sprintf("%s:%s",__FILE__,__LINE__), $self->cf->get('core', 'chmod'), $out_to ] );
}
if ( $self->cf->is_set($self->service, 'chown') ) {
$self->log->cc( pr => 'err', fm => "%s: DRYRUN: chown %s, %s, %s",
ls => [ sprintf("%s:%s",__FILE__,__LINE__), $self->obj->get_value('uidNumber'),
$self->obj->get_value('gidNumber'),
$out_to ] );
}
return;
}
my ( $tmp_fh, $tmp_fn );
eval { $tmp_fh = File::Temp->new( UNLINK => 0, DIR => $dir ); };
if ( $@ ) {
lib/App/Regather/Plugin/configfile.pm view on Meta::CPAN
if ( $self->cf->is_set('service', $self->service, 'chmod') ) {
chmod oct($self->cf->get('service', $self->service, 'chmod')), $out_to ||
$self->log->cc( pr => 'err', fm => "%s: chmod for %s failed",
ls => [ sprintf("%s:%s",__FILE__,__LINE__), $out_to ] );
} elsif ( $self->cf->is_set(qw(core chmod)) ) {
chmod oct($self->cf->(qw(core chmod))), $out_to ||
$self->log->cc( pr => 'err', fm => "%s: chmod for %s failed",
ls => [ sprintf("%s:%s",__FILE__,__LINE__), $out_to ] );
}
if ( $self->cf->is_set('service', $self->service, 'chown') ) {
chown $self->obj->get_value('uidNumber'),
$self->obj->get_value('gidNumber'),
$out_to ||
$self->log->cc( pr => 'err', fm => "%s: chown (%s:%s) %s failed",
ls => [ sprintf("%s:%s",__FILE__,__LINE__), $self->obj->get_value('uidNumber'),
$self->obj->get_value('gidNumber'),
$out_to ] );
}
} else {
$self->log->cc( pr => 'err', fm => "%s: %s disappeared, no such file any more...",
ls => [ sprintf("%s:%s",__FILE__,__LINE__), $out_to ] );
}
}
$self->log->cc( pr => 'debug', fm => "%s: control %s: dn: %s processed successfully.",
( run in 2.642 seconds using v1.01-cache-2.11-cpan-71847e10f99 )