- my $svc_acct = qsearchs( 'svc_acct', { 'svcnum' => $self->srcsvc } );
- my $svc_domain = qsearchs( 'svc_domain', { 'svcnum' => $svc_acct->domsvc } );
- my $source = $svc_acct->username . $svc_domain->domain;
- my $destination;
- if ($self->dstdvc) {
- my $svc_acct = qsearchs( 'svc_acct', { 'svcnum' => $self->dstsvc } );
- my $svc_domain = qsearchs( 'svc_domain', { 'svcnum' => $svc_acct->domsvc } );
- $destination = $svc_acct->username . $svc_domain->domain;
- } else {
- $destination = $self->dst;
- }
-
- my $vdomain = $svc_acct->domain;
-
- foreach my $vpopmailmachine ( @vpopmailmachines ) {
- my ($machine, $vpopdir, $vpopuid, $vpopgid) = split (/\s+/, $vpopmailmachine);
-
- ssh("root\@$machine","[ -d $vpopdir/$vdomain/$source ] || { echo $destination >> $vpopdir/$vdomain/$source/.qmail; chown $vpopuid:$vpopgid $vpopdir/$vdomain/$source/.qmail; }")
- if ( ! $nossh_hack && $machine);