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


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Help me in receiving,validating emails and save them in local directory
# 1  
Old 11-15-2007
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.
# 2  
Old 11-15-2007
have you tried searching here?
# 3  
Old 11-15-2007
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?
# 4  
Old 11-15-2007
Quote:
Originally Posted by sudharsanc
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.
# 5  
Old 11-20-2007
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash to select and save file in new directory

I am trying to select a file in bash and save it to a directory. The below does run but no selected file is saved. Thank you :). bash # select file printf "please select a file to analyze with entered gene or genes \n" select file in $(cd... (4 Replies)
Discussion started by: cmccabe
4 Replies

2. Shell Programming and Scripting

Save input as text in directory

I am having a little trouble with some things using the code below: 1. printf "Enter variant: "; read variant The user enters the variant and that value is used in the python script. However, I am not sure how to save that value inputed as a text file in a specific directory... (8 Replies)
Discussion started by: cmccabe
8 Replies

3. Shell Programming and Scripting

Save files in directory as txt

wget -x -i link.txt The above downloads and create unique entries for the 97 links in the text file. However, each new file is saved as CM080 with a FILE extention. Is there a way to convert each file in that directory to a .txt? The 97 files are in... (12 Replies)
Discussion started by: cmccabe
12 Replies

4. Shell Programming and Scripting

Validating files using server name and directory

Hi, I want to check if a file is a regular file or not using server name and file path. Example: I want to check whether //<server_name>/home/chandan/abc.txt is a regular file or not. Need your help!!. Thanks (3 Replies)
Discussion started by: ChandanN
3 Replies

5. Shell Programming and Scripting

Replicate remote directory to local directory with ftp

I have system that generate files every 1 hours , i only have ftp connection from my local server to remote . $ ls -al -rw-r--r-- 1 water None 0 Feb 7 18:09 a.0800 -rw-r--r-- 1 water None 0 Feb 7 18:09 a.0900 -rw-r--r-- 1 water None 0 Feb 7 18:09 a.1000 is there any perl / php... (3 Replies)
Discussion started by: before4
3 Replies

6. Shell Programming and Scripting

FTP files from different directory from remote server to one directory in local

Hi All, I want to search for .log files from folders and sub folders in remote server and FTP them to one particular folder in the local machine. I dont want to copy the entire directory tree structure, just have to take all the .log files from all the folders by doing a recursive search from the... (3 Replies)
Discussion started by: dassv
3 Replies

7. Shell Programming and Scripting

Validating the size of file transferred from ftp server to the local system

Validating the size of file transferred from ftp server to the local system. File type: Text file/Flat file Source System: Windows / Unix Systems Target System is always: Unix Mode of Transfer : ASCII We have generic ftp shell script that transfers the files from different ftp servers. ... (2 Replies)
Discussion started by: jpundalik
2 Replies

8. Shell Programming and Scripting

validating a file or directory

Hi there, im writing a script and trying the get the 2nd parameter and check it if its valid file or valid directory, Example: ./test -a quiz1 i need to check quiz1 ($2) if it matches any name of a file or directory. Thanks (3 Replies)
Discussion started by: new2Linux
3 Replies

9. Shell Programming and Scripting

save weather radar to local time-named file every 15 minutes

I think I can do this myself now, but I am always amazed by how people can do things cleaner and simpler than I end up doing... Using cron, I want to save the image found at: http://radar.weather.gov/ridge/Conus/RadarImg/centgrtlakes.gif every 15 minutes to a local file , such as ... (1 Reply)
Discussion started by: brucewestfall
1 Replies

10. Shell Programming and Scripting

Check sendmail is not receiving any emails

Hi all, Need some advise again. I am new to sendmail service which is already configured by some other administrators. I would need to write a script to check whether sendmail service is enabled in Solaris and Linux. Using this command "ps -ef | grep sendmail | grep -v grep". Or is there... (6 Replies)
Discussion started by: Kinki
6 Replies
Login or Register to Ask a Question