Ejemplo n.º 1
0
        bool Login(SockTcp sockTcp,ref Pop3LoginState mode,ref MessageList messageList,string user,Ip addr)
        {
            //var folder = Kernel.MailBox.Login(user, addr);
            if(!Kernel.MailBox.Login(user, addr)){
                Logger.Set(LogKind.Secure,sockTcp,1,string.Format("user={0}",user));
                sockTcp.AsciiSend("-ERR Double login");
                return false;
            }
            var folder = string.Format("{0}\\{1}", Kernel.MailBox.Dir, user);
            messageList = new MessageList(folder);//������

            //if (kernel.MailBox.Login(user, addr)) {//POP before SMTP�̂��߂ɁA�Ō�̃��O�C���A�h���X��ۑ�����
            mode = Pop3LoginState.Login;
            Logger.Set(LogKind.Normal,sockTcp,2,string.Format("User {0} from {1}[{2}]",user,sockTcp.RemoteHostname,sockTcp.RemoteAddress.Address));

            // LOGIN
            //dfList = kernel.MailBox.GetDfList(user);
            sockTcp.AsciiSend(string.Format("+OK {0} has {1} message ({2} octets).",user,messageList.Count,messageList.Size));
            return true;
        }