views:

184

answers:

2

We are using Postfix for mail delivery and I am trying to make a shell script handle an email sent to [email protected].

Is there a way to do this and how?

I am trying to create an email-based front-end for a bulletin board. The users have split into two factions: those who would like to use the forum and those who prefer using mailing list. The idea is to create a solution that would please both groups by sending an email notification about the new post (this is the easy part) and also allowing people to post via email, where the metadata (such as topic id) would be encoded in the email address.

+1  A: 

in /etc/aliases

you should be able to alias to a script like so

[email protected]: |"/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

Jason Punyon
is it possible to have a regexp alias?
Arnelism
A: 

If the example.org email is only used for discussions you could forward whole @example.org to your script. Or you could use @discussions.example.org.

edgars

related questions