Seems like Mailscanner does not like the one included in RHEL10. However this really cannot be removed as there are many dependencies. I was forced to remove it and install the latest from CPAN, however this is really not good practice, and who knows which RPMs will need the 2.212 RPM version.
Compress::Raw::Zlib version 2.214 required--this is only version 2.212 at /usr/local/share/perl5/5.40/Compress/Zlib.pm line 11.