Scan all mail messages through the server and save a copy into file system following a rule


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Scan all mail messages through the server and save a copy into file system following a rule
# 1  
Old 04-09-2012
Java Scan all mail messages through the server and save a copy into file system following a rule

In our company we work for our customer with a job# philosophy, managing all the informations about a job in a share with directories whose name is starting with job number. Under this entry point we have a standard structure of folders, comprising a "communications" folder.
When we send emails concerning a job, in the subject we put first of all 4 digits representing the job number. I need to save automatically a copy of these messages into the correct place, despite of sender or destination/s.

Now, I know the first step has to be the management of messages passing the smtp (postfix) analizing the subject to find the four digits. First idea could be modify the spamassassin filters/rules to get the work done, but something is telling me it's not a so good idea. So, here the first question: what's the correct place to interact with postfix having the message dubbing? Also thought about aliases, but I'm not sure it's possible messages dubbing instead of redirecting.

After this, a perl or php script can surely do what I need, but this will be next novel.

Thanks to anyone could be interested in this trial.

Ciao, Roberto
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to scan the disks and make file system

Hi What I'm trying to do(manually) is logging into the server and running the below mentioned commands ls /sys/class/scsi_device/ | while read i; do echo "- - -" > /sys/class/scsi_device/$i/device/rescan;done lsblk echo -e "o\nn\np\n1\n\n\nw" | fdisk /dev/sdd partx -a /dev/sdd1... (7 Replies)
Discussion started by: James0806
7 Replies

2. Red Hat

Scan for new LUN and create a new file system

Hi Please I dont have a lot of redhat skills, but I need some help on creating a file system. I need to rescan for this new LUN, so I try to check existing LUNs: fdisk -l Disk /dev/sda: 299.4 GB, 299439751168 bytes 255 heads, 63 sectors/track, 36404 cylinders Units = cylinders of... (8 Replies)
Discussion started by: fretagi
8 Replies

3. Shell Programming and Scripting

Shell script to copy a file from one server to anther server and execute the binary

Hi , Is there any script to copy a files (weblogic bianary + silent.xml ) from one server (linux) to another servers and then execute the copy file. We want to copy a file on multiple servers and run the installation. Thanks (1 Reply)
Discussion started by: Nawrajesh
1 Replies

4. UNIX Desktop Questions & Answers

Outlook Mail Rule issue- not reaching the unix server

Hi All, I' m having a pretty strange issue, when I sent an outlook email that is forwarded by rule for example (email sent every day at certain time) to the server is not going through, i cant see it arriving at the Maildir or i have also a procmail rule log that also not reaching... could... (0 Replies)
Discussion started by: Skyline88
0 Replies

5. UNIX for Dummies Questions & Answers

Copy the newest file from a different server to your home server.

Hi all, So I am on server 1, and I want to grab the newest file from a particular directory on server 2, and place this in a directory on server 1. I am trying to use: ls -tr | tail -1 This works, and gets me the newest file in a particular directory. Using svn `ls -tr | tail -1` etc I... (1 Reply)
Discussion started by: Lexx87
1 Replies

6. Shell Programming and Scripting

How to copy mail content in a file in Unix

Hi Guys I want to write a script which search mail with subject line and after that I want the mail content in a file please help guys. Thanks Atul Singh (3 Replies)
Discussion started by: atul9806
3 Replies

7. UNIX and Linux Applications

Copy mail traffic to several server for a domain

Hello, everybody! I have a MX server (sendmail) and old pop3 server, I installed a zimbra server and I want to receive mail traffic to several mail server (old and Zimbra). How I do it on Postfix(Zimbra if will be a MX for my domain) or Sendmail? (0 Replies)
Discussion started by: Rezonans
0 Replies

8. Shell Programming and Scripting

Copy files from one folder to another with rule

Hello! Please, help me to find or write this simple bash-script. I have first folder /tmp/work/folder1 with such files: name1.txt name2.txt.1 name2.txt.2 name3.txt name4.txt name4.txt.1 name4.txt.2 name4.txt.3 etc.. I need to copy all files from folder1 to folder... (1 Reply)
Discussion started by: optik77
1 Replies

9. UNIX for Dummies Questions & Answers

how to copy from vi and save it on another file

Hi I am newbie for unix. I want to copy few line opened in vi editor (not whole file) and save it some where else. It is like copy and paste but data is quite big . Is there any command i can use in vi to copy data and save it somewhere else. Thanks ukadmin (3 Replies)
Discussion started by: ukadmin
3 Replies
Login or Register to Ask a Question
uuxqt(1M)						  System Administration Commands						 uuxqt(1M)

NAME
uuxqt - execute remote command requests SYNOPSIS
/usr/lib/uucp/uuxqt [-s system] [-x debug-level] DESCRIPTION
uuxqt is the program that executes remote job requests from remote systems generated by the use of the uux command. (mail uses uux for remote mail requests). uuxqt searches the spool directories looking for execution requests. For each request, uuxqt checks to see if all the required data files are available, accessible, and the requested commands are permitted for the requesting system. The Permissions file is used to validate file accessibility and command execution permission. There are two environment variables that are set before the uuxqt command is executed: o UU_MACHINE is the machine that sent the job (the previous one). o UU_USER is the user that sent the job. These can be used in writing commands that remote systems can execute to provide information, auditing, or restrictions. OPTIONS
The following options are supported: -s system Specifies the remote system name. -x debug-level debug-level is a number from 0 to 9. Higher numbers give more detailed debugging information. FILES
/etc/uucp/Limits /etc/uucp/Permissions /var/spool/locks/* /var/spool/uucp/* ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWbnuu | +-----------------------------+-----------------------------+ SEE ALSO
mail(1), uucp(1C), uustat(1C), uux(1C), uucico(1M), attributes(5) SunOS 5.10 19 May 1993 uuxqt(1M)