Yosemite Mail.app - Rule stuck on 7 days
Copied from TunaMaxx above who doesn't have enough rep to answer:

I've found out more about this, but I don't have enough rep in this community to get over the protection on this ticket. However I have since found out this is a bug in Apple Mail, and has existed for a number of versions. The good news is the values you enter are actually recorded and respected, even though the UI says "7 days" all the time. To verify, set a rule to a number like '57' or something. Then, open ~/Library/Mail/V2/MailData/SyncedRules.plist and search for '57' in that file. You'll find it close to the matching rule info. The value survives and is respected even restarting Mail. –