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

[PM-1060] Added new forwarder (Forward Email <https://forwardemail.net>) #4809

Merged
merged 12 commits into from
Jun 9, 2023

Conversation

titanism
Copy link
Contributor

Type of change

- [ ] Bug fix
- [X] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Added new forwarder Forward Email ("FE"). Forward Email is 100% open-source on GitHub at https://github.com/forwardemail. Per email communication with a member of Bitwarden, we submitted this PR to save you time. Our users would love to be able to use FE through Bitwarden. Let us know if you have any questions! 🎉

Code changes

  • apps/browser/src/popup/generator/generator.component.html: Added FE to browser generator.
  • apps/desktop/src/app/vault/generator.component.html: Added FE to desktop generator.
  • apps/web/src/app/tools/generator.component.html: Added FE to web generator.
  • apps/web/webpack.config.js: Added FE to Content-Security-Policy ("CSP") - note that we had to add the domain at the root level similarly to Fastmail since our API endpoint has a domain name included in it and is dynamic.
  • libs/angular/src/components/generator.component.ts: Added FE to Angular generator component.
  • libs/common/src/email-forwarders/forward-email-forwarder.ts: Added FE forwarder class with API integration (see https://forwardemail.net/api for complete API reference and our GitHub sourcefor source code on the back-end).
  • libs/common/src/email-forwarders/forwarder-options.ts: Added FE to list of built-in forwarder options.
  • libs/common/src/services/usernameGeneration.service.ts: Added FE to user generation service (with default of hideaddress.net, which is a vanity domain we provide for free for all users with API keys).

@CLAassistant
Copy link

CLAassistant commented Feb 21, 2023

CLA assistant check
All committers have signed the CLA.

@bitwarden-bot
Copy link

Thank you for your contribution! We've added this to our internal Community PR board for review.
ID: PM-1060

@bitwarden-bot bitwarden-bot changed the title Added new forwarder (Forward Email <https://forwardemail.net>) [PM-1060] Added new forwarder (Forward Email <https://forwardemail.net>) Feb 21, 2023
titanism added a commit to forwardemail/forwardemail.net that referenced this pull request Feb 21, 2023
titanism added a commit to forwardemail/forwardemail.net that referenced this pull request Feb 21, 2023
@titanism
Copy link
Contributor Author

This PR is ready and tested on our side. We have also deployed both forwardemail/forwardemail.net@01731e2 and forwardemail/forwardemail.net@2c604c2 to production, which allows this PR's API request approach to work.

titanism added a commit to forwardemail/forwardemail.net that referenced this pull request Feb 21, 2023
@titanism
Copy link
Contributor Author

titanism commented Feb 21, 2023

Ok, with the last two fixes in forwardemail/forwardemail.net@6f5c12d (deployed to our production servers already) and 39079ed - this PR is now good to go. We fixed the authorization header in this PR specifically in the latter commit mentioned in this comment. Before it was "Authentication" header, but since we use Basic auth, we had to switch it to "Authorization" header with base64 encoded user/pass.

@titanism
Copy link
Contributor Author

Lastly, fcb1bcf fixes the end email generated via API response. We've tested this locally and it works!

PR is now ready for merge 💯 🚀 ✅ Let us know of any issues.

@titanism
Copy link
Contributor Author

titanism commented Mar 3, 2023

This PR is ready to go!!! ✅ We fixed the base64 encoding.

@titanism
Copy link
Contributor Author

titanism commented Mar 3, 2023

See related discussion here https://github.com/orgs/bitwarden/discussions/4924

@djsmith85
Copy link
Contributor

Hi @titanism and thank you for your contribution,

We are in the process of moving some files around in preparation for code-ownership. With that, some conflicts have shown up here. It should be fairly easy to resolve them, though.

Just also wanted to point out the work being done with #4963, which will also need to be incorporated here, once merged.

Kind regards,
Daniel

@dwbit
Copy link
Contributor

dwbit commented Apr 3, 2023

@titanism just wanted to make sure you had a chance to review @djsmith85's comments above?

titanism added a commit to forwardemail/forwardemail.net that referenced this pull request May 21, 2023
titanism added a commit to forwardemail/forwardemail.net that referenced this pull request May 21, 2023
titanism added a commit to forwardemail/forwardemail.net that referenced this pull request May 21, 2023
@djsmith85 djsmith85 self-assigned this May 25, 2023
@djsmith85
Copy link
Contributor

@titanism: I was looking into merging master and fixing any merge conflicts. Unfortunately I do not have permission to push these changes back onto your branch (master), so I cannot update this PR.

Could you please move your changes onto a new branch, where I have permission to push onto, in case any changes need to be made by me.

If this means creating a new PR, please mention me and link to this PR.

Kind regards,
Daniel

@djsmith85 djsmith85 added the needs-changes Closes PR if no further changes after 21 days label May 25, 2023
@titanism
Copy link
Contributor Author

@djsmith85 done! see your inbox and you should have collab access at https://github.com/forwardemail/clients.

Screen Shot 2023-05-25 at 12 19 58 PM

@djsmith85 djsmith85 requested a review from a team as a code owner May 25, 2023 18:13
@djsmith85 djsmith85 removed the needs-changes Closes PR if no further changes after 21 days label May 25, 2023
@titanism
Copy link
Contributor Author

Thank you @djsmith85 – also an exciting announcement: our team launched outbound SMTP support over the weekend!

@titanism
Copy link
Contributor Author

titanism commented Jun 5, 2023

@djsmith85 if you or anyone else @bitwarden need a test account or want to try us out - just create an account for free at https://forwardemail.net and then send an email support@forwardemail.net and we'll hook you up with a year or more of free credit 🙏 🙇

Copy link
Contributor

@djsmith85 djsmith85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@titanism Thanks again for your contribution.

The changes are looking good, and only needed some minor tweaks.

I have reviewed and verified the changes locally and these are now ready to get passed on to QA for testing.

Thank you for offering support with test accounts, I'm sure we'll be in touch

@djsmith85 djsmith85 added needs-qa Marks a PR as requiring QA approval and removed needs-qa Marks a PR as requiring QA approval labels Jun 6, 2023
@djsmith85
Copy link
Contributor

@titanism QA have given their approval and your changes are ready to get merged. They will be included in the 2023.6 release.

Thanks again for your contribution!

@djsmith85 djsmith85 merged commit d18b45a into bitwarden:master Jun 9, 2023
70 of 106 checks passed
@titanism
Copy link
Contributor Author

titanism commented Jun 9, 2023

Thank you! 🙏 👏

@titanism
Copy link
Contributor Author

titanism commented Jul 3, 2023

@djsmith85 Hi there 👋 just curious when this will get released? Is 6.0.0 coming out soon?

@withinfocus
Copy link
Contributor

@titanism 👋 -- our next server release, 2023.7, is intended to be released next week.

};
const url = `https://api.forwardemail.net/v1/domains/${options.forwardemail.domain}/aliases`;
requestInit.body = JSON.stringify({
labels: options.website,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi - I noticed this option appear the other day and tried to use it for the first time today - unfortunately I hit a bit of an issue.

It seems like it doesn't work if the website URL is too long - it fails with the error:

Forward Email error: Labels.0 is longer than the maximum allowed length (20).

I noticed that Alias labels on Forwardemail are restricted to length 20, and a quick look at this PR shows that it looks like it's trying to add the website url as a a label on this line.

This means website URLs longer than 20 characters will fail to generate a name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed and deployed @Woodham – try again, it should work! Thanks for reporting the issue 🙏

Ref: forwardemail/forwardemail.net@6c051dd

titanism added a commit to forwardemail/forwardemail.net that referenced this pull request Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants