Results 1 to 2 of 2

Thread: Shell Script to send mail when contents of a directory change

  1. #1
    Junior Member
    Join Date
    Aug 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Angry Shell Script to send mail when contents of a directory change

    Hi,
    I have a requirement in which, I need to send a mail whenever I recieve a file to a folder{DROPBOX.. i.e when a user drops a file to this folder through email }.

    Let me expalin it in details:
    1. I have Directory with name DROPBOX in RHEL5(2.6 kernel) path /home/DROPBOX
    2. Users can send/drop thier files to this directory through email.
    3. Whenever I get a new file at the DROPBOX, I must send an acknowledgement to the sender telling your files is recived at this time.
    4. If anyone tries to drop the file of same name, it should notify the sender "Already a file exist with this name"

    "I NEED A SHELL SCRIPT FOR THIS TASK"

    Could anyone help me on this.
    1. How to setup ( If any in a newly installed server(RHEL5 OS) ) to send emails to exeternal mail id's
    2. Any system related setting to be done?
    3. How to Get the smtp server name for a perticular mail server (eg: smtp.americas.hp.com)

    Thanks in Advance,

    I appreciate a early reply to my query.

    Thanks,
    Chandru

  2. #2
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,500
    Thanks
    17
    Thanked 790 Times in 507 Posts
    Rep Power
    10

    Default

    See the following thread
    http://nixcraft.com/ubuntu-debian/13...ification.html

    You need to use dnotify which can execute a command when the contents of a directory change
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 13th October 2010, 08:17 PM
  2. Smartd Send An Email Alert and Run A Shell Script
    By dipakzope in forum Linux hardware
    Replies: 3
    Last Post: 8th September 2009, 06:31 PM
  3. Replies: 1
    Last Post: 11th February 2008, 02:01 PM
  4. shell script to send mail for each login.
    By ephdia in forum Shell scripting
    Replies: 2
    Last Post: 27th November 2007, 04:42 PM
  5. shell scripting + send mail with header
    By ephdia in forum Shell scripting
    Replies: 0
    Last Post: 27th November 2007, 11:29 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •