pop3&&IMAP4 login详解程序员
程序员 详解 038 login pop3
2023-06-13 09:20:03 时间
clean.sh 删除邮件
#!/bin/sh username="[email protected]"; password="password"; MAX_MESS=$1 [ $# -eq 0 ] exit 1 || : sleep 2 echo USER $username sleep 1 echo PASS $password sleep 2 for (( j = 1 ; j = $MAX_MESS; j++ )) echo DELE $j sleep 1 done echo QUIT
# Copyright 2004, Chris F.A. Johnson # Released under the terms of the GNU General Public License CR=$/r ## carriage return; for removal of ## connect to POP3 server on local machine, port 110 exec 3 /dev/tcp/127.0.0.1/110 ## get response from server read ok line 3 ## check that it succeeded [ "${ok%$CR}" != "+OK" ] exit 5 ## send user name, get response and check that it succeeded echo user poppy 3 read ok line 3 [ "${ok%$CR}" != "+OK" ] exit 5 ## send password, get response and check that it succeeded echo pass pop3test 3 read ok line 3 [ "${ok%$CR}" != "+OK" ] exit 5 ## get number of messages echo stat 3 read ok num x 3 ## display number of messages echo $num messages ## close connection echo quit 3
[[email protected] ~] nc imap.mailserver.com 143 * OK [CAPABILITY IMAP4 IMAP4rev1 IDLE PUSHSERVICE ID UIDPLUS AUTH=LOGIN NAMESPACE] Mail IMAP4Server ready C1 LOGIN [email protected] password C1 OK Success login ok
2474.html
服务器部署程序员系统优化网站设置运维相关文章
- 程序员面试,能不能不考“八股文”?
- Scratch3.0——助力新进程序员理解程序(案例八、等差数列计算1)
- Linux 查看各文件夹大小命令du -h –max-depth=1详解程序员
- nginx -t “nginx: [warn] only the last index in “index” directive should be absolute in 6 “的问题解决详解程序员
- linux 模拟延时和丢包详解程序员
- shell–2–shell变量 定义变量 使用变量 只读变量 删除变量 变量类型 Shell字符串 shell函数详解程序员
- apt-get、apt-cache的一些日常操作详解程序员
- & 与 &&、| 与 || 的区别详解程序员
- linux find命令&mtime参数用法详解程序员
- 小记–解决方案: rsyslogd cpu占用率高详解程序员
- centos7上设置中文字符集详解程序员
- 去除DEDECMS后台预览文章URL地址多余的数字信息详解程序员
- 织梦CMS调用文章列表时,怎么显示短时间格式详解程序员
- git reset –hard HEAD^后显示more的原因及如何解决详解程序员
- nohup top -p 22452 -b >>jiu.log &详解程序员
- valgrind: failed to start tool ‘memcheck’ for platform ‘amd64-linux’: No such file or directory详解程序员
- c++ – Linking problems due to symbols with abi::cxx11详解程序员
- undefined reference to symbol’ pthread_create@@GLIBC_2.2.5’详解程序员
- Redis的那些最常见面试问题详解程序员
- Eclipse 窗口说明—Eclipse教程第03课详解程序员
- Eclipse Java 构建路径 —Eclipse教程第13课详解程序员
- Eclipse 透视图(Perspective)—Eclipse教程第06课详解程序员
- Centos7上安装docker详解程序员
- 关系型数据库–范式详解程序员
- 如何炼成优秀的程序员详解程序员
- 王者荣耀助手详解程序员
- 如何实现Java程序发送邮件详解程序员