Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

starting script when getting mail

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I would need to start a script when I get a mail And have no idea how this can be done can someone help me?
 
VictorII,

I'm not sure whether this will work for you, and I presume you have to use sendmail rather than MMDF for it to work, but we have a paging application that uses the sendmail aliases file (/etc/aliases or /usr/lib/mail/aliases) with an entry such as:

[tt]pager: "| /usr/local/bin/mailpage"[/tt]

This diverts every mail from the imaginary user 'pager' to that script.

Do a man aliases for (a little) more information on the file.

Annihilannic.

Annihilannic.
 
Ive done this before!

Your looking to run a script at intervals (crontab) to check for a size change in you inbox folder in particular an increase! If this happens then run your little script.

If you tell me what mail server you run I will help you...
What does the script do?
Andy
++

 
I managed to solve the problem (I used alias to redirect the mail to the script as standard input) Thanks for the help everyone
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top