imap gmail 获取消息 macosx
计划使用 php imap 函数,我正在尝试从本地主机测试 imap 协议, 我没有找到适用于 mac 的 telnet-ssl 但我可以使用 openssl 和 建立连接。
问题是我只能登录但无法选择邮箱, 创建邮箱,获取列表,... 我可以运行的唯一命令是功能,但它并不是真正有用。
这是我输入的命令 (#) 和我得到的答案 (*)
# openssl s_client -connect imap.gmail.com:993
* CONNECTED(00000003)
* […]
* OK Gimap ready for requests from 77.xxx.xxx.xxx v7if3901328vdd.33
# a001 login myUserName myPassword
* OK myUserName firstname lastname authenticated (Success)
# a002 create testbox
* (nothing, I have to start a new session)
OR
# a002 list "*"
* (nothing, I have to start a new session)
OR
…
不确定问题出在哪里,
是否有人能够成功获取一些邮件 在 Mac 上使用 imap 从 gmail(或其他)发送邮件? (我在osX10.6上)
planning to use php imap functions, I'm trying to test the imap protocol from my local host,
I didn't found telnet-ssl for mac but I can use openssl and
get connected.
The problem is I can only login but I cannot select a mailbox,
create a mailbox, get a list, …
The only command I can run is capability which is not really useful.
Here is the command I typed (#) and answers I get (*)
# openssl s_client -connect imap.gmail.com:993
* CONNECTED(00000003)
* […]
* OK Gimap ready for requests from 77.xxx.xxx.xxx v7if3901328vdd.33
# a001 login myUserName myPassword
* OK myUserName firstname lastname authenticated (Success)
# a002 create testbox
* (nothing, I have to start a new session)
OR
# a002 list "*"
* (nothing, I have to start a new session)
OR
…
Not sure where the problem is,
Was someone able to fetch some mails successfully
from gmail (or other) using imap on mac ?
(I'm on osX10.6)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为这可能是一个行结束问题。 使用
-crlf
开关,它应该 work:这是我一直用来测试 Gmail IMAP 的命令,并且它在 Mac 上对我来说工作得很好:
此外,您的
LIST
命令的语法很糟糕。您需要两个参数,而不是一个:I think this may be a line-ending issue. Use the
-crlf
switch and it should work:This is the command I've always used to test Gmail IMAP, and it's worked fine for me from a Mac:
Also, your
LIST
command has bad syntax. You need two parameters, not one:使用
fetchmail
和procmail
构建本地邮箱。创建~/.fetchmailrc
包含...然后设置
procmail
来存储消息...在您的
~
文件夹中,创建. procmailrc
包含...你可能也需要创建这些文件夹,我忘了。
要开始使用 procmail 获取邮件,请执行以下操作:
您可以使用类似
mutt
的内容来读取邮件,就我个人而言,我不会手动读取正在执行 fetchmail 的邮件,我会将其用于电子邮件自动化,这就是 procmail 所擅长的,本质上你可以创建“食谱”来过滤、处理和重定向邮件。维基百科为了解有关 procmail 的更多信息提供了一个合理的起点。
man fetchmail
和man procmail
页面也有很多有用的信息。Use
fetchmail
andprocmail
to build a local mailbox. Create~/.fetchmailrc
containing...Then setup
procmail
to store the messages...In your
~
folder, create.procmailrc
containing...You may need to make these folders too, I forget.
To begin fetch mail with procmail do:
You can use something like
mutt
to read the mail, personally I don't read mail manually that I'm doing a fetchmail with, I would use it for email automation, which is what procmail is good at, essentially you can create 'recipes' to filter, process and redirect messages.Wikipedia has a reasonable starting point for learning more about procmail. The
man fetchmail
andman procmail
pages also have a lot of useful info.