some import configure: plugin { mail_filter = mail-filter %u # %u = username given to the script as first mail_filter_out = mail-filter-out %u } service mail-filter { executable = script /usr/local/bin/mail-filter.sh user = dovecot unix_listener mail-filter { mode = 0600 user = vmail } } service mail-filter-out { executable = script /usr/local/bin/mail-filter-out.sh user = dovecot unix_listener mail-filter-out { mode = 0600 user = vmail } } protocol lda { mail_plugins = quota sieve expire autocreate mail_filter auth_socket_path = /var/run/dovecot/auth-master rejection_subject = Rejected: %s lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes sendmail_path = /usr/sbin/sendmail } 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) -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20200207/3bec48d4/attachment.html>
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"
Maybe Matching Threads
- mail_filter plugin: failed: EOF without input
- mail_filter plugin: failed: EOF without input (Gedalya)
- mail_filter and mail_filter_out broken somewhere between 2.2.27 and 2.3.4, problem still exists in git
- Passing info from mail process to mail_filter plugin script?
- Is the users password available from a mail_filter?