I need a procmail recipe that will forward a copy of all incoming mail on my local machine to my GMail account, except for the incoming mail that’s forwarded from my GMail account.
Everything being forwarded from GMail contains the following header:
X-Forwarded-For: email@example.com firstname.lastname@example.org
—so it seems like it should be possible to set up a conditional recipe. However, my Unix man-page fu is weak, so I’m not grasping how to do this.
Without getting into undue detail, my ambition here is for both my GMail account and my local mail account to have pretty much the same message store. Yes, I do have procmail running on my local machine, doing routine sorting of mail into mailboxes. No, for a variety of reasons, I don’t want to implement this with a .forward file, or with tricks involving multiple GMail accounts.