aboutsummaryrefslogtreecommitdiffstats
path: root/smtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'smtp.c')
-rw-r--r--smtp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/smtp.c b/smtp.c
index 877e2e5c..733f7050 100644
--- a/smtp.c
+++ b/smtp.c
@@ -101,6 +101,10 @@ int SMTP_ok(FILE *sockfp)
{
int n = strlen(ip);
+ if (buf[strlen(buf)-1] == '\n')
+ buf[strlen(buf)-1] = '\0';
+ if (buf[strlen(buf)-1] == '\r')
+ buf[strlen(buf)-1] = '\r';
if (n < 4)
return SM_ERROR;
buf[n] = '\0';