5.4.7: Official Definition
5.X.X
[RFC3463] (Standards Track) from the The Internet Engineering Task Force (IETF) definition for codes that start with 5.X.X:
A permanent failure is one which is not likely to be resolved by resending the message in the current form. Some change to the message or the destination must be made for successful delivery.
X.X.7
[RFC3463] (Standards Track) from the The Internet Engineering Task Force (IETF) definition for codes that end with X.X.7:
The message was considered too old by the rejecting system, either because it remained on that host too long or because the time-to-live value specified by the sender of the message was exceeded. If possible, the code for the actual problem found when delivery was attempted should be returned rather than this code.