Added ability to send email to BBS from ISP's email addy.
This commit is contained in:
parent
b21981f525
commit
9979afe0f7
|
@ -13,3 +13,22 @@ Vincent Chapman {
|
||||||
Added IPv6 Support
|
Added IPv6 Support
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vincent Chapman {
|
||||||
|
N1LQJ@COX.NET
|
||||||
|
9 NOV 2013
|
||||||
|
Modifed {
|
||||||
|
mis.pas.pas
|
||||||
|
mis_common.pas
|
||||||
|
mis_client_pop3.pas
|
||||||
|
mis_client_smtp.pas
|
||||||
|
mis_client_nntp.pas
|
||||||
|
mis_client_ftp.pas
|
||||||
|
records.pas
|
||||||
|
bbs_user.pas
|
||||||
|
bbs_menus.pas
|
||||||
|
}
|
||||||
|
Comment {
|
||||||
|
Added ability to send email to BBS from ISP's email addy.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ Unit bbs_User;
|
||||||
Interface
|
Interface
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
|
sysutils,
|
||||||
m_FileIO,
|
m_FileIO,
|
||||||
m_Strings,
|
m_Strings,
|
||||||
m_DateTime,
|
m_DateTime,
|
||||||
|
@ -25,6 +26,7 @@ Type
|
||||||
Security : RecSecurity;
|
Security : RecSecurity;
|
||||||
ThisUser : RecUser;
|
ThisUser : RecUser;
|
||||||
TempUser : RecUser;
|
TempUser : RecUser;
|
||||||
|
EmailUsrChk : RecUser;
|
||||||
UserNum : LongInt;
|
UserNum : LongInt;
|
||||||
AcsOkFlag : Boolean;
|
AcsOkFlag : Boolean;
|
||||||
IgnoreGroup : Boolean;
|
IgnoreGroup : Boolean;
|
||||||
|
@ -489,13 +491,51 @@ Begin
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure TBBSUser.GetEmail (Edit : Boolean);
|
Procedure TBBSUser.GetEmail (Edit : Boolean);
|
||||||
|
Var
|
||||||
|
Str : String;
|
||||||
|
DropOut : Boolean;
|
||||||
Begin
|
Begin
|
||||||
If Edit Then
|
DropOut := False;
|
||||||
Session.io.OutFull (Session.GetPrompt(440))
|
Str := '';
|
||||||
Else
|
|
||||||
Session.io.OutFull (Session.GetPrompt(439));
|
|
||||||
|
|
||||||
ThisUser.EMail := Session.io.GetInput(35, 35, 11, ThisUser.Email);
|
While True Do Begin
|
||||||
|
If Edit Then Begin
|
||||||
|
Session.io.OutFull (Session.GetPrompt(440));
|
||||||
|
End Else Begin
|
||||||
|
Session.io.OutFull (Session.GetPrompt(439));
|
||||||
|
End;
|
||||||
|
|
||||||
|
Str := Session.io.GetInput(35, 35, 11, ThisUser.Email);
|
||||||
|
While (Pos(' ', Str) > 0) Do Begin
|
||||||
|
Delete (Str, Pos(' ', Str), 1);
|
||||||
|
End;
|
||||||
|
|
||||||
|
DropOut := True;
|
||||||
|
|
||||||
|
Reset (UserFile);
|
||||||
|
While Not Eof(UserFile) Do Begin
|
||||||
|
|
||||||
|
Read (UserFile, EmailUsrChk);
|
||||||
|
|
||||||
|
If (strUPPER(str) = strUPPER(EmailUsrChk.Email)) Then Begin
|
||||||
|
If (EmailUsrChk.PermIdx = ThisUser.PermIdx) Then Begin
|
||||||
|
Break;
|
||||||
|
end else begin
|
||||||
|
Session.io.OutFull (Session.GetPrompt(515));
|
||||||
|
DropOut := False;
|
||||||
|
Break;
|
||||||
|
End;
|
||||||
|
End;
|
||||||
|
End;
|
||||||
|
If (DropOut = True) Then Begin
|
||||||
|
Break;
|
||||||
|
End;
|
||||||
|
Close (UserFile);
|
||||||
|
End;
|
||||||
|
|
||||||
|
Close (UserFile);
|
||||||
|
|
||||||
|
ThisUser.EMail := Str;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure TBBSUser.GetUserNote (Edit : Boolean);
|
Procedure TBBSUser.GetUserNote (Edit : Boolean);
|
||||||
|
|
|
@ -589,7 +589,7 @@ Procedure TFTPServer.cmdUSER;
|
||||||
Begin
|
Begin
|
||||||
ResetSession;
|
ResetSession;
|
||||||
|
|
||||||
If SearchForUser(Data, User, UserPos) Then
|
If SearchForUser(Data, User, UserPos, '') Then
|
||||||
UserName := Data
|
UserName := Data
|
||||||
Else
|
Else
|
||||||
UserPos := -1;
|
UserPos := -1;
|
||||||
|
|
|
@ -132,7 +132,7 @@ Begin
|
||||||
NewData := Copy(Data, Pos(' ', Data) + 1, 255);
|
NewData := Copy(Data, Pos(' ', Data) + 1, 255);
|
||||||
|
|
||||||
If NewCmd = 'USER' Then Begin
|
If NewCmd = 'USER' Then Begin
|
||||||
If SearchForUser(NewData, User, UserPos) Then Begin
|
If SearchForUser(NewData, User, UserPos, '') Then Begin
|
||||||
ClientWriteLine(re_AuthPass);
|
ClientWriteLine(re_AuthPass);
|
||||||
|
|
||||||
UserName := NewData;
|
UserName := NewData;
|
||||||
|
|
|
@ -295,7 +295,7 @@ Procedure TPOP3Server.cmdUSER;
|
||||||
Begin
|
Begin
|
||||||
ResetSession;
|
ResetSession;
|
||||||
|
|
||||||
If SearchForUser(Data, User, UserPos) Then Begin
|
If SearchForUser(Data, User, UserPos, '') Then Begin
|
||||||
Client.WriteLine(re_SendUserPass);
|
Client.WriteLine(re_SendUserPass);
|
||||||
UserName := Data;
|
UserName := Data;
|
||||||
End Else
|
End Else
|
||||||
|
|
|
@ -79,26 +79,27 @@ End;
|
||||||
|
|
||||||
Function TSMTPServer.ValidateNameAndDomain (IsFrom: Boolean) : Boolean;
|
Function TSMTPServer.ValidateNameAndDomain (IsFrom: Boolean) : Boolean;
|
||||||
Var
|
Var
|
||||||
InName : String;
|
InName : String;
|
||||||
InDomain : String;
|
InDomain : String;
|
||||||
Begin
|
Begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
InName := strReplace(Copy(Data, Pos('<', Data) + 1, Pos('@', Data) - Pos('<', Data) - 1), '_', ' ');
|
InName := strReplace(Copy(Data, Pos('<', Data) + 1, Pos('@', Data) - Pos('<', Data) - 1), '_', ' ');
|
||||||
InDomain := Copy(Data, Pos('@', Data) + 1, Pos('>', Data) - Pos('@', Data) - 1);
|
InDomain := Copy(Data, Pos('@', Data) + 1, Pos('>', Data) - Pos('@', Data) - 1);
|
||||||
|
|
||||||
If IsFrom Then
|
If IsFrom Then
|
||||||
Server.Status(ProcessID, 'User: ' + InName + ' Domain: ' + InDomain);
|
Server.Status(ProcessID, 'User: ' + InName + ' Domain: ' + InDomain);
|
||||||
|
|
||||||
If InDomain <> bbsCfg.iNetDomain Then Begin
|
Result := SearchForUser(InName, User, UserPos, InName + '@' + InDomain);
|
||||||
Server.Status(ProcessID, 'Refused by domain: ' + InName + '@' + InDomain);
|
|
||||||
Exit;
|
If (InDomain <> bbsCfg.iNetDomain) and (Result = False) Then Begin
|
||||||
End;
|
Server.Status(ProcessID, 'Refused by domain: ' + InName + '@' + InDomain);
|
||||||
|
Exit;
|
||||||
|
End;
|
||||||
|
|
||||||
Result := SearchForUser(InName, User, UserPos);
|
If Not Result Then Begin
|
||||||
|
Server.Status(ProcessID, 'Refused by name: ' + InName + '@' + InDomain);
|
||||||
If Not Result Then
|
End;
|
||||||
Server.Status(ProcessID, 'Refused by name: ' + InName + '@' + InDomain);
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure TSMTPServer.ResetSession;
|
Procedure TSMTPServer.ResetSession;
|
||||||
|
|
|
@ -14,7 +14,7 @@ Var
|
||||||
TempPath : String;
|
TempPath : String;
|
||||||
// Term : TTermAnsi;
|
// Term : TTermAnsi;
|
||||||
|
|
||||||
Function SearchForUser (UN: String; Var Rec: RecUser; Var RecPos: LongInt) : Boolean;
|
Function SearchForUser (UN: String; Var Rec: RecUser; Var RecPos: LongInt; Email: String) : Boolean;
|
||||||
Function CheckAccess (User: RecUser; IgnoreGroup: Boolean; Str: String) : Boolean;
|
Function CheckAccess (User: RecUser; IgnoreGroup: Boolean; Str: String) : Boolean;
|
||||||
Function GetSecurityLevel (Level: Byte; SecLevel: RecSecurity) : Boolean;
|
Function GetSecurityLevel (Level: Byte; SecLevel: RecSecurity) : Boolean;
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ Uses
|
||||||
m_DateTime,
|
m_DateTime,
|
||||||
m_Strings;
|
m_Strings;
|
||||||
|
|
||||||
Function SearchForUser (UN: String; Var Rec: RecUser; Var RecPos: LongInt) : Boolean;
|
Function SearchForUser (UN: String; Var Rec: RecUser; Var RecPos: LongInt; Email: String) : Boolean;
|
||||||
Var
|
Var
|
||||||
UserFile : TFileBuffer;
|
UserFile : TFileBuffer;
|
||||||
Begin
|
Begin
|
||||||
|
@ -42,7 +42,7 @@ Begin
|
||||||
|
|
||||||
If Rec.Flags AND UserDeleted <> 0 Then Continue;
|
If Rec.Flags AND UserDeleted <> 0 Then Continue;
|
||||||
|
|
||||||
If (UN = strUpper(Rec.RealName)) or (UN = strUpper(Rec.Handle)) Then Begin
|
If (UN = strUpper(Rec.RealName)) or (UN = strUpper(Rec.Handle)) or (((strUpper(Email) = strUpper(Rec.Email)) and (Email <> ''))) Then Begin
|
||||||
RecPos := UserFile.FilePosRecord;
|
RecPos := UserFile.FilePosRecord;
|
||||||
Result := True;
|
Result := True;
|
||||||
Break;
|
Break;
|
||||||
|
|
|
@ -69,7 +69,7 @@ Const
|
||||||
mysMaxMenuCmds = 25; // Max menu commands per item
|
mysMaxMenuCmds = 25; // Max menu commands per item
|
||||||
mysMaxMenuInput = 12;
|
mysMaxMenuInput = 12;
|
||||||
mysMaxMenuStack = 8;
|
mysMaxMenuStack = 8;
|
||||||
mysMaxThemeText = 514;
|
mysMaxThemeText = 515;
|
||||||
|
|
||||||
fn_SemFileEchoOut = 'echomail.out';
|
fn_SemFileEchoOut = 'echomail.out';
|
||||||
fn_SemFileEchoIn = 'echomail.in';
|
fn_SemFileEchoIn = 'echomail.in';
|
||||||
|
|
Loading…
Reference in New Issue