aboutsummaryrefslogtreecommitdiffstats
path: root/pullimap
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2016-03-11 03:10:56 +0100
committerGuilhem Moulin <guilhem@fripost.org>2016-03-11 03:10:56 +0100
commitaa07430ff47d3745b7c575c2f24f78c6d34ce115 (patch)
treeb41b80ca8b9e6052c84f80f92e11b96575cd8f70 /pullimap
parent704f775cb23237e1cb5107a2d1ea142e44f1d3f5 (diff)
parent95787b188cc324fbdb6c6022d9750ba552591559 (diff)
Merge branch 'master' into debian
Diffstat (limited to 'pullimap')
-rwxr-xr-xpullimap14
1 files changed, 7 insertions, 7 deletions
diff --git a/pullimap b/pullimap
index 79da152..623ba1e 100755
--- a/pullimap
+++ b/pullimap
@@ -158,7 +158,7 @@ sub sendmail($$) {
if ($$rfc822 eq '') {
# RFC 5321 section 4.1.1.4: if there was no mail data, the first
# "\r\n" ends the DATA command itself
- $SMTP->printflush("\r\n.\r\n");
+ $SMTP->printflush("\r\n.\r\n") or die;
} else {
my $offset = 0;
my $length = length($$rfc822);
@@ -166,7 +166,7 @@ sub sendmail($$) {
my $line = substr($$rfc822, $offset, $end-$offset);
# RFC 5321 section 4.5.2: the character sequence "\r\n.\r\n"
# ends the mail text and cannot be sent by the user
- $SMTP->print($line eq ".\r\n" ? "..\r\n" : $line);
+ $SMTP->print($line eq ".\r\n" ? "..\r\n" : $line) or die;
$offset = $end;
}
if ($offset < $length) {
@@ -174,9 +174,9 @@ sub sendmail($$) {
# have the receiving SMTP server recognize the "end of data"
# condition. See RFC 5321 section 4.1.1.4
my $line = substr($$rfc822, $offset);
- $SMTP->print(($line eq "." ? ".." : $line), "\r\n");
+ $SMTP->print(($line eq "." ? ".." : $line), "\r\n") or die;
}
- $SMTP->printflush(".\r\n");
+ $SMTP->printflush(".\r\n") or die;
}
smtp_resp('250');
}
@@ -199,14 +199,14 @@ sub smtp_send(@) {
push @code, shift // die;
}
if ($SMTP_PIPELINING) { # SMTP pipelining (RFC 2920)
- print STDERR join('', map {"C: $_\n"} @cmd) if $CONFIG{debug};
- $SMTP->printflush(join('', map {"$_\r\n"} @cmd));
+ print STDERR (map {"C: $_\n"} @cmd) if $CONFIG{debug};
+ $SMTP->printflush(map {"$_\r\n"} @cmd) or die;
@r = smtp_resp($_) foreach @code;
}
else {
foreach (@cmd) {
print STDERR "C: $_\n" if $CONFIG{debug};
- $SMTP->printflush("$_\r\n");
+ $SMTP->printflush("$_\r\n") or die;
@r = smtp_resp(shift(@code));
}
}