Allow address.parse() to reject addresses with local hostnames
See original GitHub issueaddress.parse()
currently accepts addresses with a single-part domain as used for a local mail host, e.g. bleah@example
. I am currently working on a use case where we would only want to send to Internet addresses, like bleah@example.com
or bleah@foo.example.com
. It would be useful to have an option to reject addresses with single-part domains.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How can I resolve a hostname to an IP address in a Bash script?
The correct solution is to use getent ahosts <host> to try both IPv6 and IPv4 if needed. Worth mentioning: host, dig and nslookup...
Read more >How to configure hostname resolution to use a custom DNS ...
Host name -to-IP address resolution is accomplished through the use of a combination of local machine configuration information and network ...
Read more >Postfix Configuration Parameters
When rejecting non-address information (such as the HELO command argument or the client hostname/address), the Postfix SMTP server will transform a sender ...
Read more >8. Configuration Reference — BIND 9 9.18.8 documentation
Configuration file parsing and processing. database. Messages relating to the databases used internally by the name server to store zone and cache data....
Read more >How To Configure BIND as a Private Network DNS Server on ...
In this tutorial, we will go over how to set up an internal DNS server, using the BIND name server software (BIND9) on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It seems to be too use case specific to be included as a parser option. I can think of many similar specific use cases e.g.: do not allow domains of 3rd, 4th, Xth level; do not allow domains from specific top level domains; do not allow domains from a certain geo region… All that seems like a higher level of abstraction that lays out of the scope of the email address syntax parsing.
In your case the solution is as simple as:
So I think it is out of the scope of Flanker and should not be implemented. @b0d0nne11 what do you think?
We don’t really want to go to the trouble of calling
validate_address()
when all we want is to check the form of the address, but thanks.