/// <summary>
        /// Agent Factory
        /// </summary>
        public SpamassassinAgentFactory()
        {
            // Get the current location of where this agent is executing from
            Assembly currAssembly = Assembly.GetAssembly(this.GetType());
            string assemblyPath = Path.GetDirectoryName(currAssembly.Location);
            this.dataPath = Path.Combine(assemblyPath, RelativeDataPath);

            // If the data directory doesn't exist ...
            if (!Directory.Exists(this.dataPath))
            {
                // ... Create it
                Directory.CreateDirectory(this.dataPath);
            }
            // Fetch SpamassassinAgent settings
            this.spamassassinSettings = new SpamassassinSettings(Path.Combine(this.dataPath, ConfigFileName));
        }
        /// <summary>
        /// Initializer for SpamassassinAgent
        /// </summary>
        /// <param name="settings"></param>
        /// <param name="dataPath"></param>
        /// <param name="logPath"></param>
        public SpamassassinAgent(SpamassassinSettings settings, String dataPath, String logPath)
        {
            this.settings = settings;
            this.dataPath = dataPath;

            // Spawn a new logger
            this.logger = new AgentLogger(logPath, (short)this.settings.LogLevel);

            // Register an OnEndOfData event handler.
            this.OnEndOfData += new EndOfDataEventHandler(this.OnEndOfDataHandler);
        }