#haraka

/

      • howitdo has quit
      • msimerson has left the channel
      • busybox42 has quit
      • EyePulp joined the channel
      • EyePulp has quit
      • tasansga1 joined the channel
      • tasansga has quit
      • EyePulp joined the channel
      • EyePulp has quit
      • doublemalt_ has quit
      • knutix joined the channel
      • knutix has quit
      • EyePulp joined the channel
      • EyePulp has quit
      • doublemalt_ joined the channel
      • Guest90 joined the channel
      • Guest90 is now known as firebadam
      • firebadam
        Hey,
      • I have a question, I have users authenticated with gmail api (accesstoken).
      • I would like to use haraka intermediate smtp. Main reason for that I would like to slight modify outgoing messages.
      • I'm not sure if using haraka is correct solution at all.
      • I would like to modify outgoing email per recipient, so when user sends email to:
      • both of them will get slightly different email (with token inserted per recipient).
      • If haraka is not a way to go can anyone give me some suggestions on how to approach that?
      • firebadam has quit
      • _smf_
        firebadam: modifying messages like that should be easy to do in Haraka. However I'm not sure about the GMail API accesstoken stuff though.
      • To use Haraka, they'd have to authenticate to Haraka instead or have it passthrough the authentication to Gmail.
      • In short - it's doable.
      • Guest90 joined the channel
      • EyePulp joined the channel
      • Guest90 joined the channel
      • Guest90 has quit
      • Guest90 joined the channel
      • Guest90 has quit
      • Guest90 joined the channel
      • Guest90
        _smf_ thaks for the insight. Is there other way to take care of authentication with gmail? Idea would be to just relay message via smtp.gmail.com (but I have to authenticate first).
      • Guest90 has left the channel
      • firebadam joined the channel
      • baudehlo
        I think you can use ordinary SMTP AUTH stuff with gmail via the access tokens.
      • (read the top bit, then scroll down to the SMTP section)
      • you basically send: "AUTH XOAUTH2 " + base64("user=" {User} "^Aauth=Bearer " {Access Token} "^A^A")
      • Guest90 joined the channel
      • Guest90
        Ok thanks :) now I'm looking how to connect all the pieces of that puzzle :)
      • busybox42 joined the channel
      • EyePulp joined the channel
      • moatak787 joined the channel
      • doublemalt_ has quit
      • moatak787
        Hi all, I've just got a Haraka server up and running now with emails routing through it using an outbound connector from exchange online, but I now want to allow relaying of all emails from Haraka server to another server. In the docs it says I can use "force_route" to do something like this but I can't find the .ini files where I should edit things, should I create these files from scratch or can I download them from anywhere? T
      • firebadam
        as I see you sometimes have to create them from scratch (they are not generated for you), I would look in repo for example .ini file
      • but I'm new to haraka :P
      • EyePulp
        firebadam: that's a fairly correct assessment regarding the .ini =)
      • Though I'm not familiar with the force_route one
      • firebadam
        Is there a tutorial saying how to setup haraka as simple relay to smtp.gmail.com
      • last1
        there isn't
      • moatak787
        regarding relaying, in the docs about relaying it says "Force routes and Destination Domains are enabled by setting in the [relay] section of relay.ini:"
      • I've search in the repo for this file but can't find a base example to use
      • last1
      • you should do your forwarding here
      • and routing
      • moatak787
        ah ok, is this superceding the relay.ini then?
      • since haraka now has outbound support?
      • last1
        wait, you want outbound ?
      • as far as I know, you can't do outbound authenticated relay
      • so you can't relay via your gmail.com account
      • but why not just let haraka do the deliveries for you ?
      • _smf_
      • moatak787
        we are accepting emails into haraka from another mail server and then want to re-route all these emails on to another specific server
      • does that count as outbound?
      • last1
        _smf_: didn't check the source code, just the relay doc. good to know!
      • moatak: all that you need is smtp_forward tehn
      • _smf_
        However currently it only support PLAIN, LOGIN and MD5 - so you'll need to add OAUTH2 firebadam
      • moatak787
        when you say it only supports those types, what are those used for?
      • last1
        moatak: users sending authenticated e-mail
      • that's not your case
      • moatak787
        ah ok, so I just need to host/port in the smtp_forward and set enable_outbound=true
      • *need to edit host/port
      • _smf_
        moatak787: yeah
      • last1
        correct
      • moatak787
        I see also that there is per-domain configuration, where it routes to different hosts depending on domain
      • last1
        _smf_: I know you used qmail, did you also use vpopmail ?
      • _smf_
        last1: I used neither of those ;-)
      • moatak787
        is this the domain of just the recipient, or can haraka also route to different hosts based on the sender?
      • last1
        moatak: rephrase those please
      • _smf_
        moatak787: they're the domain of the recipient. Doing it by sender wouldn't really make any sense.
      • moatak787
        is it possible to route emails on to different hosts based on the sender domain, rather than the recipient domains?
      • _smf_
        smtp_forward/smtp_proxy is used just to send all mail onwards to a single server
      • moatak787
        reason I want to do it by sender is because I want to route the email back through the sender's mail servers for those servers to make the final delivery
      • _smf_
        If you wanted to send stuff to different domains based on the recipient domain, then you'd be better of using outbound and creating forced routes for the domains.
      • moatak787: oh yeah - I forgot you wanted to do that.
      • moatak787: it's doable, but you'll have to write a custom plugin that uses the get_mx hook.
      • Basically - you'll get the senders domain, then force all the MX lookups to go via the senders server.
      • moatak787
        _smf_: we will know the IP address of the server(s) to route back for each sender domain, and can store this in a lookup table somewhere to use, so ideally no need for MX lookups
      • _smf_
        moatak787: yeah - that's what I said. You have to *override* the get_mx hook which would normally do MX lookups and return the value based on the senders address from your lookup table instead.
      • moatak787
        ah ok makes sense
      • But for testing in the meantime using just one host to forward all emails to I can use the smtp_forward method
      • since we want to test the basic loop structure of routing back through the original sending server
      • to add that plugin into the queue, do I just create the "queue" directory in the plugins directory and create a file called smtp_forward.js?
      • last1
        no
      • it's straight in the root
      • moatak787
        ah I see that I also need to create an smtp_forward.ini, would this reside in the same directory?
      • last1
        you only need to create smtp_forward.ini
      • _smf_
        You put it in the config directory
      • moatak787
        ok, does the smtp_forward.ini file have to include anything specific or can I just add the keys and values I want?
      • last1
        if you want something specific you probably need to include it :)
      • moatak787
        i.e. can I just add three lines with the enable_outbound, host, and port keys
      • _smf_
        Yes
      • moatak787
        great thanks!
      • does simply adding the smtp_forward.ini file with those values enable this routing or do I have to uncomment something in a file to make sure this is included?
      • last1
        enable the plugin in the plugins file
      • add this line: queue/smtp_forward
      • moatak787
        ok thanks
      • Guest90 joined the channel
      • I'm getting that the emails are being rejected because the recipient isn't in the haraka host_list, I checked the plugins file and I need to have at least one rcpt_to plugin for inbound mail
      • GitHubBot
        [13Haraka] 15msimerson closed pull request #1866: Added RabbitMQ vhost support (06master...06master) 02https://github.com/haraka/Haraka/pull/1866
      • moatak787
        how do I get it to accept relaying emails for all recipients?
      • doublemalt_ joined the channel
      • godsflaw has quit
      • godsflaw joined the channel
      • godsflaw has quit
      • godsflaw joined the channel
      • godsflaw has quit
      • godsflaw joined the channel
      • last1
        moatak: add the domain you need to accept mails for in rcpt_to.routes file
      • enable that plugin too in the plugins file
      • so that haraka knows you wish to accept mail for that domain
      • moatak787
        is that the domain of the sender of the email or the recipients?
      • I want to relay outbound emails, so I will know the sender domains but the recipient ones can be anything
      • godsflaw has quit
      • I'm not sure if I need to config outbound in haraka, or if that is more for send out emails directly from haraka (as opposed to relaying emails on from another server)
      • godsflaw joined the channel
      • EyePulp has quit
      • godsflaw has quit
      • last1
        nobody relays by sender domain
      • you relay by trusted IP/smtp auth
      • or you accept mail for recipients you know you host
      • otherwise you are an open relay and you don't want that
      • _smf_
        ^^ what he said
      • But then - if you already have a list of domains and IPs to relay messages back to - it's like that the source of the mail is probably the same IP, so you would simply allow relaying from the same IP.
      • brisby has quit
      • Thinking out loud - you could also allow relaying by sender domain *if* you used a 2nd factor to determine if the source host and sender domain should be allowed to relay, and for that you could use SPF. e.g. if SPF=Pass && sender_domain is configured, then allow relaying.
      • moatak787
        yes I am trying to accept relaying based on IP
      • GitHubBot
        [13Haraka] 15msimerson opened pull request #1868: Get pool (06master...06get_pool) 02https://github.com/haraka/Haraka/pull/1868
      • mattsimerson joined the channel
      • mattsimerson is now known as msimerson
      • moatak787
        I've added relay_acl_allow file with a list of IPs, and also the relay.ini file with acl=true
      • but I think I need to still enable relaying in another file?
      • since it is rejecting relaying emails