Em Terça 07 Novembro 2006 16:11, John Kielkopf escreveu: > I have some users from the financial sector that are required to forward > all mail sent from and received on certain email accounts to a > regulatory service that checks their mail for regulatory compliance. > Probably a similar situation to what your looking to do. > > If you're doing this under windows, you'll need to write a filter to > accomplish this, else you can look at what I use below for one of our > linux xmail servers. > > For capturing the mail going out, I set a filter in filters.out.tab for > each user a want to capture, like: > "[EMAIL PROTECTED]" "*" "0.0.0.0/0" "0.0.0.0/0" > "regulatory_fwd.tab" > > My regulatory_fwd.tab (in the filers dir) looks like: > "/mailfilters/copyin.sh" "@@FILE" "[EMAIL PROTECTED]" > > My copyin.sh file looks like: > #!/bin/sh > # > > # Account to forward to > fwd_addr=$2 > > # XMail Root > xmail_root= /var/MailRoot > > # Path of files > filter_path=/mailfilters/copyin > > # Path that we'll copy temporary messages to > test_path=$filter_path/temp > > # ***************************************************** > # ***************************************************** > > testfile=`basename "$1"` > echo -ne "mail from:<$fwd_addr>\r\n">$test_path/$testfile.fwd > echo -ne "rcpt to:<$fwd_addr>\r\n">>$test_path/$testfile.fwd > echo -ne "\r\n">>$test_path/$testfile.fwd.evolve > sed -f $filter_path/removeheader.sed <$1>>$test_path/$testfile.fwd > mv $test_path/$testfile.fwd.evolve $xmail_root/spool/local > > > My removeheader.sed looks like: > # removeheader.sed > # Strip out all of xmail's special headers. > 1,/^<<MAIL-DATA>>/{ > d > }
Thank you John, With a few changes it's working perfectly. It's really what I was looking for. - To unsubscribe from this list: send the line "unsubscribe xmail" in the body of a message to [EMAIL PROTECTED] For general help: send the line "help" in the body of a message to [EMAIL PROTECTED]