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