cvs commit: qpsmtpd/plugins/queue smtp-forward

[email protected] (Matt Sergeant)
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
cvsuser     04/06/11 13:00:16

  Modified:    plugins/queue smtp-forward
  Log:
  Error checking
  
  Revision  Changes    Path
  1.4       +8 -6      qpsmtpd/plugins/queue/smtp-forward
  
  Index: smtp-forward
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/plugins/queue/smtp-forward,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -r1.3 -r1.4
  --- smtp-forward	5 Mar 2004 12:46:24 -0000	1.3
  +++ smtp-forward	11 Jun 2004 20:00:15 -0000	1.4
  @@ -52,15 +52,17 @@
                               Port => $self->{_smtp_port},
                               Timeout => 60,
                              ) || die $!;
  -  $smtp->mail( $transaction->sender->address || "" );
  -  $smtp->to($_->address) for $transaction->recipients;
  -  $smtp->data();
  -  $smtp->datasend($transaction->header->as_string);
  +  $smtp->mail( $transaction->sender->address || "" ) or return(DECLINED, "Unable to queue message ($!)");
  +  for ($transaction->recipients) {
  +    $smtp->to($_->address) or return(DECLINED, "Unable to queue message ($!)");
  +  }
  +  $smtp->data() or return(DECLINED, "Unable to queue message ($!)");
  +  $smtp->datasend($transaction->header->as_string) or return(DECLINED, "Unable to queue message ($!)");
     $transaction->body_resetpos;
     while (my $line = $transaction->body_getline) {
  -    $smtp->datasend($line);
  +    $smtp->datasend($line) or return(DECLINED, "Unable to queue message ($!)");
     }
  -  $smtp->dataend();
  +  $smtp->dataend() or return(DECLINED, "Unable to queue message ($!)");
     $smtp->quit() or return(DECLINED, "Unable to queue message ($!)");
     $self->log(LOGINFO, "finished queueing");
     return (OK, "Queued!");
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.