Defining a “messagle handler” in Postfix

后端 未结 3 876
终归单人心
终归单人心 2021-01-28 06:51

We are using Postfix for mail delivery and I am trying to make a shell script handle an email sent to foo-bar-baz-bat@example.org.

Is there a way to do this and how?

3条回答
  •  故里飘歌
    2021-01-28 07:34

    in /etc/aliases

    you should be able to alias to a script like so

    foo-bar-baz-bat@example.org: |"/path/to/ScriptOrExecutableHere"
    

    I did this with my Trac installation and it worked like a charm...

    EDIT: Oh...i didn't realize you were going to be aliasing dynamic addresses...I think you'd need a script to alias the e-mail addresses as forum threads are created...

    EDIT2: Actually you might be able to use the catchall for something like this...

    I haven't done it but you would alias "@example.org" to the command. See here for more

提交回复
热议问题