So VERP means that the "technical" sender (smtp envelope) is different for each mail sent. the benefit is that if a bounce comes back to this unique address, we know what email/contact it is (something that is impossible otherwise, as the invalid email might be hidden behind a mail forward)
To make it work, you need two things from your hosting provider:
- being able to set the technical sender to be different than the visible from email
- being able to receive the VERP emails back (the trick is usually to have emails servers that can handle "+" notation, so [email protected] receives email sent to [email protected], something gmail for instance offers, but not exchange servers)
The code you comment out seems to hide the problem 1., but it does not fix it. Does the bounce processing work on your site? I would suspect that civicrm isn't aware that some of your recipients have invalid emails and doesn't flag them automatically as bounced. Are you receiving the bounces and doing it by hand?
Anyway, as the solution, having a host that allows VERP is the best option, but another one would be to develop/sponsor a mode that doesn't rely on VERP but on additional email headers. I did implement the first part and every email sent contains extra headers (X-CiviMail-Bounce), what is missing is the second one:
- changing the bounce processor to use this extra header
- changing the mail sending job to only set the header but not the VERP sender
- add a setting to allow to switch to that "mail header only, no VERP" mode
Would you be able to contribute to that code or sponsor that development?
Unfortunately so far, those having the capacity to make it happen found faster and cheaper to switch to a more feature complete host rather than investing into adding that "header only" mode.