While it is unlikely that MX domain checks alone will cause high server load (depending on the network and DNS configuration), you can disable this functionality within Email::Valid by setting the parameter -mxcheck to 0 - This allows you to merely check the email as valid with regard to RFC822 specification or alike. eg.
print (Email::Valid->address( -address => 'email@address.com',
-mxcheck => 0 ) ? 'yes' : 'no');
With regard to the number of email addresses getting bounced and ending up in retry or bad message queues, it may be worth either modifying your MTA configuration to minimise retries before delivery failure or rewriting the mail code to attempt SMTP delivery to the lowest preference mail exchanger directly and discarding the message if delivery is not achieved within a set number of attempts. You could also set up a mailbox directed to /dev/null for bounce messages.
There is of course a balance which you will be able to find between server load elevated by Email::Valid MX domain lookups and repeated MTA delivery attempts. My guess is that the load increase attributable to MX domain lookups will be negligible.
Good luck.
Ooohhh, Rob no beer function well without! |