Want to download email attachment from a specific domain (eg: email come from @yahoo.com all the email attachment download, if email comes from @gmail.com don't download email attachment )

Filter the mail by the sender and then downloading it will solve .

Please refer below link to filter mails
https://forum.uipath.com/t/how-to-filter-messages-in-get-outlook-mail-messages

Have a list of domains . Loops the domains and filter accordingly and download attachments if any