I
I
Ivan Solonovich2016-03-26 10:46:37
System administration
Ivan Solonovich, 2016-03-26 10:46:37

How to administer a folder with files in ubuntu using a subject in an e-mail?

The client wants, via email, to create/delete files in a folder. ubuntu system. The key he wants to be sent as the header of the letter. In practice, it should happen like this, the client sends soap with the heading Del, the file in the specified folder is deleted .... and so on ...
I've been google the topic for the second day, I still don't know which way to approach the issue. Either look for a stray for the mail client, or write a bunch of scripts for the console postfix ...
Maybe someone

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir, 2016-03-26
@MechanID

for postfix in /etc/aliases we add something like
robot: "| /home/robot_mail.sh"
where before the colon is the name of the mailbox and after the script where the body of the letter will be submitted by the pipe.
well, write a bash / python / whatever script to parse the letter and do the necessary actions.

C
CityCat4, 2016-03-26
@CityCat4

When the client receives a letter with the [del] /boot subject, his enthusiasm will decrease... The task is solved only by writing scripts and specifying aliases for scripts. Well, at least think of some kind of authorization - security through obscurity works only in addition to other methods.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question