1. Create Bounced Email report in Salesforce.
2. Use Data loader or execute the below code in Developer Console.
List < Lead > listLeads = [ SELECT Id, EMAILBOUNCEDDate
FROM Lead
WHERE EMAILBOUNCEDREASON = ‘550 5.7.1 Relaying denied’
AND EMAILBOUNCEDDate = YESTERDAY
LIMIT 300 ] ;
for ( Lead obj : listLeads ) {
obj.EMAILBOUNCEDDate = null;
obj.EMAILBOUNCEDREASON = null;
}
update listLeads;
FROM Lead
WHERE EMAILBOUNCEDREASON = ‘550 5.7.1 Relaying denied’
AND EMAILBOUNCEDDate = YESTERDAY
LIMIT 300 ] ;
for ( Lead obj : listLeads ) {
obj.EMAILBOUNCEDDate = null;
obj.EMAILBOUNCEDREASON = null;
}
update listLeads;
Note:
Update the report filter and SOQL filter accordingly.