1

I want to allow anonymous users to create nodes, and their email address (entered by them into a field) will show on the node view as 'anonymized'.

The idea is that anyone can enter an email address, and the page will show an email address that looks something like "siouent-12393@this-site.com", which automatically forwards to the actual person's email.

Are there any modules for doing this? I have seen something about tokens for the email field, but I think that is not the right direction.

Does this require some deeper server system?

  • 6
    To get the best possible answer you'll want to remove the Craigslist comparison and explain exactly what it is they do that you're looking to implement. Don't forget Craigslist is mostly a US thing; I for one don't know anyone in the UK who's heard of it outside of the industry, and certainly no-one who's actually used it before (I'd imagine that's mostly because of how appalling their user interface is) – Clive Jun 1 '13 at 11:37
  • 1
    The anonymous email shown to other users makes this not a dup. – mpdonadio Jun 1 '13 at 16:50
  • Thanks Clive, I've updated my question. True about craigslist, but in the last year they really did some nice improvements! – petergus Jun 3 '13 at 7:36
  • I have no clue how Craiglist works, so if there is anything about it that's not in your question your question needs an edit, and if there is nothing you did not explicitly described, remove reference to craiglist to avoid confusion. Having that said - Drupal works on http / https. Emails works on pop3, imap etc. Without good old system scripting what you want is impossible. You may use drupal to manage translation table, but you need other tools to actually accept mails and forward them where needed. – Mołot Jun 3 '13 at 8:39
2

You are looking to integrate your MTA's (mail transfer agent = mail server's) virtual user table with something that can be managed through code running through Drupal. There are multiple ways to do that and the exact mechanics will depend heavily on the particular MTA you are using, but the general idea will be the same. As for specific instructions for your particular MTA, I'd try Google or ServerFault.

That said, if I can be allowed to use Postfix as an example, what you are looking for seems to be configured primarily through the virtual_mailbox_maps configuration setting. Official documentation, Postfix and MySQL howto, quick guide to get you started and Virtual mailhosting guide with Postfix on Gentoo.

Once the MTA looks to a database table for address translation, adding a forwarding address becomes a simple INSERT SQL query with appropriate values. If everything is set up correctly it should then take the e-mail that was received and redirect it to the user's real e-mail address.

Oh, and one more thing; make very sure you properly validate the user's provided e-mail address, so you don't become a source of spam for others. Send them a short e-mail with either a link to click on or a code that needs to be entered to activate the forwarder.

  • Thanks Michael, ill have a look into that! Marking yours as the answer now though :) – petergus Jun 3 '13 at 13:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.