mailserver

所属分类:Email服务器
开发工具:Visual C++
文件大小:341KB
下载次数:121
上传日期:2007-11-10 21:30:49
上 传 者孤独爱国者
说明:  一个小型的邮件服务器代码,虽然体积比较小但是五脏俱全。有学习和研究的价值。
(A small mail server code, although the volume is relatively small but fully-equipped one. Learning and research value.)

文件列表:
ddvip.net\Code\afxres.h (32525, 1998-06-15)
ddvip.net\Code\aka.ctl (14, 1998-12-29)
ddvip.net\Code\base64.cpp (2806, 1998-12-29)
ddvip.net\Code\base64.h (799, 1998-12-29)
ddvip.net\Code\base64str.cpp (1886, 1998-12-29)
ddvip.net\Code\base64str.h (434, 1998-12-29)
ddvip.net\Code\cmcqueue (0, 2000-03-19)
ddvip.net\Code\cmcutil.h (3124, 1998-11-22)
ddvip.net\Code\Debug (0, 2005-10-06)
ddvip.net\Code\dnsmx.cpp (21808, 1998-12-26)
ddvip.net\Code\dnsmx.h (82, 1998-11-22)
ddvip.net\Code\D_Alias.cpp (7170, 1998-12-28)
ddvip.net\Code\D_Alias.h (1528, 1998-12-27)
ddvip.net\Code\D_Pop3.cpp (9934, 1998-12-27)
ddvip.net\Code\D_Pop3.h (1186, 1998-12-27)
ddvip.net\Code\D_Service.cpp (12425, 1998-12-29)
ddvip.net\Code\D_Service.h (1543, 1998-12-29)
ddvip.net\Code\forward.ctl (0, 1998-12-28)
ddvip.net\Code\InetServ.dsp (7202, 1998-12-30)
ddvip.net\Code\InetServ.dsw (569, 1998-11-22)
ddvip.net\Code\InetServ.mak (9552, 1998-11-22)
ddvip.net\Code\InetServ.mdp (35328, 1998-11-22)
ddvip.net\Code\InetServ.ncb (254976, 2000-03-19)
ddvip.net\Code\InetServ.opt (48640, 2000-03-19)
ddvip.net\Code\InetServ.plg (3465, 2000-03-19)
ddvip.net\Code\InetServ.rc2 (402, 1998-11-22)
ddvip.net\Code\InetServer.aps (55136, 2000-03-19)
ddvip.net\Code\InetServer.clw (6442, 2000-03-19)
ddvip.net\Code\InetServer.cpp (2515, 1998-11-22)
ddvip.net\Code\InetServer.dsp (3793, 1999-11-08)
ddvip.net\Code\InetServer.dsw (545, 2000-02-11)
ddvip.net\Code\InetServer.h (955, 1998-11-22)
ddvip.net\Code\InetServer.ncb (41984, 1999-11-08)
ddvip.net\Code\InetServer.opt (48640, 2000-02-11)
ddvip.net\Code\InetServer.plg (1043, 1999-11-08)
ddvip.net\Code\InetServer.rc (16231, 2000-03-19)
ddvip.net\Code\Inetserver.rc2 (402, 1998-11-22)
ddvip.net\Code\InetServerDlg.aps (44404, 1998-11-22)
ddvip.net\Code\InetServerDlg.clw (4031, 1998-11-22)
ddvip.net\Code\InetServerDlg.cpp (119447, 2000-03-19)
... ...

This is a small code for forwarding mails from POP3 postbox to MSMail. USE AT YOUR OWN RISK.This has been written using CMC (Common Messaging Calls). The codes have to be included with InterServer and compiled.I have tested this with MSMail but should work with any CMC enabled messaging services. Some part of main InetServer code have been modified for testing & implementing. Please forward bug reports to yasinag@hotmail.com. Requirement for running:- ~~~~~~~~~~~~~~~~~~~~~~~~~ The program uses MAPI DLLs ( bundled with all Windows95/NT ) 1. Valid MSMail User,Exchange_Profile,password. Currently hard coded as "InetGate" & "ipsmail" on ProcessPOP32MAPI() a. create a new user called InetGate in your MSMail postoffice. b. create a new profile (InetGate) called InetGate in your Win95/WinNT All mails will be forwarded as mail from InetGate to Respective User. SMTP From address will be added to Mail Message. 2. New directory for storing all mails that needs to be forwarded. eg: C:\InetServer\cmcqueue 2. New file called mapifwd.ctl storing all POP3 & MSMail users eg : eg:- yasin ( POP3 User ) eg:- Mohammed Yasin ( MSMail Alias ) eg:- MS:APAINTS/APBHP/yasin ( MSMail Address ) eg:- abc eg:- Test Mail user eg:- MS:APAINTS/APBHP/test 3. All mails that needs to be transfered should be moved to new directory called "cmcqueue". InetServerDlg.cpp has been modified to do this automatically with user list. 4. The envelop should start with 1.MSMail user list ( used by mapi forwarding code ) 2.Mail Header ( SMTP mail header ) 3.Mail Body ( SMTP Message Body ) eg:- X-CMC_TO:;; ( one record per line ) eg: X-CMC_TO:Mohamed Yasin;MS:APAINTS/APBHP/yasin; X-CMCEND ( indicates end of mapi address used while parsing in POP2CMC) ...... ( mail header ) ( blank line ) ..... ( message ) . ( end of mail envelop) InetServerDlg.cpp has been modified to do this automatically. Limitation:- ~~~~~~~~~~~~ 1. Supports only base*** decoding for attachment 2. Supports only 16 file attachment ( More than 16 will be ignored ) 3. Supports only 16 mapi addresses per mail 4. Cannot run as Service ( Some MSMail gateway says documented bug exist ) Modified/Added File on Inetserv:- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. Wrap2cmc.cpp -- (NEW) wrapper class defnition for CMC calls 2. Wrap2cmc.h -- (NEW) wrapper class declaration for CMC calls 3. Pop2cmc.cpp -- (NEW) mapi forwarding class defnition 4. Pop2cmc.h -- (NEW) mapi forwarding class declaration 5. cmcutil.h -- (NEW) datatype declaration 6. base***.h -- (NEW) Base*** encoding/decoding taken from public domain 6. base***.cpp -- (NEW) Base*** encoding/decoding taken from public domain 8. InetServerApp.cpp -- all mapi specific variable/code/function commented with //- MAPI a. initialisation code & gets addressess of CMC function 9. InetServerDlg.h -- all mapi specific variable/code/function commented with //- MAPI a. new class to pop3user & mapiuser link 10. InetServerDlg.cpp -- all mapi sepcific variable/code/function commented with //- MAPI a. (NEW) array to stores pop3user & mapiuser link b. InetServerDlg::ProcessNewMail() modified to update mail envelop for mapi forwarding c. CAboutDlg::OnReg() modified to update mapi-enabled flag in registry d. (NEW) InetServerDlg::ProcessPOP32CMC() logs onto mapi and sends the mail error trapping doesn't happen e. InetServerDlg::OnPop3() for building pop3-mapi user link TODO:- ~~~~~~ 1. Add other Decoding schemes 2. Identify To,Cc,Bcc and process accordingly 3. Add MSMail to SMTP forwarding 4. Proper error trappings 5. Parameterise Exchange_Profile & Password 6. Proper documentation ?? 7. Add MSExchange forwarding ( current code might work )

近期下载者

相关文件


收藏者