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
NWPJMV(1)							      nwpjmv								 NWPJMV(1)

NAME
nwpjvm - Move print job to Unix queue SYNOPSIS
nwpjmv [ -S server ] [ -h ] [ -U user name ] [ -P password | -n ] [ -C ] [ -q queue name ] [ -c command ] [ -j job number ] [ -d ] DESCRIPTION
nwpjmv is a program that connects to print queues on NetWare servers and moves a designated print job to a Unix queue. OPTIONS
-h -h is used to print out a short help text. -S server server is the name of the server you want to use. -U user user is the print server name at the server. -P password password is the password to use for the print server at the server. If neither -n nor -P are given, and the user has no open connection to the server, pserver prompts for a password. -n -n should be given if the print server does not require a password. -C By default, passwords are converted to uppercase before they are sent to the server, because most servers require this. You can turn off this conversion by -C. -q queue name queue name is the name of the print queue you want to service. -c command nwpjmv removes the designated job from the Novell queue and feeds the job file to stdin. command is the printing command that is exe- cuted for each job. The default command is 'lpr'. You can insert several flags into the command, preceded by %. These are replaced with values retrieved from the queue structure for the print job. %u: This field will be replaced by the name of the user who posted this print job. %d: This field will be replaced by the job description field of this print job. -j job number This designates the ID number of the print job to be moved. -d causes extra error messages to be logged. SEE ALSO
nwclient(5), slist(1), pqlist(1), ncpmount(8), ncpumount(8), pserver(1) CREDITS
nwpjmv was written by Bruno Browning (bruno@lss.wisc.edu) based on pserver by Volker Lendecke (lendecke@math.uni-goettingen.de) nwpjmv 03/15/2003 NWPJMV(1)