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

Similar Threads
thread Thread Starter Forum Replies Last Post
Mac Mail 7: Does it work on Mavericks server w/Home folders on server? kk05629 Mac Applications and Mac App Store 2 Dec 10, 2013 03:24 PM
No incoming mail and Outtoing Mail Server (SMTP) quickquestion Mac Basics and Help 0 Oct 22, 2013 05:09 AM
mac mail not saving new mail account server settings panlogistics Mac Applications and Mac App Store 0 Feb 23, 2013 11:44 PM
Mac Mail delete mail from server now default? Macshroomer Mac Basics and Help 1 Dec 28, 2012 10:40 AM
Getting push mail in Apple's Mail.app with exchange server afurry13 Mac Applications and Mac App Store 1 Jun 14, 2012 10:54 PM

Forum Jump

All times are GMT -5. The time now is 02:03 AM.

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

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