X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FPOP3.pm;h=ec73893c5694d6cdda85ad5d3739d4c910c21d69;hb=f40f4695c0cb576a4e00819da45c1bea8f548aec;hp=8612356329fde8ac4584221b071efde1bd63dbeb;hpb=68046e0fff12c35d793a7ae9f164ac415c84cc21;p=public-inbox.git diff --git a/lib/PublicInbox/POP3.pm b/lib/PublicInbox/POP3.pm index 86123563..ec73893c 100644 --- a/lib/PublicInbox/POP3.pm +++ b/lib/PublicInbox/POP3.pm @@ -176,7 +176,7 @@ sub _login_ok ($) { $self->{uid_max} = $self->{ibx}->over(1)->max; \"+OK logged in\r\n"; } else { - \"-ERR unable to lock maildrop\r\n"; + \"-ERR [IN-USE] unable to lock maildrop\r\n"; } } @@ -300,12 +300,13 @@ sub retr_cb { # called by git->cat_async via ibx_async_cat $hdr .= "\r\n\r\n"; my @tmp = split(/^/m, $bdy); $hdr .= join('', splice(@tmp, 0, $top_nr)); + } elsif (exists $self->{expire}) { + $self->{expire} .= pack('S', $off + 1); } $$bref =~ s/^\./../gms; $$bref .= substr($$bref, -2, 2) eq "\r\n" ? ".\r\n" : "\r\n.\r\n"; $self->msg_more("+OK message follows\r\n"); $self->write($bref); - $self->{expire} .= pack('S', $off + 1) if exists $self->{expire}; $self->requeue; } @@ -342,14 +343,17 @@ sub cmd_dele { # RFC 2449 sub cmd_capa { my ($self) = @_; + my $STLS = !$self->{ibx} && !$self->{sock}->can('stop_SSL') && + $self->{pop3d}->{accept_tls} ? "\nSTLS\r" : ''; $self->{expire} = ''; # "EXPIRE 0" allows clients to avoid DELE commands - \<