mail_filter plugin: failed: EOF without input (Gedalya)

刘莹莹
Sat, 08 Feb 2020 11:29:07 -0000

I just modified mail-filter-out.sh like this:
cat &nbsp;mail-filter-out.sh
&nbsp; #!/bin/sh


&nbsp; USER=$1
&nbsp; cat &gt; /tmp/tempfile
&nbsp; cat /tmp/tempfile



cat &nbsp;/tmp/tempfile
This message is in MIME format.


--nsmail-7bjyg3nr5o-7bmibqhut9
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: base64


PHA+Jm5ic3A7PC9wPjxwPiZuYnNwOzIxMjEyMTIxPC9wPjxwPiZuYnNwOzwv
cD48cD4mbmJzcDs8L3A+PHA+Jm5ic3A7PC9wPjxwPiZuYnNwOzwvcD4tLS0t
PGRpdiBpZD0iY3MyY19tYWlsX3NpZ2F0dXJlIj48L2Rpdj48cD48L3A+


--nsmail-7bjyg3nr5o-7bmibqhut9--



But the log appears:
&nbsp; Feb 08 19:14:18 lda(q1 at
a.com)<71012&gt;<m+U/KQqYPl5kFQEA0J78UA&gt;: Panic: file
ostream.c: line 201 (o_stream_flush): assertion failed:
(stream-&gt;stream_errno != 0)
&nbsp; Feb 08 19:14:18 lda(q1 at
a.com)<71012&gt;<m+U/KQqYPl5kFQEA0J78UA&gt;: Error: Raw backtrace:
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-
dovecot/.libs/libdovecot.so.0(backtrace_append+0x42) [0x7f60cc7cc5c2] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-dovecot/.libs/libdovecot.so.0(backtrace_get+0x1e)
[0x7f60cc7cc6ce] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-dovecot/.libs/libdovecot.so.0(+0xe4bae)
[0x7f60cc7d6bae] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-dovecot/.libs/libdovecot.so.0(+0xe4bf1)
[0x7f60cc7d6bf1] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-dovecot/.libs/libdovecot.so.0(i_fatal+0)
[0x7f60cc733628] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-dovecot/.libs/libdovecot.so.0(+0x10bc67)
[0x7f60cc7fdc67] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-storage/.libs/libdovecot-storage.so.0(dbox_save_end+0x35)
[0x7f60ccb032e5] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-storage/.libs/libdovecot-storage.so.0(mdbox_save_finish+0x39)
[0x7f60ccaf7f99] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-lda/.libs/libdovecot-lda.so.0(+0x402e)
[0x7f60ccdec02e] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-storage/.libs/libdovecot-storage.so.0(mailbox_save_finish+0x73)
[0x7f60ccade4b3] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-storage/.libs/libdovecot-storage.so.0(mail_storage_copy+0xc9)
[0x7f60ccad08f9] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-storage/.libs/libdovecot-storage.so.0(mdbox_copy+0x46)
[0x7f60ccaf8816] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-lda/.libs/libdovecot-lda.so.0(+0x3e1a)
[0x7f60ccdebe1a] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-storage/.libs/libdovecot-storage.so.0(+0x4e89c)
[0x7f60ccade89c] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-lda/.libs/libdovecot-lda.so.0(mail_deliver_save+0x1d7)
[0x7f60ccded457] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-lda/.libs/libdovecot-lda.so.0(mail_deliver+0x2fe)
[0x7f60ccdedc6e] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lda/.libs/lt-dovecot-lda(main+0x644)
[0x55e0340b3144] -&gt; /lib64/libc.so.6(__libc_start_main+0xf5)
[0x7f60cc350c05] -&gt;
/opt/svn/nsmail-dovecot-2.3.9_4/src/lda/.libs/lt-dovecot-lda(+0x3cb6)
[0x55e0340b3cb6]







------------------ Original ------------------
From:&nbsp;"dovecot-request"<dovecot-request at
dovecot.org&gt;;
Date:&nbsp;Sat, Feb 8, 2020 06:00 PM
To:&nbsp;"dovecot"<dovecot at dovecot.org&gt;;

Subject:&nbsp;dovecot Digest, Vol 202, Issue 11



Send dovecot mailing list submissions to
	dovecot at dovecot.org

To subscribe or unsubscribe via the World Wide Web, visit
	https://dovecot.org/mailman/listinfo/dovecot
or, via email, send a message with subject or body 'help' to
	dovecot-request at dovecot.org

You can reach the person managing the list at
	dovecot-owner at dovecot.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dovecot digest..."


Today's Topics:

&nbsp;&nbsp; 1. Re: mail_filter plugin: failed: EOF without input
(Gedalya)


----------------------------------------------------------------------

Message: 1
Date: Fri, 7 Feb 2020 23:48:28 +0800
From: Gedalya <gedalya at gedalya.net&gt;
To: dovecot at dovecot.org
Cc: ??? <576709166 at qq.com&gt;
Subject: Re: mail_filter plugin: failed: EOF without input
Message-ID: <84fcd237-4290-2518-c4cf-486a049d9231 at gedalya.net&gt;
Content-Type: text/plain; charset=gb18030

On 2/7/20 4:33 PM, ??? wrote:
&gt;
&gt; cat?mail-filter-out.sh
&gt; #!/bin/sh
&gt; cat &gt; tempfile
&gt; cat ?mail-filter.sh
&gt; #!/bin/sh
&gt;
&gt; USER=$1
&gt; cat &gt; tempfile
&gt;
&gt; Some important Error logs?
&gt; Feb 07 15:49:19 lda(q1 at
a.com)<53648&gt;<rY6oIH8WPV6Q0QAA0J78UA&gt;: Error: Mailbox INBOX:
Saving mail: write(/home/a.com/q1/storage/m.1) failed: EOF without input
&gt; Feb 07 15:49:19 lda(q1 at
a.com)<53648&gt;<rY6oIH8WPV6Q0QAA0J78UA&gt;: Info:
msgid=<77z2kkfmm1-7846bu3tx6 at nsmail6.0&gt;: save failed to INBOX:
Mailbox INBOX: Saving mail: write(/home/a.com/q1/storage/m.1) failed: EOF
without input
&gt; Feb 07 15:49:19 lda(q1 at
a.com)<53648&gt;<rY6oIH8WPV6Q0QAA0J78UA&gt;: Debug: auth-master:
conn unix:/var/run/dovecot/auth-master (pid=10651,uid=0): Disconnected:
Connection closed (fd=11)
&gt;
Hi,

Your scripts are reading all the available input and not producing any output.
This way the email message is lost.

You could add the line:

cat tempfile

or just replace "cat &gt; tempfile" with "tee &gt;
tempfile"




------------------------------

Subject: Digest Footer

_______________________________________________
dovecot mailing list
dovecot at dovecot.org
https://dovecot.org/mailman/listinfo/dovecot

------------------------------

End of dovecot Digest, Vol 202, Issue 11
****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://dovecot.org/pipermail/dovecot/attachments/20200208/78f6d79a/attachment.html>