incoming mail shall execute php-script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frank R. Suchy

    incoming mail shall execute php-script

    Hi there,

    the task:
    Any mail that drops into a specified mailbox shall cause a (php-)script to
    immediately react with some action.
    Quite a common task, isn't it?

    I could use e.g. cron to let a script frequently look for new mail.
    But mail drops in only once every few days, so I don't want to execute that
    look-for-new-mail-script every 3 minutes. But IF mail drops in, the
    reaction should be as quick as possible.

    Is there a way to watch the mailbox and run the script when the mb changes?
    Or could the mailserver be told to run that script when such mail drops in?

    It's a Redhat Linus. Probably running in a more or less "standard"
    configuaration (what ever that is...)

    I don't know which mailserver is running there, but when I connect via SMTP
    the server says:
    ESMTP Sendmail 8.12.10/8.11.6; Fri, 30 Jul 2004 15:30:22 +0200

    And on connection via POP3 it says:
    +OK POP3 v2000.70rh server ready

    I don't have root access and cannot access the relevant config files. But I
    guess I could convince the admin to set up sth. if I tell him exactly what
    I want...

    Thanks a lot for any idea!
    Frank

  • Daniel Tryba

    #2
    Re: incoming mail shall execute php-script

    In comp.lang.php Frank R. Suchy <usenet@rem.o ve-sp.am.ardik.net > wrote:

    Followup-to ignored.
    [color=blue]
    > the task:
    > Any mail that drops into a specified mailbox shall cause a (php-)script to
    > immediately react with some action.
    > Quite a common task, isn't it?[/color]

    It's quite common... it's called procmail (which is most likely
    installed by default on RH), see the NOTES section of "man procmail" for
    a quick example.

    --

    Daniel Tryba

    Comment

    Working...