You can achieve this task in several different methods, but for the sake of giving you an example, let's assume you have the list of groups in a CSV file, with a column GroupEmail to designate each group's email address. Start by importing the list:
$groups = Import-CSV blabla.csv
Then, we use a simple cycle (foreach statement) to iterate over the groups, and toggle the -RequireSenderAuthenticationEnabled property (which controls the external message delivery setting):
$groups | % { Set-DistributionGroup $_.GroupEmail -RequireSenderAuthenticationEnabled $false }
Here % stands as an alias for the foreach statement; $_ represents the current object as it passes the pipeline, in other words it automatically represents each group object as imported from the CSV; $_.PropertyName will represent the value of the corresponding property for the current group, in our case this will be the email address as imported from the CSV.