Anisotropic mesh adaptation is studied for linear finite element solution of 3D anisotropic diffusion problems. The 𝕄-uniform mesh approach is used, where an anisotropic adaptive mesh is generated as a uniform one in the metric specified by a tensor. In addition to mesh adaptation, preservation of the maximum principle is also studied. Some new sufficient conditions for maximum principle preservation are developed, and a mesh quality measure is defined to server as a good indicator. Four different metric tensors are investigated: one is the identity matrix, one focuses on minimizing an error bound, another one on preservation of the maximum principle, while the fourth combines both. Numerical examples show that these metric tensors serve their purposes. Particularly, the fourth leads to meshes that improve the satisfaction of the maximum principle by the finite element solution while concentrating elements in regions where the error is large. Application of the anisotropic mesh adaptation to fractured reservoir simulation in petroleum engineering is also investigated, where unphysical solutions can occur and mesh adaptation can help improving the satisfaction of the maximum principle.