1

I would like to understand how can I capture emails sent to different random email ids generated by server in one inbox to run analysis on those emails something like this website does : https://www.mail-tester.com/

Here , with each page referesh, you would notice a new random email id is generated. If an email is sent to this random email id, the mail-tester server captures that email, assesses it using spamassassin and generates a report. I want to understand how can we capture emails sent to so many different random email ids in a single inbox so that they can be assessed by spamassassin or any other utility.

user3205469
  • 995
  • 1
  • 7
  • 16

1 Answers1

1

Practial implementation for unix/linux sendmail using procmail as its local mailer.

  1. Use FEATURE(virtusertable) to redirect messages for xyz@test.example.net to user+xyz (user user with +xyz "detail").
  2. ~user/.procmailrc will process incoming messages upon delivery. xyz (+detail) will be available via $1.

See also: Sendmail-FAQ-3.29: How can I add a header specifying the actual recipient when having multiple users in a virtual domain go to a single mailbox?

AnFi
  • 10,493
  • 3
  • 23
  • 47