Something like this should work:
Import-CSV C:\Temp\users.csv | % { Set-Mailbox $_.UserPrincipalName -MaxSendSize 0mb -AcceptMessagesOnlyFromSendersOrMembers @{add="user1","user2","user3"} -WhatIf}
where I'm making the assumption that the CSV file has the UserPrincipalName column to reference each user, and the set of objects to configure message restrictions is predefined (the same) for all users.
Make sure to run the sample with the -WhatIf switch, just in case.