Patch for MIME-formatted QSMBF messages
Peter Conrad <[email protected]>
| Newsgroups | gmane.comp.misc.pape.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, the attached patch enables qconfirm-return to work with MIME-formatted QSMBF messages as produced by Fred Lindberg's Qmail-MIME patch. It works by simply checking the second paragraph for the "Hi, this is the" key string if the first doesn't match, assuming that the first paragraph was actually the MIME boundary string. It has seen little testing. Use at your own risk. For the sake of completeness: I hereby put this patch into the public domain. Bye, Peter -- Peter Conrad Tel: +49 6102 / 80 99 072 [ t]ivano Software GmbH Fax: +49 6102 / 80 99 071 Bahnhofstr. 18 http://www.tivano.de/ 63263 Neu-Isenburg Germany
qconfirm-0.14.0-mime-qsmbf.patch
(text/plain, 973 B)
diff -rNU3 mail.orig/qconfirm-0.14.0/src/qconfirm-return.c mail/qconfirm-0.14.0/src/qconfirm-return.c
--- mail.orig/qconfirm-0.14.0/src/qconfirm-return.c 2004-03-21 20:18:17.000000000 +0100
+++ mail/qconfirm-0.14.0/src/qconfirm-return.c 2004-04-27 09:20:25.000000000 +0200
@@ -77,7 +77,13 @@
/* 'Hi. This is the' */
if ((r =getline(buffer_0, &sa)) == -1)
strerr_die2x(0, WARNING, "empty body.");
- if ((sa.len < 15) || ! str_start(sa.s, "Hi. This is the")) die_noqsbmf();
+ if ((sa.len < 15) || ! str_start(sa.s, "Hi. This is the")) {
+ /* Maybe this is a MIME-formatted QSMBF message and we found the boundary.
+ * The next paragraph should be the actual QSMBF text. */
+ if (next_paragraph(buffer_0) == -1) die_noqsbmf();
+ if ((r =getline(buffer_0, &sa)) == -1) die_noqsbmf();
+ if ((sa.len < 15) || ! str_start(sa.s, "Hi. This is the")) die_noqsbmf();
+ }
if (next_paragraph(buffer_0) == -1) die_noqsbmf();
/* failure paragraph */