You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

smtp_address.rl 1.1KB

123456789101112131415161718192021222324252627282930313233343536
  1. %%{
  2. machine smtp_address;
  3. # SMTP address spec
  4. # Source: https://tools.ietf.org/html/rfc5321#section-4.1.2
  5. # Dependencies: smtp_base + smtp_ip
  6. # Required actions:
  7. # - User_has_backslash
  8. # - User_end
  9. # - Quoted_addr
  10. # - Domain_start
  11. # - Domain_end
  12. # - Addr_end
  13. # - Addr_has_angle
  14. # - Valid_addr
  15. # - Empty_addr
  16. # + from deps:
  17. # - IP4_start
  18. # - IP4_end
  19. # - IP6_start
  20. # - IP6_end
  21. # - Domain_addr_start
  22. # - Domain_addr_end
  23. # SMTP address spec
  24. # Obtained from: https://tools.ietf.org/html/rfc5321#section-4.1.2
  25. QcontentSMTP = qtextSMTP | quoted_pairSMTP %User_has_backslash;
  26. Quoted_string = ( DQUOTE QcontentSMTP* >User_start %User_end DQUOTE ) %Quoted_addr;
  27. Local_part = Dot_string >User_start %User_end | Quoted_string;
  28. Mailbox = Local_part "@" (address_literal | Domain >Domain_start %Domain_end);
  29. UnangledPath = ( Adl ":" )? Mailbox >Addr_start %Addr_end "."?;
  30. AngledPath = "<" space* UnangledPath space* ">" %Addr_has_angle;
  31. Path = AngledPath | UnangledPath;
  32. SMTPAddr = space* (Path | "<>" %Empty_addr ) %Valid_addr space*;
  33. }%%