I''m working on an email anonymization feature for my rails app (kind of like craigslist). I''ve configured postfix to pipe all emails addressed to user-*@example.com (i.e. user-1234-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org, where 1234 is the user id in the database) into rails via the mailer''s receive method. Now, the idea is to first check that the sender''s email address is in the database (if not: return), then anonymize/mask it; so if jdoe-/K3FCmxHHlvQT0dZR+AlfA@public.gmane.org is the sender and user 24 has that email address, change the sender''s address to user-24-hcDgGtZH8xPowKkBSvOlow@public.gmane.org Then, parse the recipient''s email address and unmask it (change user-23-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org to user 23''s real email address) so it can be delivered properly. The thing is, I''m not an expert at email/email headers. What''s the best way to go about this. Directly alter the message''s FROM address and TO address and deliver it? Create a new email in rails, set FROM to an address owned by the server and the REPLY-TO header to the sender''s masked address and the TO header to the recipient''s unmasked address? How do I handle multiple recipients? What''s the best way to handle emails directed to users that don''t exist? Any help would be appreciated. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/wfD8S_gxVkYJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.