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

Allow adding a * to the alias list to rewrite all emails that are not matched by the other rules #12

Merged
merged 4 commits into from
Apr 29, 2024

Conversation

TimoKoole
Copy link
Contributor

Fixes
In our setup on our Reproduction environment we have actual emails of customers, however we never want these to go out during testing. Therefore we want to alias all emails to our test mailbox.

Changes proposed in this pull request:

  • Allow adding a * to the alias list to rewrite all emails that are not matched by the other rules

Checklist:

  • docs updated
  • tests updated
  • Changes.md updated
  • package.json.version bumped
  • published to NPM (will be done by @core)

Changes.md Outdated Show resolved Hide resolved
@msimerson
Copy link
Member

You are effectively creating an email catchall. These were quite popular for a time, but then became considered by many to be a not-very-good idea because spammers just invented random email address at your domain and dumped on them, in a big way, until you relented and killed off the catchall.

@TimoKoole
Copy link
Contributor Author

You are effectively creating an email catchall. These were quite popular for a time, but then became considered by many to be a not-very-good idea because spammers just invented random email address at your domain and dumped on them, in a big way, until you relented and killed off the catchall.

The thing is that our use case is rather unusual I guess? The Haraka server will only allow incoming traffic from within the corporate network, and we want to catch all mail going out. The alternative in current setup would be to create a alias for every existing email domain in our customer database and constantly keep that up to date, which does scale well at all.

@msimerson msimerson merged commit bf884bf into haraka:master Apr 29, 2024
2 checks passed
@msimerson
Copy link
Member

The thing is that our use case is rather unusual I guess?

Maybe, but Haraka is a running with scissors MTA, so we should stand in the way. Sorry for not merging this sooner.

@msimerson msimerson mentioned this pull request Apr 29, 2024
msimerson added a commit that referenced this pull request Apr 29, 2024
- index: make separate if blocks in cascading list
  - necessary, to prevent * rule from always matching
  - fixes #11 
- fix: wildcard + domain matches before domain. Fixes #15
- fix: rename config/aliases to config/aliases.json
- lint: remove duplicate / stale rules from .eslintrc
- dep: eslint-plugin-haraka -> @haraka/eslint-config
- deps: bump to latest versions
- chore: populate [files] in package.json
- doc(CHANGELOG) renamed from Changes
- doc(CONTRIBUTORS): added
- ci: update to shared GHA workflows
- added the option to alias all emails with \* (#12)
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

Successfully merging this pull request may close these issues.

2 participants