Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot pipe while currently piping #5

Closed
simonszu opened this issue Mar 29, 2018 · 3 comments
Closed

Error: Cannot pipe while currently piping #5

simonszu opened this issue Mar 29, 2018 · 3 comments

Comments

@simonszu
Copy link

simonszu commented Mar 29, 2018

system info

Haraka Haraka.js — Version: 2.8.18
Node v9.10.0
OS Linux 5c31aaa9ffc0 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux
openssl OpenSSL 1.0.1t 3 May 2016

Expected behavior

Inbound mail gets piped to rspamd, rspamd processes the mail, and reports it back to Haraka

Observed behavior

[INFO] [10CB0DC5-76EA-415E-899B-5904750B604F.1] [core]  hook=rcpt plugin=rcpt_to.alias_forward function=alias_forword params=<mail@simonszu.de> retval=OK msg=""
[NOTICE] [10CB0DC5-76EA-415E-899B-5904750B604F.1] [core] recipient <mail@simonszu.de> code=OK msg="" sender=mail@simonszu.de
[CRIT] [10CB0DC5-76EA-415E-899B-5904750B604F.1] [core] Plugin rspamd failed: Error: Cannot pipe while currently piping
    at MessageStream.pipe (/home/node/.npm-global/lib/node_modules/Haraka/messagestream.js:324:19)
    at Plugin.exports.hook_data_post (/home/node/.npm-global/lib/node_modules/Haraka/node_modules/haraka-plugin-rspamd/index.js:163:43)
    at Object.plugins.run_next_hook (/home/node/.npm-global/lib/node_modules/Haraka/plugins.js:505:28)
    at Object.plugins.run_hooks (/home/node/.npm-global/lib/node_modules/Haraka/plugins.js:422:13)
    at MessageStream.end_callback (/home/node/.npm-global/lib/node_modules/Haraka/connection.js:1605:21)
    at MessageStream._write (/home/node/.npm-global/lib/node_modules/Haraka/messagestream.js:137:41)
    at ChunkEmitter.<anonymous> (/home/node/.npm-global/lib/node_modules/Haraka/messagestream.js:63:22)
    at ChunkEmitter.emit (events.js:180:13)
    at ChunkEmitter.end (/home/node/.npm-global/lib/node_modules/Haraka/chunkemitter.js:58:18)
    at MessageStream.add_line_end (/home/node/.npm-global/lib/node_modules/Haraka/messagestream.js:114:28)
[NOTICE] [17C9FE55-F6E7-4220-A565-84190D48522E.1] [core] message mid=<17C9FE55-F6E7-4220-A565-84190D48522E.1@tharan.simonszu.de><17C9FE55-F6E7-4220-A565-84190D48522E.1@tharan.simonszu.de>

<09d40d7b72932142724358036c59e0ee.squirrel@webmail.tu-dortmund.de>
 size=957 rcpts=1/0/0 delay=0.012 code=CONT msg=""
[NOTICE] [17C9FE55-F6E7-4220-A565-84190D48522E.1] [core] queue code=CONT msg=" (17C9FE55-F6E7-4220-A565-84190D48522E.1)"
[CRIT] [-] [core] Error: connect ECONNREFUSED 172.19.1.29:11333
[CRIT] [-] [core]     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1173:14)
[NOTICE] [-] [core] Shutting down

and haraka crashing after that
(please ignore any domains in this error log, it was pasted together from two subsequent crashes, maybe the domains do not fit together. However, the log is the same)

Steps to reproduce

Install Haraka with the following plugins enabled (in this order):

Rspamd is on another host (speak: docker container) with the following config:

host = rspamd_app_1
port = 11333
add_headers = sometimes

[dkim]
enabled = true

[header]
bar = X-Rspamd-Bar
report = X-Rspamd-Report
score = X-Rspamd-Score

[check]
authenticated=false
private_ip=false

[reject]
message = Detected as spam
authenticated=false
spam = true

[rmilter_headers]
enabled = true

[spambar]
positive = +
negative = -
neutral = o

Wait until Haraka gets an inbound mail to process.

@simonszu simonszu changed the title Error: Cannot pipe while currently pipint Error: Cannot pipe while currently piping Mar 29, 2018
@simonszu
Copy link
Author

Hm, this could be a problem of the rcpt_to.alias_forward plugin as well...

@msimerson
Copy link
Member

The previous issues we had with dkim_sign throwing this error might prove helpful to you. Here's a repo search cannot pipe while currently piping.

@msimerson
Copy link
Member

I took a quick look at rcpt_to.alias_forward plugin and you need to be more careful of flow control and making sure to call next() exactly once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants