It was narrated that that Sahaabah (may Allaah be pleased with them) used to congratulate one another on the occasion of Eid by saying Taqabbal Allaahu minna wa minkum (May Allaah accept (this worship) from us and from you). It was narrated that Jubayr ibn Nufayr said: When the companions of the Messenger of Allaah (peace and blessings of Allaah be upon him) met one another on the day of Eid, they would say to one another: “Taqabbal Allaahu minna wa mink (May Allaah accept (this worship) from us and from you).” Al-Haafiz said: Its isnaad is hasan.
Imam Ahmad (may Allaah have mercy on him) said: There is nothing wrong with one man saying to another on the day of Eid: Taqabbal Allaahu minna wa mink (May Allaah accept (this worship) from us and from you). This was narrated by Ibn Qudaamah in al-Mughni.
Shaykh al-Islam Ibn Taymiyah was asked in al-Fataawa al-Kubra (2/228): Does the common Eid greeting that is on people’s lips – “Eid Mubaarak” etc – have any basis in sharee’ah or not? If there is a basis for that in sharee’ah, what should we say?
With regard to the greeting on the day of Eid, which people say to one another when meeting after the prayer, “Taqabbal Allaahu minna wa minkum wa ahaalahu Allaah ‘alayka (May Allaah accept (this worship) from us and from you and may you live to see another Eid)” etc, this was narrated from a number of the Sahaabah who used to do that and allow others to do so too, and from the Imams such as Imam Ahmad. But Ahmad said: I do not initiate this greeting with anyone. But if someone greets me in this manner I return his greeting. That is because returning a greeting is obligatory, but initiating this greeting is not a Sunnah that is enjoined, but neither is it forbidden. The one who does it has an example and the one who does not do it also has an example. And Allaah knows best.
Shaykh Ibn ‘Uthaymeen was asked: What is the ruling on offering Eid greetings and is there a particular wording to be used?
It is permissible to offer greetings and congratulations on Eid, and there is no specific greeting. Rather the greetings that people customarily use are permissible so long as no sin is involved.
He also said:
Some of the Sahaabah offered greetings and congratulations on the occasion of Eid. Even if we assume that they did not do that, it has now become something customary that people are used to doing, congratulating one another on the occasion of Eid and on completing the fast and qiyaam.
And he was asked: what is the ruling on shaking hands, embracing and congratulating one another after the Eid prayer?
There is nothing wrong with these things, because people do not do these things as acts of worship intended to draw them closer to Allaah, rather they do them because they are customary, and to honour and show respect to one another. So long as there is nothing in sharee’ah to indicate that a custom is forbidden, then the basic principle is that it is permissible.
Majmoo’ Fataawa Ibn ‘Uthaymeen, 16/208-210.