Answer the question
In order to leave comments, you need to log in
Generate email and send messages to it?
There are services (example trello.com, vk.com) that issue a generated email.
Example: [email protected]
When a message is sent to this email, some action is performed (the message will be added to the Trello task). Or by analogy vk.com if you send a message to the generated email it will appear in your messages.
How is this technology implemented?
Answer the question
In order to leave comments, you need to log in
In Unix/Linux, back in the last century, it was possible to map an email to some script with one line in the config.
That is, the mail server, upon receiving a letter, immediately launches the script and feeds it the text of the message.
Now the same thing - a letter is taken and fed to a program that parses it and performs the necessary actions.
Just look for how it is configured on your mail server.
The bottom line is that the plus sign is a service symbol in SMTP, i.e. the initial mailing address is:
[email protected]
And all the rest added through the plus are some understandable commands to the script. Further, as Saboteur explained to you - parsing and performing coded actions.
Usually a mail handler is used which is installed as MDA (Mail Delivery Agent) . You can either use a standard MDA that supports complex processing rules, such as procmail, or write your own. MDA is very easy to write, it can be a script from literally one line. In the simplest case, the recipient's address is given on the command line, the contents of the letter on stdin. More sophisticated handlers can use LMTP (a stripped down version of SMTP).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question