amavisd-new and p5-DBD-mysql

The best way would be to deinstall current version, and to install a package of p5-DBD-mysql-4.037 which you created just before you upgraded the port. But you probably didn't do that, so you are looking at second best options, or worse. look at ports-mgmt/portdowngrade, it is kind of awkward to use, but it will get you a directory with the version of a port you desire. Note: it checks out the port in the current direcory, so create a suitable directory and cd into it before running the command.