I just modified mail-filter-out.sh like this:
cat mail-filter-out.sh
#!/bin/sh
USER=$1
cat > /tmp/tempfile
cat /tmp/tempfile
cat /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:
Feb 08 19:14:18 lda(q1 at
a.com)<71012><m+U/KQqYPl5kFQEA0J78UA>: Panic: file
ostream.c: line 201 (o_stream_flush): assertion failed:
(stream->stream_errno != 0)
Feb 08 19:14:18 lda(q1 at
a.com)<71012><m+U/KQqYPl5kFQEA0J78UA>: Error: Raw backtrace:
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-
dovecot/.libs/libdovecot.so.0(backtrace_append+0x42) [0x7f60cc7cc5c2] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-dovecot/.libs/libdovecot.so.0(backtrace_get+0x1e)
[0x7f60cc7cc6ce] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-dovecot/.libs/libdovecot.so.0(+0xe4bae)
[0x7f60cc7d6bae] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-dovecot/.libs/libdovecot.so.0(+0xe4bf1)
[0x7f60cc7d6bf1] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-dovecot/.libs/libdovecot.so.0(i_fatal+0)
[0x7f60cc733628] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-dovecot/.libs/libdovecot.so.0(+0x10bc67)
[0x7f60cc7fdc67] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-storage/.libs/libdovecot-storage.so.0(dbox_save_end+0x35)
[0x7f60ccb032e5] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-storage/.libs/libdovecot-storage.so.0(mdbox_save_finish+0x39)
[0x7f60ccaf7f99] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-lda/.libs/libdovecot-lda.so.0(+0x402e)
[0x7f60ccdec02e] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-storage/.libs/libdovecot-storage.so.0(mailbox_save_finish+0x73)
[0x7f60ccade4b3] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-storage/.libs/libdovecot-storage.so.0(mail_storage_copy+0xc9)
[0x7f60ccad08f9] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-storage/.libs/libdovecot-storage.so.0(mdbox_copy+0x46)
[0x7f60ccaf8816] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-lda/.libs/libdovecot-lda.so.0(+0x3e1a)
[0x7f60ccdebe1a] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-storage/.libs/libdovecot-storage.so.0(+0x4e89c)
[0x7f60ccade89c] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-lda/.libs/libdovecot-lda.so.0(mail_deliver_save+0x1d7)
[0x7f60ccded457] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lib-lda/.libs/libdovecot-lda.so.0(mail_deliver+0x2fe)
[0x7f60ccdedc6e] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lda/.libs/lt-dovecot-lda(main+0x644)
[0x55e0340b3144] -> /lib64/libc.so.6(__libc_start_main+0xf5)
[0x7f60cc350c05] ->
/opt/svn/nsmail-dovecot-2.3.9_4/src/lda/.libs/lt-dovecot-lda(+0x3cb6)
[0x55e0340b3cb6]
------------------ Original ------------------
From: "dovecot-request"<dovecot-request at
dovecot.org>;
Date: Sat, Feb 8, 2020 06:00 PM
To: "dovecot"<dovecot at dovecot.org>;
Subject: 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:
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>
To: dovecot at dovecot.org
Cc: ??? <576709166 at qq.com>
Subject: Re: mail_filter plugin: failed: EOF without input
Message-ID: <84fcd237-4290-2518-c4cf-486a049d9231 at gedalya.net>
Content-Type: text/plain; charset=gb18030
On 2/7/20 4:33 PM, ??? wrote:
>
> cat?mail-filter-out.sh
> #!/bin/sh
> cat > tempfile
> cat ?mail-filter.sh
> #!/bin/sh
>
> USER=$1
> cat > tempfile
>
> Some important Error logs?
> Feb 07 15:49:19 lda(q1 at
a.com)<53648><rY6oIH8WPV6Q0QAA0J78UA>: Error: Mailbox INBOX:
Saving mail: write(/home/a.com/q1/storage/m.1) failed: EOF without input
> Feb 07 15:49:19 lda(q1 at
a.com)<53648><rY6oIH8WPV6Q0QAA0J78UA>: Info:
msgid=<77z2kkfmm1-7846bu3tx6 at nsmail6.0>: save failed to INBOX:
Mailbox INBOX: Saving mail: write(/home/a.com/q1/storage/m.1) failed: EOF
without input
> Feb 07 15:49:19 lda(q1 at
a.com)<53648><rY6oIH8WPV6Q0QAA0J78UA>: Debug: auth-master:
conn unix:/var/run/dovecot/auth-master (pid=10651,uid=0): Disconnected:
Connection closed (fd=11)
>
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 > tempfile" with "tee >
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>