by Helen Foster. ello,
Because messaging is a site rather than a course feature, it's not possible to disable it for specific courses.
The only way you can restrict messaging is by limiting it to specific users, or by creating a 'Can't send messages' role and assigning it to users in the system context. For more details, please see the documentation Messaging FAQ.