hello haraka team i have read the docs bt the plugins not doing anyhing i have created folder fro qmailqueue please have a look at a file tell me does it really send mail to qmail directory
dopesong has quit
dopesong joined the channel
dopesong joined the channel
vivek779 has quit
lakki has quit
dopesong joined the channel
donspaulding joined the channel
maerwald
what's the easiest way to access the whole raw mail data (as string)? Do I have to fiddle with messagestream?
or just do header.toString and body.bodytext and then concatenate?
EyePulp joined the channel
dopesong joined the channel
baudehlo
You don't have to "fiddle" with messagestream. It can give you the entire thing as a string.
messagestream.get_data(function (data) { ...
SynchroM has quit
SynchroM joined the channel
dopesong joined the channel
dopesong joined the channel
donspaulding joined the channel
maerwald
baudehlo: "cannot pipe while currently piping"
if I do anything else than console.log, it just errors out
baudehlo
It's currently piping. You can't do that.
maerwald
so how is it useful then?
baudehlo
It's useful if you do it in the right place.
Just don't do it there.
maerwald
I need it as a string, as I said
not parts of it
baudehlo
The problem is where you're trying to do it.
It's probably trying to deliver somewhere at the same time.
maerwald
so it is fiddling...
baudehlo
What hook are you doing it in?
maerwald
data_post
baudehlo
So maybe two things are trying to access it at once?
Because your transaction could have finished and messagestream emptied by the time you get to it.
bodytext isn't the contents of the mail though.
maerwald
close enough
baudehlo
It's likely to be "This is a multipart MIME message". If that's close enough for you, then you have weird requirements :)
ultimatt joined the channel
ultimatt has quit
dopesong joined the channel
dopesong joined the channel
ultimatt joined the channel
maerwald
there's nothing weird about proof of concept
don't want to deal with too many details and if accessing the raw mail is made difficult in haraka, I'll just use that hack
DoubleMalt has quit
_smf_ has quit
_smf_1 joined the channel
_smf_1 is now known as _smf_
godsflaw_ joined the channel
baudehlo
It's not made difficult, you just can't expect to read from disk blocking in node.
DoubleMalt joined the channel
godsflaw has quit
maerwald
I don't want to read from disk. I want the raw mail body.
if that forces me to deal with the side effects of message_stream, then I'd say it is difficult
notkoos joined the channel
baudehlo
the raw mail body may be on disk depending on whether it has been spooled or not.
That's the point.
If you *really* wanted a hacky way of doing it, in hook_data do: connection.client.on('data', function (data) { }) and just keep reading until data_post.
then use Buffer.concat() to create one big buffer.
maerwald
Yeah, could be worth a try.
I wonder what's the best way to "transform" the current mail into another one. I currently manipulate the transaction object, which works, but I thought maybe it's cleaner to use outbound.send_email from within data_post hooks. If the outnext function passed to send_email does next(OK), then I assume the original mail will not get sent?