Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
> Script run at receiving EMail?
post Nov 5 2012, 04:09 AM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 2
Joined: 5-November 12
Member No.: 17,938

Hi, all!

I've set up my new server at home, and I thought of a feature that should be easy to implement with a simple bash or perl script. BUT: I have not yet found where to hook that script into the system.

What I want to do is to run a script every time a mail is received on a certain account. I would check the emails source (it would only act on locally (as in local network) sent mail), scan the mails body for an URL and act on it.

The final application is that I can use the "Send link" feature of the browser to send a youtube URL to the media server account, which should extract the URL, download the video with youtube-dl, put the file on the media server, and send a confirmation mail back to me stating that it is done (or reporting errors).

Digging the net I found myriad of things about sending mails from scripts, but so far nothing that would allow to send mail TO a script. I am fully aware of the security implications of running a script on receiving a mail loacally, and I'm confident that I can handle this (there is no mail-in from outside the net on the server).

Pointers, anybody?

Yours, Christian
Go to the top of the page
+Quote Post
Start new topic
post Nov 21 2012, 01:49 PM
Post #2

Whats this Lie-nix Thing?

Group: Members
Posts: 6
Joined: 21-November 12
Member No.: 17,973

There are existing solutions out there that may meet your needs. I suggest searching for procmail or mailagent.
Go to the top of the page
+Quote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 19th July 2018 - 12:44 PM