FEATURE: Support envelope searching by regex
From way back (https://sourceforge.net/p/fetchmail/mailman/fetchmail-users/thread/1346683701.47301.YahooMailNeo%40web162403.mail.bf1.yahoo.com/#msg32533762) I wrote:
[yahoo.com] conveniently provides an X-Apparently-To header which specifies the target mailbox. It looks like this:
X-Apparently-To: your.name@... via 72.30.236.202; Tue, 14 Aug 2012 16:03:23 -0700
I've tried using:
envelope "X-Apparently-To"
but fetchmail gets confused because it attempts to parse the rhs as a single mail address
I propose that envelope
supports using a regex:
envelope "^X-Apparently-To: +([A-Za-z0-9._%+-]+@yahoo.com) "
Or perhaps even allowing the regex capture group to use when extracting the address:
envelope 1 "^X-Apparently-To: +([A-Za-z0-9._%+-]+@yahoo.com) "