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

Mail forwarder #2297

Closed
pjebs opened this issue Nov 13, 2017 · 2 comments
Closed

Mail forwarder #2297

pjebs opened this issue Nov 13, 2017 · 2 comments

Comments

@pjebs
Copy link

pjebs commented Nov 13, 2017

Email forwarder:

My aim is to have a database that maps 1 email address to another based on a database table.
eg.
A@X.com (alias) => C@D.com (real email address)
E@X.com (alias) => P@Q.com (real email address)

When the incoming mail gets received and then forwarded to the real email address, the real email address should ideally not realise that the email was forwarded. When they click reply for example, it should reply to the original sender.

I tried to implement it using Haraka a while ago but services like hotmail and gmail recognised that a email forwarding was happening and rejected the forwarded email.

I was informed by @smfreegard #1318 (comment) , that I must use SRS sender rewriting scheme for forwarding.

I found a plugin that supposedly does that:
https://github.com/swerter/haraka-plugins/blob/master/plugins/srs.js (this should be included with Haraka in my opinion)
https://gist.github.com/64kps/285ff2c3dce9d326f910

I was now wondering how to do the actual sending. Which plugin do i use? I don't understand the subtle differences in the documentation:

Thanks in advance

@pjebs
Copy link
Author

pjebs commented Nov 14, 2017

I'm a bit confused by this:
In Outbound Mail, it says "Outbound mails are defined as those that have set the connection.relaying flag to true via a plugin".

In the "create your own disposable email server" tutorial, there is no mention of the plugin setting connection.relaying flag. Does that imply that the relay plugin IS NOT WHAT I WANT.

In that example, they change rcpt.user = match[1]; and the email magically gets sent out to the new address.
What part of the code made the email send out? Which plugin? They used test_queue in the plug in list, but if i used queue/smtp_forward or queue/smtp_proxy (I can't figure out how the subtle difference applies to me), would that forward the email?

@msimerson
Copy link
Member

I was now wondering how to do the actual sending.

Don't. Use nodemailer for sending emails.

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