summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2012-01-26 12:31:54 +0000
committerEric Faurot <eric@cvs.openbsd.org>2012-01-26 12:31:54 +0000
commit8d92b83ee4e779c089a4b7bff75c6359255ff0cc (patch)
tree28b1145a17d82ccb1cbcdfd3f8510aa83dbdd202 /usr.sbin/smtpd
parent730dad3a252b6ea7da98d207a8b5e6f4a0c09fd8 (diff)
Rewind the message fp before starting the SMTP dialog.
It could have been read before during an aborted session on a previous MX. reported by Vianney Bouchaud <vianney@poolp.org> ok gilles@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/mta.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/mta.c b/usr.sbin/smtpd/mta.c
index 9e0a06dd5c7..bd079ab80ff 100644
--- a/usr.sbin/smtpd/mta.c
+++ b/usr.sbin/smtpd/mta.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mta.c,v 1.123 2012/01/13 14:01:57 eric Exp $ */
+/* $OpenBSD: mta.c,v 1.124 2012/01/26 12:31:53 eric Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -457,6 +457,7 @@ mta_enter_state(struct mta_session *s, int newstate, void *p)
*/
log_debug("mta: entering smtp phase");
+ fseek(s->datafp, 0, SEEK_SET);
pcb = client_init(s->fd, s->datafp, env->sc_hostname, 1);
if (s->ssl) {