I don't use MailScanner but am reporting this because a prospective user recently asked why it failed to start. Following installation, /usr/sbin/MailScanner contains the following shebang.
However, the ebuild contains four expansions of "$(get_libdir)", meaning that the library code ends up being installed in /usr/lib64. The code is not architecture-specific, so the ebuild should specify "lib" instead.
This hit me today.
In addition to the mentioned $(get_libdir) issue, also the path to sendmail needs to be adapted in the ebuild.
The ebuild patches /etc/MailScanner/MailScanner.conf to use /usr/lib/sendmail, but it should be /usr/lib64/sendmail instead.
To workaround both issues, I did:
1) ln -s /usr/lib64/MailScanner /usr/lib/MailScanner
2) Changed the path to /usr/lib64/sendmail for both options "Sendmail" and "Sendmail2" in /etc/MailScanner/MailScanner.conf