Imam Ali (AS) narrated from the Prophet of Islam (PBUH) who said:
If it is needed, walk for two years to do kind deeds for your father and mother; walk for one year for keeping in contact with family and relations; walk one mile to visit an ill person; walk two miles to take part in a funeral procession; walk three miles to accept the invitation of a believer; walk four miles to visit your believing brother in religion; walk five miles to help an oppressed person; walk six miles to help a person who is in a difficulty; and do not forget repentance in any condition which is the way to salvation [1]. In this narration some of the necessary good deeds in regards to social relations have been evaluated; these have been evaluated by Imam Ali (AS) on behalf of the Prophet of Islam (PBUH).
[1] Naseem-e-Sahar, Navader-e-Ravandi, Page 92.
Source: en.shafaqna.com