I am trying to write a procmail forward script, which will forward all the mails received at mydomain.com to mydomain.NET. To be more clear, if mail is to:jack@mydomain.com, it should forward to: jack@mydomain.net. Like this it should forward for all corresponding emails: How Can I do this?
I think what you're looking for is perhaps better implemented using sendmail. Since procmail in the case of redirection in any case just hands over the mail to sendmail.
Use the following directive in your sendmail virtual user table:
@mydomain.com %1@mydomain.net
which effectively will map every user at mydomain.com to the remote mydomain.net
I'm not sure if something as general as the above is allowed in procmail, i've only used procmail for filtering my personal mail.