Mike Cardwell: > * on the Fri, Sep 26, 2014 at 12:13:24PM +0200, li...@rhsoft.net wrote: > > >> I have some Exim configuration which allows me to have automatically > >> expiring email addresses. It accepts mail for any addresses matching > >> the format: > >> > >> yyyy-mm...@tmp.grepular.com > >> > >> But only if the YYYY-MM-DD matches a date which is today or in the > >> future. For example, "2014-09...@tmp.grepular.com" will accept mail > >> up until the end of this month and will reject mail from that point > >> onwards. > >> > >> What would be the best way of replicating this functionality in > >> Postfix? If it would involve calling out to an external script, I am ok > >> with writing such a thing, but if it can be done "natively" inside > >> Postfix, that would be preferable. > > > > this maybe best suited with mysql tables because you > > could have a catch-all on the MDA/LMTP and "show" postfix > > the needed RCPT table based on query > > That's an interesting idea. Thanks for the suggestion. I'd prefer not > to introduce an additional service though if I don't have to. I'm > currently using flat files rather than MySQL. > > I've added Amavis to the mix for SpamAssassin filtering and I'm > starting to think that might be a good place to do this if I can't do > it directly inside Postfix.
With Postfix, valid recipient addresses are specified in lookup tables. Your request would require a lookup table that somehow maps a dynamic address to a fixed one. What about the following design: 1) A lookup table that is specified entirely inside main.cf: inline:{name=value, name=value, ...} 2) Pseudo parameters that expand to year, month, and so on: $yy expands to 2014 $mm expands to 09 These are sufficient to support an email address that is valid for one month: virtual_alias_maps = ..., inline:{joe$yy$m...@example.com=real...@example.com}, ... Mail for joe201...@example.com will then be delivered to real...@example.com, but only in the month of September. In October, this would accept mail for joe201...@exampole.com. Wietse