I got it to work by changing mydestination on main.cf but then no other emails were working.
I tried to have both mydomain.com and localhost on $mydestination but that made other emails useless.
don't think virtual_mailbox_maps virtual_alias_maps can pipe into a program. any idea how can I achieve this?
now I'm thinking to have a separate email server just to pipe emails into a script (which is a stupid workaround).
UPDATE: apparently sieve has a plugin called extprogram that does what I need. but did not manage to get it to work