Indy 10 POP3 against MS Exchange 2010?
2016-02-06 12:09
302 查看
Q:
My company has changed email server to Exchange 2010 from and older version of Exchange. Now a number of my utility programs no longer work.... They were programmed many years ago using Delphi7 and an
earlier version of Indy (probably Indy 9). Since then they have been running as scheduled tasks on a server in the local network without problem. What they do is that they read messages from an account and process these. They retrieve the messages using POP3
with authentication (user/password). Now after the switch to Exchange 2010 they no longer can log into the POP3 account. And it seems like we have to set our Outlook POP3 mail clients to both use the Secure Password Authentication (whatever this means) and
also use SSL and the nonstandard port 995. What do I need to modifiy/update to get the conection to work again? Specifically concerning the SPA password handling???
A:
Attach a TIdSSLIOHandlerSocketOpenSSL component to the IOHandler property, set the TIdSMTP.Port property to 995, set the TIdSMTP.AuthType property to satSASL, and add a TIdSASLNTLM component (linked to
a TIdUserPassProvider component) to the TIdSMTP.SASLMechanisms collection.
Q:
Thanks, I will try this for the SMTP sending part. But what about POP3 retrieval? I am using TIdPop3 for that (with Indy 9). I once wrote another application for light-weight checking email (my personal
accounts) where I also used TIdPop3. Later (2009) I found that in order to read mail headers from Gmail I had to add SSL support and this required using a couple of external dll:s (libeay32.dll and ssleay32.dll) since the SSL functionality was not built into
Indy at that time. Has this changed so that I can create a self-contained application with SSL capability without having to use these dll:s?? Exchange 2010 is now requiring SSL for POP3
A:
Sorry, my bad. I meant TIdPOP3 instead of TIdSMTP. Everything I said applies to TIdPOP3 and TIdSMTP equally, though
.> I am using TIdPop3 for that (with Indy 9).
Then you are out of luck, because Indy 9 did not support SASL-based authentications. You need to use Indy 10 for that.
> I once wrote another application for light-weight checking email
> (my personal accounts) where I also used TIdPop3.> Later (2009) I found that in order to read mail headers from Gmail
> I had to add SSL support and this required using a couple of external
> dll:s (libeay32.dll and ssleay32.dll) since the SSL functionality was
> not built into Indy at that time.
> Has this changed so that I can create a self-contained application
> with SSL capability without having to use these dll:s??
The OpenSSL-based IOHandler still uses the DLLs. If you want a self-contained executable, then you cannot use OpenSSL. You wil have to write your own (or find a third-party) IOHandler implementation that
is not dependant on external dependancies, or at least uses a cryptography API that is built into the OS.
Q:
Can I do as follows in the startup of my program:
IdGetMail := TIdPop3.Create(NIL);
IdGetMail.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create;
Q:
I.e. Can I refrain from creating a variable to hold the handler instance:
A:
Technically yes, however you usually need to assign values to the IOHandler's properties, so you would need a local variable at least, unless you use a 'with' statement to access the instance without
a variable.
Will there be a memory leak if I don't explicitly free the IOHandler????
A:
Yes. You can assign the TIdPOP3 as the Owner in that situation, eg: {code:delphi} IdGetMail.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(IdGetMail); {code}
Update: Will this ensure that the IOHandler gets destroyed when the TIdPop3 opject is? (Setting the owner to the component which property is set):
IdGetMail := TIdPop3.Create(NIL);
IdGetMail.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(IdGetMail);
My company has changed email server to Exchange 2010 from and older version of Exchange. Now a number of my utility programs no longer work.... They were programmed many years ago using Delphi7 and an
earlier version of Indy (probably Indy 9). Since then they have been running as scheduled tasks on a server in the local network without problem. What they do is that they read messages from an account and process these. They retrieve the messages using POP3
with authentication (user/password). Now after the switch to Exchange 2010 they no longer can log into the POP3 account. And it seems like we have to set our Outlook POP3 mail clients to both use the Secure Password Authentication (whatever this means) and
also use SSL and the nonstandard port 995. What do I need to modifiy/update to get the conection to work again? Specifically concerning the SPA password handling???
A:
Attach a TIdSSLIOHandlerSocketOpenSSL component to the IOHandler property, set the TIdSMTP.Port property to 995, set the TIdSMTP.AuthType property to satSASL, and add a TIdSASLNTLM component (linked to
a TIdUserPassProvider component) to the TIdSMTP.SASLMechanisms collection.
Q:
Thanks, I will try this for the SMTP sending part. But what about POP3 retrieval? I am using TIdPop3 for that (with Indy 9). I once wrote another application for light-weight checking email (my personal
accounts) where I also used TIdPop3. Later (2009) I found that in order to read mail headers from Gmail I had to add SSL support and this required using a couple of external dll:s (libeay32.dll and ssleay32.dll) since the SSL functionality was not built into
Indy at that time. Has this changed so that I can create a self-contained application with SSL capability without having to use these dll:s?? Exchange 2010 is now requiring SSL for POP3
A:
Sorry, my bad. I meant TIdPOP3 instead of TIdSMTP. Everything I said applies to TIdPOP3 and TIdSMTP equally, though
.> I am using TIdPop3 for that (with Indy 9).
Then you are out of luck, because Indy 9 did not support SASL-based authentications. You need to use Indy 10 for that.
> I once wrote another application for light-weight checking email
> (my personal accounts) where I also used TIdPop3.> Later (2009) I found that in order to read mail headers from Gmail
> I had to add SSL support and this required using a couple of external
> dll:s (libeay32.dll and ssleay32.dll) since the SSL functionality was
> not built into Indy at that time.
> Has this changed so that I can create a self-contained application
> with SSL capability without having to use these dll:s??
The OpenSSL-based IOHandler still uses the DLLs. If you want a self-contained executable, then you cannot use OpenSSL. You wil have to write your own (or find a third-party) IOHandler implementation that
is not dependant on external dependancies, or at least uses a cryptography API that is built into the OS.
Q:
Can I do as follows in the startup of my program:
IdGetMail := TIdPop3.Create(NIL);
IdGetMail.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create;
Q:
I.e. Can I refrain from creating a variable to hold the handler instance:
A:
Technically yes, however you usually need to assign values to the IOHandler's properties, so you would need a local variable at least, unless you use a 'with' statement to access the instance without
a variable.
IdGetMail := TIdPop3.Create(NIL); SslHandler := TIdSSLIOHandlerSocketOpenSSL.Create; IdGetMail.IOHandler := SslHandler;
Will there be a memory leak if I don't explicitly free the IOHandler????
A:
Yes. You can assign the TIdPOP3 as the Owner in that situation, eg: {code:delphi} IdGetMail.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(IdGetMail); {code}
Update: Will this ensure that the IOHandler gets destroyed when the TIdPop3 opject is? (Setting the owner to the component which property is set):
IdGetMail := TIdPop3.Create(NIL);
IdGetMail.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(IdGetMail);
相关文章推荐
- How to send gmail by Indy (TIdSMTP)?
- pentaho saiku 安装全过程
- pentaho saiku 安装全过程
- hdu 1848 Fibonacci again and again
- aix平台安装10.2.0.5的CRS时遇到的bug
- 【题解】2016 BUPT Winter Training #2
- quailty's Contest #1 题解
- cf#AIM Tech Round -B. Making a String-贪心/set
- cf#AIM Tech Round -C. Graph and String-贪心/ 二分图染色
- cf#AIM Tech D. Array GCD (数学+枚举)
- AIM Tech Round (Div. 2) D. Array GCD(dp)
- codeforces AIM Tech Round
- WM_PAINT消息详解,使用InvalidateRect或InvalidateRgn函数刻意产生WM_PAINT消息(WIN7里有变化,“调整视觉效果”,将“启用桌面组合”去掉)
- WM_PAINT消息在窗口重绘的时候产生,那什么时候窗口会重绘(异步工作方式,效率更高,灵活性更强)
- 四川成都电信天邑TEWA-300AI EPON光猫各种折腾
- Cloud Foundry warden container 安全性探讨
- async await
- VIM配置:vim-airline插件安装
- AIM Tech Round (Div. 2) C. Graph and String
- AIM Tech Round (Div. 2)C - Graph and String(二分图染色)