I've started on a module for this very purpose a few days ago. Just been toying with it as I had time and I believe I have it to a working and usable condition.
It goes a little more in-depth than Techman's module; as it will allow a single notice of either expired or soon to expire (at a configurable point, or 1/4 of expiry time remaining) nicknames and channels. Also gives the option for email or memo (or both). Currently, just the mail portion is wrote...problem is I don't have a working mail system on the VM I run my test services from. I'll have to finish up another test-net setup soon.
I'll put up this module soon as well as another module I wrote (os_expiring), which lets an operator (with 'operserv/expiring' permission) see any pending expiry nicks/chans. Hoping to get Author status approved to post them to the Module Site as well. For now I'll just update this thread with the links when I get them up.
See next post
Update, Links as promised: os_expiring.cpp and m_expirenotice.cpp
Disclaimer: os_expiring has been fairly well tested both on my test-net and a production network; m_expirenotice has not been as well tested. It's also a work in progress and still has 'Log' messages for testing.
Please do try one or both of these if you wish and let me know what you think.