| Comms Community Contribution This article has been received from the Comms Community. It has not yet been verified by Sun. |
How Can I Restrict the Characters Used in Envelope From Addresses?
After seeing a lot of garbage in our queues due to 'mail from's with control characters, we did an analysis (from our mail logs and searching around for what others are doing) on a reasonable policy for valid characters in the local part of the mail from. I know that we should technically be allowing more characters per the RFC, but we've been running like this for a while and haven't had any complaints.
(Note: The ^A is what is printed in the terminal, but it's actually ascii hex 0x01. You can type that in (it's not ^ and A) with vim and a bit of googling to find out how.)
In mappings:
FROM_ACCESS
!
! Prohibit invalid characters in anywhere in the uid
! ascii hex: 01-21, 24, 25, 28, 29, 2c, 3a, 3b, 3c, 3e, 5b-5e, 60, 7b, 7d
*|*|*|*|*|*|*|*|*$[^A-!$%(),;^`\{\}]%*@*|* $Ninvalid$ character$ in$ mail$ from
!
! Prohibit single character questionable characters
! in the local part of the envelope from address
! ascii hex: 23, 26, 27, 2a, 3b, 3f, 2b, 2d, 2e, 5f, 7e
*|*|*|*|*|*|*|*|$[#&'*=?+\-._\~]%@*|* $Ninvalid$ character$ in$ mail$ from
!
! Prohibit quoted single character questionable characters
! in the local part of the envelope from address
! ascii hex: 23, 26, 27, 2a, 3b, 3f, 2b, 2d, 2e, 5f, 7e
*|*|*|*|*|*|*|*|"$[#&'*=?+\-._\~]%"@*|* $Ninvalid$ character$ in$ mail$ from

