1. In a bowl, mix the flour, baking powder, vanilla, and mastic. Mix the orange zest with the sugar.
2. Place the butter in a bowl or the mixer bowl and beat vigorously with a whisk attachment or the K-beater attachment in the mixer.
3. Add the sugar and continue beating until light and fluffy. Add the eggs one by one. Add half of the flour quantity. Pour in the orange juice and the remaining flour.
4. Knead lightly by hand until you have a soft, pliable dough that doesn't stick to your hands. Press it down slightly and cover the bowl with plastic wrap. Place it in the refrigerator for half an hour.
5. Preheat the oven to 170°C (340°F) and line 2 baking sheets with non-stick parchment paper.
To Shape Them:
1. Take the dough out of the refrigerator and shape the cookies (koulourakia). Take a piece of dough (about 30g) and roll it into a stick about 15cm long.
2. Bend one end over towards the center and the other end under towards the center, creating an 'S' shape. Place the cookies on the baking sheets. Brush with the egg wash and, if desired, sprinkle with sesame seeds.
3. Bake in the preheated oven for 20-25 minutes, or until golden brown.