S
S
someusere2016-07-26 23:47:56
linux
someusere, 2016-07-26 23:47:56

Automatic mail processing on linux?

Good day to all!
Given: a Yandex mailbox that receives letters from several recipients.
It is necessary: ​​to automate the process of sorting letters and executing some scripts, namely:
1. If a letter has arrived, for example, with subj "1111" - forward it to [email protected]
2. If a letter has arrived with subj "2222" - find it in the body email the required link and open it, for example, in links or some other console browser.
3. If a letter has come with subj "3333" - reply to it with a text, for example "Ok"
Thank you in advance for your comprehensive answers.
If the first two points can be implemented with standard Yandex filters, then what about point #2?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
serg-mizun, 2016-07-27
@serg-mizun

The moderator deleted my answer, although it had all the necessary information. With the help of curl, you pick up the mail, then sed or awk for parsing, and then you do whatever you want. Everything can be done with a bash script.
@moderator - before deleting something, you need to think a little sometimes. This is a topic about Linux, here one word curl was more than enough.

D
Dmitry Shitskov, 2016-07-27
@Zarom

You need fetchmail to download emails from a mailbox and procmail to process emails and perform appropriate actions.

L
Lindon_cano, 2016-07-27
@Lindon_cano

man procmail to you for the second.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question