Exemplo n.º 1
0
        /// <summary>
        /// Initializes the SMTPProcessor with the appropriate
        /// interface implementations.  This allows the relay and
        /// delivery behaviour of the SMTPProcessor to be defined
        /// by the specific server.
        /// </summary>
        /// <param name="domain">
        /// The domain name this server handles mail for.  This does not have to
        /// be a valid domain name, but it will be included in the Welcome Message
        /// and HELO response.
        /// </param>
        /// <param name="recipientFilter">
        /// The IRecipientFilter implementation is responsible for
        /// filtering the recipient addresses to determine which ones
        /// to accept for delivery.
        /// </param>
        /// <param name="messageSpool">
        /// The IMessageSpool implementation is responsible for
        /// spooling the inbound message once it has been recieved from the sender.
        /// </param>
        public SMTPProcessor(string domain, IRecipientFilter recipientFilter, IMessageSpool messageSpool)
        {
            Initialize(domain);

            this.recipientFilter = recipientFilter;
            this.messageSpool    = messageSpool;
        }
Exemplo n.º 2
0
        public void BroadcastMessage(INetMessage msg, IRecipientFilter filter)
        {
            if (filter.IsInitMessage())
            {
                if (!msg.WriteToBuffer(Signon))
                {
                    Out.Warning("BaseServer.BroadcastMessage: Init message would overflow signon buffer!");
                }

                return;
            }

            msg.SetReliable(filter.IsReliable());

            foreach (var client in Clients)
            {
                if (!client.IsSpawned())
                {
                    continue;
                }

                if (!client.NetChannel.SendNetMsg(msg))
                {
                    if (msg.IsReliable())
                    {
                        Out.Warning("BaseServer.BroadcastMessage: Reliable filter message overflow for client {0}", client.GetClientName());
                    }
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes the SMTPProcessor with the appropriate
        /// interface implementations.  This allows the relay and
        /// delivery behaviour of the SMTPProcessor to be defined
        /// by the specific server.
        /// </summary>
        /// <param name="domain">
        /// The domain name this server handles mail for.  This does not have to
        /// be a valid domain name, but it will be included in the Welcome Message
        /// and HELO response.
        /// </param>
        /// <param name="messageSpool">
        /// The IRecipientFilter implementation is responsible for
        /// filtering the recipient addresses to determine which ones
        /// to accept for delivery.
        /// </param>
        public SMTPProcessor(string domain, IMessageSpool messageSpool)
        {
            Initialize(domain);

            recipientFilter   = new LocalRecipientFilter(domain);
            this.messageSpool = messageSpool;
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes the SMTPProcessor with the appropriate
        /// interface implementations.  This allows the relay and
        /// delivery behaviour of the SMTPProcessor to be defined
        /// by the specific server.
        /// </summary>
        /// <param name="domain">
        /// The domain name this server handles mail for.  This does not have to
        /// be a valid domain name, but it will be included in the Welcome Message
        /// and HELO response.
        /// </param>
        /// <param name="recipientFilter">
        /// The IRecipientFilter implementation is responsible for
        /// filtering the recipient addresses to determine which ones
        /// to accept for delivery.
        /// </param>
        public SMTPProcessor(string domain, IRecipientFilter recipientFilter)
        {
            Initialize(domain);

            this.recipientFilter = recipientFilter;
            messageSpool         = new MemoryMessageSpool();
        }
Exemplo n.º 5
0
        /// <summary>
        /// Initializes the SMTPProcessor with the appropriate
        /// interface implementations.  This allows the relay and
        /// delivery behaviour of the SMTPProcessor to be defined
        /// by the specific server.
        /// </summary>
        /// <param name="domain">
        /// The domain name this server handles mail for.  This does not have to
        /// be a valid domain name, but it will be included in the Welcome Message
        /// and HELO response.
        /// </param>
        public SMTPProcessor(string domain)
        {
            Initialize(domain);

            // Initialize default Interface implementations.
            recipientFilter = new LocalRecipientFilter(domain);
            messageSpool    = new MemoryMessageSpool();
        }
Exemplo n.º 6
0
        /// <summary>
        /// Initializes the SMTPProcessor with the appropriate 
        /// interface implementations.  This allows the relay and
        /// delivery behaviour of the SMTPProcessor to be defined
        /// by the specific server.
        /// </summary>
        /// <param name="domain">
        /// The domain name this server handles mail for.  This does not have to
        /// be a valid domain name, but it will be included in the Welcome Message
        /// and HELO response.
        /// </param>
        /// <param name="messageSpool">
        /// The IRecipientFilter implementation is responsible for 
        /// filtering the recipient addresses to determine which ones
        /// to accept for delivery.
        /// </param>
        public SMTPProcessor(string domain, IMessageSpool messageSpool)
        {
            Initialize(domain);

            _recipientFilter = new LocalRecipientFilter(domain);
            _messageSpool = messageSpool;
        }
 /// <summary>Default Logger</summary>
 //private static ILog log = LogManager.GetLogger( typeof( SMTPProcessor ) );
 
 #endregion
 
 #region Constructors
         
 /// <summary>
 /// Initializes the SMTPProcessor with the appropriate 
 /// interface implementations.  This allows the relay and
 /// delivery behaviour of the SMTPProcessor to be defined
 /// by the specific server.
 /// </summary>
 /// <param name="domain">
 /// The domain name this server handles mail for.  This does not have to
 /// be a valid domain name, but it will be included in the Welcome Message
 /// and HELO response.
 /// </param>
 public SMTPProcessor( string domain )
 {
     Initialize( domain );
     
     // Initialize default Interface implementations.
     recipientFilter = new LocalRecipientFilter( domain );
     messageSpool = new MemoryMessageSpool();
 }
 /// <summary>
 /// Initializes the SMTPProcessor with the appropriate 
 /// interface implementations.  This allows the relay and
 /// delivery behaviour of the SMTPProcessor to be defined
 /// by the specific server.
 /// </summary>
 /// <param name="domain">
 /// The domain name this server handles mail for.  This does not have to
 /// be a valid domain name, but it will be included in the Welcome Message
 /// and HELO response.
 /// </param>
 /// <param name="recipientFilter">
 /// The IRecipientFilter implementation is responsible for 
 /// filtering the recipient addresses to determine which ones
 /// to accept for delivery.
 /// </param>
 /// <param name="messageSpool">
 /// The IMessageSpool implementation is responsible for 
 /// spooling the inbound message once it has been recieved from the sender.
 /// </param>
 public SMTPProcessor( string domain, IRecipientFilter recipientFilter, IMessageSpool messageSpool )
 {
     Initialize( domain );
                 
     this.recipientFilter = recipientFilter;
     this.messageSpool = messageSpool;
 }
 /// <summary>
 /// Initializes the SMTPProcessor with the appropriate 
 /// interface implementations.  This allows the relay and
 /// delivery behaviour of the SMTPProcessor to be defined
 /// by the specific server.
 /// </summary>
 /// <param name="domain">
 /// The domain name this server handles mail for.  This does not have to
 /// be a valid domain name, but it will be included in the Welcome Message
 /// and HELO response.
 /// </param>
 /// <param name="recipientFilter">
 /// The IRecipientFilter implementation is responsible for 
 /// filtering the recipient addresses to determine which ones
 /// to accept for delivery.
 /// </param>
 public SMTPProcessor( string domain, IRecipientFilter recipientFilter )
 {
     Initialize( domain );
                 
     this.recipientFilter = recipientFilter;
     messageSpool = new MemoryMessageSpool();
 }
Exemplo n.º 10
0
 public void Dispose()
 {
     this.messageSpool    = null;
     this.recipientFilter = null;
 }