On 2007-07-18 14:41:39 +0200, Johan Almqvist wrote: > [EMAIL PROTECTED] wrote: > > >I have a problem when sending msg with many recipients: > > > >when the quantity of rcpts is greater than 52, in qpsmtpd log appear this > >output... > > > >2007-07-18 13:12:01.018395500 3915 Plugin queue::smtp_forward, hook > >queue returned DECLINED, Unable to queue message () > >2007-07-18 13:12:01.018499500 3915 451 Unable to queue message () > > What do the logs say on the server that you are forwarding to? > > I agree that the log produced by queue::smtp_forward could be a bit more > verbose...
The verbose message is supposed to be between the (), but it looks
wrong:
or return(DECLINED, "Unable to queue message ($!)");
$! probably won't contain a useful error message while talking to an SMTP
server. You would need to use $smtp->code and $smtp->message instead.
Could you try the attached patch?
hp
--
_ | Peter J. Holzer | I know I'd be respectful of a pirate
|_|_) | Sysadmin WSR | with an emu on his shoulder.
| | | [EMAIL PROTECTED] |
__/ | http://www.hjp.at/ | -- Sam in "Freefall"
Index: smtp-forward
===================================================================
--- smtp-forward (revision 758)
+++ smtp-forward (working copy)
@@ -52,18 +52,30 @@
Timeout => 60,
Hello => $self->qp->config("me"),
) || die $!;
- $smtp->mail( $transaction->sender->address || "" ) or return(DECLINED, "Unable to queue message ($!)");
+ $smtp->mail( $transaction->sender->address || "" ) or return(DECLINED, "Unable to queue message:", mkmsg($smtp));
for ($transaction->recipients) {
- $smtp->to($_->address) or return(DECLINED, "Unable to queue message ($!)");
+ $smtp->to($_->address) or return(DECLINED, "Unable to queue message:", mkmsg($smtp));
}
- $smtp->data() or return(DECLINED, "Unable to queue message ($!)");
- $smtp->datasend($transaction->header->as_string) or return(DECLINED, "Unable to queue message ($!)");
+ $smtp->data() or return(DECLINED, "Unable to queue message:", mkmsg($smtp));
+ $smtp->datasend($transaction->header->as_string) or return(DECLINED, "Unable to queue message:", mkmsg($smtp));
$transaction->body_resetpos;
while (my $line = $transaction->body_getline) {
- $smtp->datasend($line) or return(DECLINED, "Unable to queue message ($!)");
+ $smtp->datasend($line) or return(DECLINED, "Unable to queue message:", mkmsg($smtp));
}
- $smtp->dataend() or return(DECLINED, "Unable to queue message ($!)");
- $smtp->quit() or return(DECLINED, "Unable to queue message ($!)");
+ $smtp->dataend() or return(DECLINED, "Unable to queue message:", mkmsg($smtp));
+ $smtp->quit() or return(DECLINED, "Unable to queue message:", mkmsg($smtp));
$self->log(LOGINFO, "finished queueing");
return (OK, "Queued!");
}
+
+sub mkmsg {
+ my ($smtp) = @_;
+ my $code = $smtp->code;
+ my @messages = split(/\n/, $smtp->message);
+ my @outmsg;
+ while (my $msg = shift @messages) {
+ my $line = $code . (@messages?"-":" ").$msg;
+ push @outmsg, $line;
+ }
+ return @outmsg;
+}
signature.asc
Description: Digital signature
