Web Hosting Talk







View Full Version : daemon reacting to emails


Walter
04-13-2001, 11:35 AM
(I hope it's the appropriate forum)

I need a program which reacts on incoming emails, does some things against a mysql db and then sends this email to another address.
Should I write a daemon program constantly running on the server? Or is there any mechanism in a mailserver on Redhat where I could make a plugin?
Has the program to be written in C oder could it be any scripting language (I only know C, C++, PHP)?

Thanks!

cperciva
04-13-2001, 07:26 PM
The simplest solution it to use sendmail's .forward file. It can pipe an email into a program.

Walter
04-14-2001, 01:02 PM
Thanks, cperciva. Can you tell me more about the .forward file? Or where can I find detailled information?

cperciva
04-14-2001, 04:13 PM
man sendmail

Tim Greer
04-14-2001, 06:51 PM
The best thing to do and install, to do this type of thing, is use procmail, have promail launch a script or program in whatever langauge you write it in to process the email and then tell it what to do with the email.

Wazeh
04-14-2001, 09:53 PM
I second Tim's recommendation. procmail is a very powerful software which will do all you want, and more.

Walter
04-15-2001, 03:37 AM
Thanks for your direction to the .forward file, my server is using EXIM. I am currently looking on the documentation at exim.org...

Walter
04-16-2001, 09:22 AM
Ok, is there any programmer outside who can help me with this? I know C/C++ very well and would need just a basic program where I can start from...