- $error=$self->check;
- return $error if $error;
-
- $error = $self->SUPER::insert;
- return $error if $error;
-
- 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);