mirror of
https://github.com/decke/smtprelay.git
synced 2026-04-25 12:55:54 +03:00
[PR #9] [MERGED] Expand allowedUsers email field to support comma-separated and domains #57
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/smtprelay#57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/decke/smtprelay/pull/9
Author: @JonathonReinhart
Created: 2/13/2021
Status: ✅ Merged
Merged: 2/14/2021
Merged by: @decke
Base:
master← Head:expanded-allowed-senders📝 Commits (7)
86c899cExpand allowedUsers email field to support comma-separated and domains05c9bfdRefactor AuthFetch() to return AuthUser struct4132854Ignore empty addrs after splitting commas18f6726Add tests for auth parseLine()0c25dabUpdate documentation in smtprelay.inicabf848Fix bug where addrAllowed() was incorrectly case-sensitivec980683Update allowedUsers allowed domain format to require leading @📊 Changes
5 files changed (+278 additions, -23 deletions)
View changed files
📝
auth.go(+42 -20)➕
auth_test.go(+89 -0)📝
main.go(+45 -2)➕
main_test.go(+94 -0)📝
smtprelay.ini(+8 -1)📄 Description
This closes #8 and implements Option 1.
In addition to the unit tests, this has been tested in production with the following sample:
Then I attempted to send mail (
sendmail):rootLinux usersendmail -r app@example.com me@gmail.com✔️sendmail me@gmail.com(effective address:root@appsrv.internal.example.com) ✔️sendmail -r not-app@example.com me@gmail.com❌ (failed, as expected)jreinhartLinux user:sendmail me@gmail.com(effective address:jreinhart@appsrv.internal.example.com) ✔️🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.