Help me in receiving,validating emails and save them in local directory

hi,
I'm working on a project where I get mails from different customers, what I need to do is I need to check if it is genuine mail and if there is any attachment I need to validate them and extract the message and save in the local directory as a text file say and then I need to direct it to appropriate department. Everything is to be automated. Please let me know if this is possible and also could you please send me some useful links.

have you tried searching here?

hi,
I need to know if there is any way to receive the mail, validate if it is the authorised user and then save the message as a text file in the unix if i'm using exchange server?

How do you normally read your emails?

What local directories are you refering to?

Why do you want to store all attachments as text files, and what does that mean?

My preference for automatically reading from Microsoft Exchange Server is to use MAPI-2, alas normally only available for Windows.

Why not setup a mail server in unix?
Then it could be sent straight there!!!
And then you could do something like below:
To point you in the right direction -
You can use /etc/mail/aliases to redirect mail to a script or executable. At that point you will have to parse through it to do everything you've asked.

It sounds like quite an undertaking! I'm sure there are commercial products out there that do similar, but I don't know of any.

Ther format for the aliases file is:

nobody : /my/super_script.sh

This will pass the email to super_script.sh as stdin. I'd love to see the script when you're done with it!

I'm not sure exactly what you are trying to do, but this might be a case, that just because you CAN do it, doesn't mean it SHOULD be done.