Use the app object to extract all attachments for a specific sender. Filter the messages with attachments and add all the attachment ids and their corresponding message ids to a list/dict .