[PR #409] [MERGED] Update lib.go: Changing mailFromRE and rcptToRE regex #551

Closed
opened 2026-03-15 14:25:28 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/axllent/mailpit/pull/409
Author: @ThomasLandauer
Created: 12/13/2024
Status: Merged
Merged: 12/14/2024
Merged by: @axllent

Base: developHead: patch-3


📝 Commits (3)

  • f59e748 Update lib.go: Changing mailFromRE and rcptToRE regex
  • 95682c4 Update lib.go
  • 97c8f15 Allow valid empty MAIL FROM value

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 server/smtpd/lib.go (+2 -2)

📄 Description

I don't know how to rebase so I started from scratch ;-)

Most important change is ( |$) in the middle, this removes the nested parentheses in the end; and therefore the entire regex is more readable I think (if a regex can be readable at all g...)

Anyway, this now fails on foo>@example.com.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/axllent/mailpit/pull/409 **Author:** [@ThomasLandauer](https://github.com/ThomasLandauer) **Created:** 12/13/2024 **Status:** ✅ Merged **Merged:** 12/14/2024 **Merged by:** [@axllent](https://github.com/axllent) **Base:** `develop` ← **Head:** `patch-3` --- ### 📝 Commits (3) - [`f59e748`](https://github.com/axllent/mailpit/commit/f59e7483bccd4ec8b3b2051f77e898eca25adeca) Update lib.go: Changing `mailFromRE` and `rcptToRE` regex - [`95682c4`](https://github.com/axllent/mailpit/commit/95682c48fc31345314cc6281017f7efc89e4c445) Update lib.go - [`97c8f15`](https://github.com/axllent/mailpit/commit/97c8f1597b0b7aee0d932a973bb5de153a987e57) Allow valid empty MAIL FROM value ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `server/smtpd/lib.go` (+2 -2) </details> ### 📄 Description I don't know how to rebase so I started from scratch ;-) Most important change is `( |$)` in the middle, this removes the nested parentheses in the end; and therefore the entire regex is more readable I think (if a regex can be readable at all *g*...) Anyway, this now fails on `foo>@example.com`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 14:25:28 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mailpit#551
No description provided.