It is not legal in the case of a company. They must also accept communications by post.
In the UK, "a company must at all times have a registered office to which all communications and notices may be addressed." (s 86, Companies Act 2006). It must display the address of its registered office on its website, business letters, and order forms (r 25, ...
If the ToS prescribe that you can only contact them on the first Tuesday of months with “r” in the name between 10:00 and 10:05 am, that would be valid too.
In the absence of a law that prohibits this (which AFAIK, there isn't) a company can set the methods and hours of contact as they wish.