Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 Believe it or not, I want to save all of the email...
Google
Post new topic Reply to topic
Author Message
dale
 
 


Joined: 11 Jun 2006
Posts: 51
Location: las vegas, nv

PostPosted: Sun Jun 11, 2006 3:56 am Reply with quoteBack to top

Believe it or not, I want to save all of the email that passes through the xmail server into a folder. I have searched hi and low, but have not succeeded in this yet. Any help?

I knew I forgot something. I'm running on a windows 2000 machine with version 1.21 of xmail. I also run multiple domains but only want to save all of the email from one domain.

--edit--

I have magically found a way to save a copy of the email that comes into the mailbox using the mailproc.tab and a javascript. But I still can't figure out how to capture the outgoing mail into a folder.

Thanks
View user's profileSend private message
Vlad Alexa Mancini
lead developer
lead developer


Joined: 07 Jul 2003
Posts: 1539

PostPosted: Tue Jun 13, 2006 5:06 pm Reply with quoteBack to top

if you look into phpxmail you see that there are 4 filters which you can apply :

offline :
filters.in.tab and filters.out.tab

on-line :
filters.pre-data.tab and filters.post-data.tab

each pair respectively applied to inbond and outbond messages

you can use these filters for your task , there are many ways to do it
View user's profileSend private message
dale
 
 


Joined: 11 Jun 2006
Posts: 51
Location: las vegas, nv

PostPosted: Wed Jun 14, 2006 3:33 am Reply with quoteBack to top

This works for saving incoming email and writes to the file that I use to keep track of the emails. It works in the domain or user folder

mailproc.tab

"external" "0" "120" "C:\winnt\system32\wscript.exe" "c:\mailcopy\savemail.js" "@@TMPFILE" "@@FROM" "@@RRCPT"
"mailbox"

savemail.js

WScript.Quit(saveme());
function saveme(){
if(WScript.Arguments.length < 1)
return 0;
var archive = WScript.Arguments.item(0),
from = WScript.Arguments.item(1),
rcpt = WScript.Arguments.item(2);
var fs, a, ForAppending;
ForAppending = 8;
fs = new ActiveXObject("Scripting.FileSystemObject");
a = fs.OpenTextFile("c:\\mailcopy\\testfile.txt", ForAppending, false);
d = new Date();
s = d.toLocaleString();
stuff = from + "," + rcpt + "," + archive + "," + s;
a.WriteLine(stuff);
a.Close();
}


Then I put this in all of the filter tabs in the mailroot folder

"*" "*" "*" "*" "savemail.tab"

In the savemail.tab in the filters folder I tried all of these:


"external" "0" "120" "C:\winnt\system32\wscript.exe" "c:\mailcopy\savemail.js" "@@TMPFILE" "@@FROM" "@@RRCPT"

"filter" "0" "120" "C:\winnt\system32\wscript.exe" "c:\mailcopy\savemail.js" "@@TMPFILE" "@@FROM" "@@RRCPT"

"C:\winnt\system32\wscript.exe" "c:\mailcopy\savemail.js" "@@TMPFILE" "@@FROM" "@@RRCPT"

"C:\winnt\system32\wscript.exe" "c:\mailcopy\savemail.js" "@@FILE" "@@FROM" "@@RRCPT"

"c:\mailcopy\savemail.js" "@@FILE" "@@FROM" "@@RRCPT"

And none of these worked. I also restarted the xmail server each time, and there are no stuck messages in the spool. The messages do get delivered. I know that there is many different ways to do this. I just haven't found the right one yet.

--edit--
The tabs didn't show on the reply.
View user's profileSend private message
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT