Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > OS X > Mac OS X Server, Xserve, and Networking

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 13, 2008, 07:40 AM   #1
Ben Kei
macrumors regular
 
Join Date: Oct 2002
Location: London UK
Send a message via AIM to Ben Kei
Logging mail on 10.4 server running Apple mail server

Hello,

In the past we had used Quickmail in our offices which had an option to export a log of all sent/received mail.

Does anyone know if it's possible to do the same in OS X mail server? (using 10.4.11)

We've run a competition on our site and need to be able to get all the entries into list form otherwise some poor soul will be sitting down and extracting about 4000 mail addresses.

Many thanks,
Ben
Ben Kei is offline   0 Reply With Quote
Old Aug 27, 2008, 07:44 AM   #2
Ben Kei
Thread Starter
macrumors regular
 
Join Date: Oct 2002
Location: London UK
Send a message via AIM to Ben Kei
For anyone who is interested.

While we haven't yet found a way to do this on the server, someone has written us an applescript that will log all incoming mail addresses on the client side.

You'll need to paste the script into the applescript editor and save as a scpt file.

Create a rule in Mail:

If - [all] of the following conditions are met:
[every message]
Perform the following actions:
[run apple script]

Then select the script.

This will create a log file in your console.app and write the address and title of all incoming e-mails.

I hope this is useful to someone and thanks to user StefanK on the Macscripter website who wrote the script for us.

------------------------

property logName : "IncomingMailAddresses.log"

using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
repeat with oneMessage in theMessages
tell oneMessage to set {theAddress, theSubject} to {sender, subject}
write_log of me from theSubject & " - " & theAddress
end repeat
end perform mail action with messages
end using terms from

on write_log from theMessage
tell (current date) to set timestamp to short date string & space & time string & ": "
set logFile to ((path to library folder from user domain as text) & "Logs:") & logName
try
set the logStream to open for access file logFile with write permission
set logFileEof to get eof of the logStream
write timestamp & theMessage & return to logStream starting at eof as «class utf8»
close access logStream
return true
on error
try
close access file logFile
end try
return false
end try
end write_log
Ben Kei is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > OS X > Mac OS X Server, Xserve, and Networking

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Resolved: Any good kids games to run on an iMac G3 running Mac OS 10.1-10.4? alexreich PowerPC Macs 10 Feb 10, 2012 02:09 AM
Hosting Multiple Websites on 10.6 Server dantiston Mac OS X Server, Xserve, and Networking 8 Jul 24, 2011 03:09 PM
SAM on Iphone 4 after hacktivated and jailbrocken with Limera1n and Ultrasn0w???? dyurlova Jailbreaks and iOS Hacks 0 Apr 15, 2011 01:52 AM
Mac Mail Crashes On Reply, Replay All, New With Attachment Mac OS X 10.4 kmhebert Mac Applications and Mac App Store 0 Nov 15, 2010 11:04 AM
Mac OS X Server 10.4 unable to send mail to self GRMrGecko Mac OS X Server, Xserve, and Networking 2 Feb 3, 2009 05:06 AM


All times are GMT -5. The time now is 06:16 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC