You'll need to use the after user registration trigger with a Usergroup action then condition that their email contains whatever you're checking for. Below should work.
Global
Triggers: onAfterUserRegistration
Type: Usergroup
User: Automatic
Access: Everybody
Conditions
Code:
[email] Does Contain @harvard.edu
Action
Mode: Add Usergroups
Groups: Select Your Usergroup Here
If you need to do this for multiple domains you'll have to use a REGEXP condition as follows instead of a Does Contain.
Conditions
Code:
[email] Is REGEX /@harvard1\.edu|@harvard2\.edu/