update
This commit is contained in:
@ -145,10 +145,10 @@ export const SMTP_PATTERNS = {
|
||||
// Match parameter format: "PARAM=VALUE"
|
||||
PARAM: /\s+([A-Za-z0-9][A-Za-z0-9\-]*)(?:=([^\s]+))?/g,
|
||||
|
||||
// Match email address format - made much more permissive
|
||||
// This only does very basic format validation to avoid rejecting valid addresses
|
||||
// According to RFC 5321, we should accept a wide variety of sender formats
|
||||
EMAIL: /^[^\s@]+(@[^\s@]+\.[^\s@]+)?$/,
|
||||
// Match email address format - basic validation
|
||||
// This pattern rejects common invalid formats while being permissive for edge cases
|
||||
// Checks: no spaces, has @, has domain with dot, no double dots, proper domain format
|
||||
EMAIL: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
|
||||
|
||||
// Match end of DATA marker: \r\n.\r\n or just .\r\n at the start of a line (to handle various client implementations)
|
||||
END_DATA: /(\r\n\.\r\n$)|(\n\.\r\n$)|(\r\n\.\n$)|(\n\.\n$)|^\.(\r\n|\n)$/,
|
||||
|
Reference in New Issue
Block a user