No. Changing client settings does not affect consensus rules. Only consensus rules determine what a valid transaction is. Since everything in Bitcoin is data, everything can be used for spam. Read this ffs:
https://www.bitmex.com/blog/the-unstoppable-jpg-in-private-keys
