#haraka

/

      • DragonPunch joined the channel
      • DragonPunch joined the channel
      • SynchroM joined the channel
      • tellnes has quit
      • tellnes joined the channel
      • dopesong joined the channel
      • SynchroM has quit
      • SynchroM joined the channel
      • Blackwind joined the channel
      • Blackwind
        Hello!
      • _smf_
        Hello
      • Blackwind
        hello
      • Hi, please can I use a php mailer and Haraka in the same time?
      • I want to run haraka and send with local host using php mailer
      • _smf_
        One is an SMTP client and the other a server, so yeah.
      • Blackwind
        is that possible?
      • I will just have to install postfix maybe?
      • _smf_
        You would use either Haraka or Postfix, not both.
      • Blackwind
        I got it. so I just need to run haraka in a my ubuntu cloud server and upload php mailer and send
      • _smf_
        Unless you have some genuine reason to use Haraka (e.g. you need to use the plugins for a specific purpose), then I'd suggest you just go with Postfix.
      • Blackwind
        right ?
      • i want to use haraka for email marketing
      • _smf_
        Haraka has nothing to do with email marketing.
      • It's simply a pluggable SMTP server.
      • Blackwind
        I think it can be helpful for me to use for email marketing
      • you dont think that?
      • sorry smf for waisting your time
      • im thankful for your help
      • what mean ? <_smf_> One is an SMTP client and the other a server,
      • _smf_
        PHP Mailer is just an SMTP client.
      • Haraka is an SMTP server.
      • If you don't know whether you should use Haraka or Postfix, then I suggest you go with Postfix. It's well documented, fast and perfectly capable for your usage.
      • Blackwind
        I have problem with Postfix to send the email Inbox
      • _smf_
        The only reason to use Haraka is if you need to be able to write custom plugins.
      • Oh - what problem?
      • Blackwind
        some email filters block the server IP every 1000 emails
      • I need a plugin to make random non blacklisted IP servers. and send all the email list in one time
      • with good headers
      • _smf_
        Hahaha - so basically you're sending spam.
      • Blackwind
        email marketing, im a small company
      • _smf_
        And you want to showshoe with multiple IPs.
      • Hahaha - good luck with that.
      • p.s. Postfix can use multiple IPs for delivery too.
      • I'm going now - bye.
      • Blackwind
        how smf
      • thanks smf
      • Blackwind has quit
      • dopesong joined the channel
      • EyePulp joined the channel
      • DragonPunch joined the channel
      • DragonPunch joined the channel
      • DragonPunch joined the channel
      • busybox42 joined the channel
      • dopesong joined the channel
      • ampzamp joined the channel
      • ampzamp has quit
      • brad_r joined the channel
      • brad_r
        Hi anyone around?
      • Matt you here?
      • _smf_
      • _smf_
        I'm (sort of) here.
      • I probably won't be for long though.
      • brad_r
        _smf_: I was wondering about how you would implement a hook for email going outbound? I am trying to do a hook_data but at the recipient level? Currently I have a hook on send_email but I'd rather not have to re-parse and re-compile the mime to minipulate the body
      • _smf_
        I already explained that. You can't have a hook_data for each recipient. It's any impossible task.
      • any=an
      • SMTP simply doesn't work like that.
      • brad_r
        _smf_: Right I remember, you can hook send_email though
      • and modify the message on disk
      • _smf_
        Right, that's in outbound. Once a message is accepted by outbound, it's queued to disk. You can set always_split=true to force outbound to write one queue file per recipient.
      • Blackwind joined the channel
      • But to modify the message - you would have to re-parse it.
      • There's no way around that.
      • Blackwind
        hello! :)
      • _smf_
        If you mess with the queue files, then you're going to have issues with locking.
      • Haraka doesn't do any locking of them at all (for speed) because only a single PID can access them. That's why it's quick.
      • brad_r
        _smf_: SHould I try to hook before it queues it to disk, but after it accepts it in outbound?
      • _smf_
        No - because if you do that. You modify the message for every recipient.
      • brad_r
        _smf_: Where would you build the hook if you wanted to modify at a per recipient basis?
      • _smf_
        I don't really know. I'd have to read outbound.js and work out where it picks up a queued message for sending and re-parse it there somehow.
      • It's going to be a *lot* of work.
      • brad_r
        _smf_: Yes thats what I tried to do too. When outbound.js pulls it from disk, it sends it upstream without parsing it
      • _smf_
        Yeah - you're going to have to add that. Like I said - it's going to be hard.
      • And potentially quite slow.
      • brad_r
        I think its best to do it as its being written to queue, rather then before its sent
      • _smf_
        If you think so. I can't exactly remember how it splits the queue files. But read the always_split logic. You might be able to do something there, but I'm 99% sure you won't be able to do it without a re-parse.
      • In fact make that 100% as I just remembered how the body modifications code works.
      • brad_r
        _smf_: Yea I know this requirement is a challenge! I wonder if maybe I can write the code before it hits outbound to split it per recipient
      • _smf_
        Like I said before - if you do that, then it will affect all the recipients.
      • Go and read up on Node streams. That's what is passed to outbound.
      • brad_r
        yea
      • _smf_
        The body modifications code buffers the whole message into memory and allows replacement code to run whilst the message is being streamed in. The moment the ending dot is seen, the whole thing is written to the message stream.
      • It's just not doable without rewriting the whole SMTP engine and the body modification code.
      • And I'm pretty much sure we wouldn't accept that code back into Haraka either if you did it that way.
      • brad_r
        I am not going to rewrite the *whole* thing I am just going to hook into a part, parse it and deliver it back as a stream
      • _smf_
        Sure - sounds simple. Isn't though.
      • brad_r
        Thanks for your help! Btw I definitely don't think you should fix smtp_forward, that code seems redundant to outbound.js
      • yea i know i have been working on it for awhile
      • _smf_
        smtp_forward and outbound are totally different things.
      • brad_r
        well I understand different purposes but they both use an "smtp client"
      • _smf_
        And yeah - switching outbound to use smtp_client is on TODO list.
      • The reasons why they are separate currently is purely because outbound was added at the same time someone else was working on smtp_client.
      • So they kind of came along at similar times IIRC.
      • I don't particularly care for smtp_client in it's current state. The reason it works like it does was for smtp_proxy.
      • smtp_proxy and smtp_forward are essentially the same plugin but work in two different methodologies.
      • brad_r
        got it. I am not using haraka to deliver, im simply using it as a proxy to be an smtp server transform a message and then send it to an upstream smtp server to deliver the message
      • yea i saw that
      • Originally I made by own smtp_forward that used an external low level smtp-connection module
      • _smf_
        For your case, smtp_forward or smtp_proxy would work just fine. However your requirement to modify the message per-recipient wouldn't work with them.
      • brad_r
        I changed to outbound when I noticed that always_split functionality
      • _smf_
        outbound is a traditional queue-and-deliver MTA function. e.g. spool the message to disk, accept the message for delivery from the SMTP client and then attempt delivery and handle bounces or deferrals.
      • brad_r
        ya exactly
      • _smf_
        It's therefore the only place to attempt what you want to do. You have to modify the message as it's being sent to the destination.
      • And set always_split = true.
      • Anything else would be a hack and probably wouldn't work very well. And when I say that I mean missing or corrupt messages etc.
      • brad_r
        I am thinking for a first iteration just hook_queue and then split then modify then call upstream smtp servers multiple times with the same message to different recipients
      • _smf_
        You can do that - but like I said it's a huge hack.
      • Blackwind
        hey smf how u doing? yesterday you told me that I can send emails with multiple IP and hostname using postfix, what should I type to google to find this?
      • _smf_
        What happens if one of the SMTP servers goes offline after you've sent the message to one recipient?
      • Blackwind
        using a random script
      • _smf_
      • I've never tried it myself. as I don't use Postfix.
      • If you need help then ask on #postfix ....
      • brad_r
        Postfix is the hardest thing to understand!
      • Blackwind
        oh I see
      • and what do you think brad? what is the best ? because the mailing list I use to send emails. they block my IP server every 1000 emails
      • brad_r
        use haraka
      • _smf_
        Right - I'm going to bed. Night.
      • brad_r
        good night thanks for oyur help
      • always a great discussion
      • Blackwind
        thanks smf :)
      • brad_r
        Blackwind: If your ip is getting blocked not sure how changing your smtp server is going to help, besides throtteling
      • Blackwind
        I have cloud server, and I use to create a lot of servers so I can just send a lot, beause every server IP send only 1000
      • the mailing list they have a bad filtre
      • brad_r has quit
      • Blackwind has quit