]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
submssion: DATA command: Seek data stream to the beginning before executing backends.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Fri, 28 Dec 2018 18:16:26 +0000 (19:16 +0100)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 17 Jan 2019 11:02:59 +0000 (11:02 +0000)
src/submission/submission-backend.c

index 4121fcb4e657642d4e8a6c07de1a4d9cd565bcf3..9c590702cb074c67c00e3683be550c54166a006e 100644 (file)
@@ -388,6 +388,10 @@ int submission_backends_cmd_data(struct client *client,
 
        i_assert(array_count(&client->rcpt_backends) > 0);
 
+       /* Make sure data input stream is at the beginning (plugins may have
+          messed with it. */
+       i_stream_seek(data_input, 0);
+
        /* create the data_input streams first */
        array_foreach_modifiable(&client->rcpt_backends, bkp) {
                struct submission_backend *backend = *bkp;