开发者

Craiglist Email Anonymizing for Python/Django

My goal here is to allow users to email each other without disclosing anyone's email addresses on my website.

My initial choice was to create a form which sent mail through my SMTP server (I'm using gmail), spoofing the FROM field to make it look like it's sent by one user to another user.

That seemed fairly simple and I'm limiting it to one email per unique pair of users. The big problem is that Gmail is finicky about this sort of thing and automatically rewrites all FROM and Evelope settings. So, I can't do this unless I'm going to use a third party mail server.

I've also read that spoofing From fields can get you in trouble wi开发者_运维问答th spam filters. Is it worth it for that (and other) reasons to just anonymize the recipient users email address and display it (ala Craigslist)? I have no idea how to PIPE/Parse emails, so I'm not sure how much time it would take to learn and implement this feature.

I've also seen similar posts for PHP but they have stale links and I'd like to find a solution for Python/Django.

Thanks, Brendan


Why don't you set up at Catch-All email address python's imaplib.

If you generated a unique token that was connected to the user's email address, then when someone sent an email to @your-domain.com you could catch the message, see if it related to a token in the db and if it did, forward the email on to the users actual email address.

If you were to then also create a token for the sender's email address and store it, then you could set the 'from' address as that token so that when they responded, it also bounced through your server as noted above.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜