#haraka

/

      • EyePulp joined the channel
      • EyePulp has quit
      • ultimatt2 has quit
      • EyePulp joined the channel
      • ultimatt2 joined the channel
      • teknix_ has quit
      • ultimatt2 has quit
      • DarkSorrow joined the channel
      • DarkSorrow
        hello
      • iojs 2.0 is out :O
      • kpsullivan joined the channel
      • i'm getting weird error with npm install when i try with iojs o=
      • anyone tried the new version? tho i think it comes from npm but its weird
      • ok i guess i should wait for their fixes xD
      • seems that there is abug comiling some native c library when you make the upgrade
      • _smf_
        That wouldn't surprise me.
      • Why don't you gist the output.
      • I suspect node-syslog won't compile.
      • It's not really needed any more anyway.
      • DarkSorrow
        i rebooted but i saw the same error wait i should still have it open
      • but its a pb with node-gyp it was written
      • passing 2 args instead of 4
      • its reported already it seems
      • i didn't get the exam error he had
      • and for me it was on hiredis and iconv
      • but on this one they say they'll have a proposal on the next version so i guess i'll wait to see there D=
      • tho when i did just a npm install iconv on another directory
      • it was working fine, but installed the version 2.0.7
      • it was trying to install the 2.0.6 on the old directory
      • guess there is some dependency somewhere
      • xD "Oh, you'll love io.js 3.0 in a couple of weeks then."
      • mmmh (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA verify=FAIL);
      • this is because i self signed my certificate right?
      • in the received header in haraka =o
      • _smf_
        DarkSorrow: probably.
      • Actually - that means that the client couldn't be verified.
      • Which if it was an MUA - that's expected as clients don't typically present client TLS certificates.
      • Whereas other MTAs do.
      • DarkSorrow
        i just sent it with outlook =o
      • tho
      • i should check with some other code i guess
      • but when i first send a mail from outlook it was asking me to validate my certificate
      • and somehow gave me a warning
      • guess gotta pay the mafia certiciate as some guy said a long time ago in a meeting xD
      • _smf_
      • That's what I use - cheeeeeep cheeeeeep.
      • DarkSorrow
        thanks i'll take a look works with companies right?
      • http://www.startssl.com/?app=40 cause i was checking them
      • _smf_
        DarkSorrow: compaines?
      • DarkSorrow
        sorry yeah but yeah ir ead =p
      • it was just the other ssl website i showed you the less expensive one are not for a company but for an individual person
      • but its fine anyway, i know my boss has a certification from digicert
      • for the main website
      • i was just looking for certs for the haraka servers
      • but he said he'll take some extension there anyway D=
      • _smf_
        DarkSorrow: if you have a wildcard certificate for your website, then you can use that for your SMTP servers too.
      • baudehlo
        morning
      • _smf_
        morning
      • EyePulp joined the channel
      • DarkSorrow
        morning
      • its raining :(
      • audy
        dark
      • EyePulp joined the channel
      • DarkSorrow
        :o?
      • baudehlo has quit
      • baudehlo joined the channel
      • thezeroth
        is there any way to access attachments in Haraka plugins ? or there is an object for attachments like BodyObject
      • _smf_
      • See transaction.attachment_hooks
      • thezeroth
        _smf_: cool :)
      • _smf_
        If you're after text/* parts though. you can get them via connection.transaction.body[.children]
      • thezeroth
        _smf_: just want to know, I can access them in queue plugins and create new mail json object sort of
      • ?
      • _smf_
        No; the transaction hooks run as the message comes in.
      • e.g. as the message is parsed
      • It really depends what you want to do.
      • Creating a JSON object with all the binary data also isn't going to work too well.
      • thezeroth
        _smf_: I want to put the arrived email in to structured json with all attachments and stuff then pass that json obj to say rabbitmq
      • _smf_
        thezeroth: but JSON doesn't support binary data?
      • thezeroth
        _smf_: my attempt will be to upload that image on s3 and keep the link in my json object
      • _smf_
        Then the attachment hooks are what you need.
      • thezeroth
        _smf_: is there any doc about what all hooks are there and what they do
      • _smf_
        Use then to create the S3 files and store the metadata e.g. filename, content-type, content-disposition, content-transfter-encoding and S3 location in transaction.notes.
      • thezeroth: you'll have to read everything in the docs/* directory on Github
      • thezeroth
        _smf_: digging the same dir :)
      • _smf_
        generally - there is one hook per SMTP command and the hooks fire in a logical order based on an SMTP transaction.
      • ultimatt2 joined the channel
      • thezeroth
        understood thanks :)
      • DarkSorrow has quit
      • _smf_: give me some hit please, so as I said I have to make that object so I can create plugin which runs before Queues, like with data.headers ? and if yes how do I pass the new object forward to queue ?
      • _smf_
        thezeroth: you'd build your structure inside a transaction note e.g. transaction.notes.json_obj = {}; and you can build up the structure as you go e.g. attachment_hooks etc. and then you simply take the object that you built and then in hook_queue you'd do something like var json = JSON.stringify(connection.transaction.notes.json_obj); and then pass the output to RabbitMQ or whatever.
      • That connection.notes, connection.transaction.notes structures are specifically designed with the need in mind that you'd want to share data between plugins.
      • thezeroth
        _smf_: awesomeness I love this architecture of Haraka :)
      • _smf_
        thezeroth: just a word of warning with the attachment_hooks; they're a bit 'tricky' to work with
      • I suggest you have a look at the attachment plugin as to how I handle them there.
      • thezeroth
        _smf_: sure will do that :)
      • _smf_
        Basically - you have have a hook_data_post function that waits for all of the attachment_hooks to complete.
      • Otherwise; what will happen is that Haraka will accept the message before they complete, which is bad ;-)
      • godsflaw has quit
      • ultimatt2
        any comments on the Gruntfile PR?
      • thezeroth
        _smf_: yeah was reading that part in attachments plugins
      • _smf_
        ultimatt2: not from me. baudehlo is going to be busy for the next week and a half as he has visitors.
      • thezeroth
        _smf_: and just to make sure I dont face the json binary problem I will put that object in local db and pass the reference by rabbit mq
      • _smf_
        thezeroth: why don't you just put the whole message in raw format inside the JSON?
      • thezeroth
        _smf_: you mean base64 and stuff ?
      • _smf_
        e.g. let whatever you're sending it to do the decoding.
      • Yeah
      • thezeroth
        _smf_: thats the actual plan just before I send the real raw message to the receive I want to put this parts in json obj like in attachements array I will have objects with meta info of file + the base64 of the data if I get that done then I dont need db at all
      • because My receiver is in golang and goland dont have anything good to parse raw emails
      • golang*
      • baudehlo
        I'm surprised.
      • You'd think someone would hve written something by now for go.
      • _smf_
      • thezeroth
        _smf_: that will just give you headers and body is till raw
      • godsflaw joined the channel
      • I was eating my head entire day on that
      • but writing the entire body parser which will give me separate parts is not possible for now no time in hand
      • _smf_: node has mailparser which is super
      • there is this https://gowalker.org/github.com/jhillyerd/go.en... but dosent support inline attachments well it just skips them
      • baudehlo
        ultimatt2: yeah I saw it - not sure I have any problem with it specifically - I assume it solves some sort of problem.
      • ultimatt2
        C has Makefile, perl has Makefile.PL, node.js has Gruntfile
      • there's a zillion handy little grunt tasks on npm that automate all sorts of tasks
      • like the included example, of checking your deps against npm version
      • that's the sort of thing I'll put in the wiki for releases, "run 'grunt versioncheck' and see if any modules *should* be updated (newer != better, use judgement!)"
      • baudehlo
        right
      • and I guess you can do "grunt publish" which would do "git tag, git push --tags, npm publish"
      • ultimatt2
        aye
      • I use grunt all over the place and have become quite fond of it
      • baudehlo
        yeah then I'm down for the idea. Haven't looked at the PR itself.
      • We use jake here.
      • I guess it's the same.
      • ultimatt2
      • teknix_ joined the channel
      • I didn't even know jake existed
      • baudehlo
        hah
      • I don't use it for much.
      • Just "jake seed" for seeding the DB.
      • ultimatt2
        I use grunt a *lot*
      • I even have my own extensions for it
      • (but so too does everyone that uses it much, I think)
      • b/c it's easy to just add some JS in the Gruntfile.js "config" file
      • baudehlo
        *nod*
      • I'd probably use jake more if I hadn't put our "build" stuff directly into our app.
      • (for JS and CSS)
      • ultimatt2
        considering how long it's been around, jake surprisingly (to me) hasn't attracted a very large following.
      • the docs look pretty good, but it seems like there's more 'manual' work to be done to automate any given task
      • baudehlo
        Maybe. Someone else implemented it here. Then I fired him.