Falko, I found the error. The regular expression is not working. The message was rejected due to authentication problems. Once I solved these problems the message is sended so the problem I have now is that my regular expression is not working.
In the log I see lots of messages like this:
Mar 11 16:23:43 mail postfix/cleanup: warning: regexp map /etc/postfix/header_checks, line 2: Invalid preceding regular expression
And the header_checks file is:
/^From: .*printer@mydomain\.com>/ OK
/^To: .*@(?!mydomain\.com>)/ REDIRECT firstname.lastname@example.org
Do you know what's wrong with this file, I'm trying that email@example.com
can't send emails outside of mydomain.