I have a website, and the users recommend via email to another persons, so the mail come from my site, but I need to appear the user as sender, but "via" mydomain. The logically and what lists management software and companies do is differ the "MAIL FROM" SMTP command and the "From" header (like mailchimp, for example).
So I want to DKIM sign a mail with mydomain.com, even if the From header says another domain. is possibly this?
I am using postfix with Debian GNU/Linux, and in this case using dkim-filter and dk-filter.
All you need to do is to supply the correct message headers. DKIM is not involved, and cannot be involved, as that would have to be supplied by the sender's system, not yours. If you try to set it so that your domain signs it but it appears to have been sent from a different domain the message will be blocked by any half decent spam filter.
Either sign it and accept that your domain is the sender or change it so that the poster's doamin is the sender and don't sign it. One way or the other, not both.