I'm wondering how I could map an email adress so newsletter users could simpl开发者_如何转开发y write to a uniquely create email address and instantly get unsubscribed.
ex:
jonh.unsubscribe.sdfg87s544fsdg6@exemple.com
And the key here is that I want it to be instantaneous, I don't want to poll a imap or pop3 account every X seconds. Is there a way to listen to the inbox? Thats my main problem... once I get the email I know what to do.
Thecnologies I use: Postfix Python PHP
If your mail server supports it, what you are looking for is IMAP IDLE (https://www.rfc-editor.org/rfc/rfc2177)
Otherwise, you would have to poll.
Mailman does this by redirecting the mail to the program itself (it never goes to a true mailbox). Since you're using Python on your project, it might be helpful to look at how mailman interacts with mail servers.
精彩评论