cvs commit: qpsmtpd/lib/Qpsmtpd Postfix.pm

[email protected] (Ask "Bj?rn" Hansen)
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
cvsuser     04/07/19 04:08:15

  Modified:    .        Changes
               plugins/queue maildir
               lib/Qpsmtpd Postfix.pm
  Log:
  Improve error messages from the Postfix module (Erik I. Bolsø,
  <knan at mo.himolde.no>)
  
  make the maildir plugin record who the message was to (needs some improvements
  still)
  
  Revision  Changes    Path
  1.71      +3 -0      qpsmtpd/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/Changes,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -w -r1.70 -r1.71
  --- Changes	16 Jul 2004 20:23:17 -0000	1.70
  +++ Changes	19 Jul 2004 11:08:15 -0000	1.71
  @@ -2,6 +2,9 @@
   
     [ many changes from cvs logs, gah ]
   
  +  Improve error messages from the Postfix module (Erik I. Bolsø,
  +  <knan at mo.himolde.no>)
  +
     Mail::Address does RFC822 addresses, we need SMTP addresses.
     Replace Mail::Address with Peter J. Holzer's Qpsmtpd::Address module.
   
  
  
  
  1.2       +6 -0      qpsmtpd/plugins/queue/maildir
  
  Index: maildir
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/plugins/queue/maildir,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- maildir	24 May 2004 11:36:04 -0000	1.1
  +++ maildir	19 Jul 2004 11:08:15 -0000	1.2
  @@ -19,6 +19,8 @@
   sub register {
     my ($self, $qp, @args) = @_;
   
  +  # TODO: support per user/domain/? maildirs
  +
     if (@args > 0) {
       ($self->{_maildir}) = ($args[0] =~ m!([/\w\.]+)!);
     }
  @@ -51,6 +53,10 @@
     my $file    = join ".", $time, $unique, $self->{_hostname};
     my $maildir = $self->{_maildir};
   
  +  # TODO: deliver the mail once per recipient instead 
  +  $transaction->header->add('Delivered-To', $_->address, 0)
  +    for $transaction->recipients;
  +
     open (MF, ">$maildir/tmp/$file") or 
       $self->log(LOGWARN, "could not open $maildir/tmp/$file: $!"),
       return(DECLINED, "queue error (open)");
  
  
  
  1.2       +1 -0      qpsmtpd/lib/Qpsmtpd/Postfix.pm
  
  Index: Postfix.pm
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd/Postfix.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- Postfix.pm	19 Feb 2004 10:55:36 -0000	1.1
  +++ Postfix.pm	19 Jul 2004 11:08:15 -0000	1.2
  @@ -93,6 +93,7 @@
     my ($class) = @_;
     my $self = IO::Socket::UNIX->new(Type => SOCK_STREAM,
     				   Peer => "/var/spool/postfix/public/cleanup");
  +  die qq[Couldn't open unix socket "/var/spool/postfix/public/cleanup": $!] unless ref $self;
     bless ($self, $class);
     $self->init();
     return $self;
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.