fetchmail+mutt+promail+msmtp 设…

Fetchmail:
Fetchmail用于将其它支持pop3的邮件服务器上取回邮件并保存到本地的spool中。它的配置文件为
~/.fetchmail,在配置好后,还需要在shell的启动脚本里写入启动fetchmail的指令。
.fetchmail文件的内容为:
=============================================================================
default
      mda "/usr/bin/procmail -d username" 
set daemon 60 #设置每过60秒取一次邮件
poll st.gsau.edu.cn #设置邮件服务器的地址
uidl #设置每次只取新邮件
protocol POP3 #取信协议为POP3
user "username" #用户名
password "password" #登陆口令
keep #取完邮件后保留邮件在服务器上。
ssl #对于启用了SSL加密的POP3服务器需要加入这条规则,比如GMAIL。
=============================================================================
.muttrc设置
set folder ="/home/gaoyang/Mail"
set mbox="+gaoyang"
my_hdr From:"gaoyang"<gao.yang@126.com>
my_hdr Reply-To:"gaoyang"<gao.yang@126.com>
set spoolfile="+gaoyang"
set sendmail = "/usr/local/bin/msmtp"
set envelope_from = yes
set charset = "gb2312"
set locale = "zh_CN"
set header = no
set hostname = slk.com
set quit = yes
set move = no
set ascii_chars = yes
set include = yes
set indent_str = " > "
set sort = reverse-date
set fast_reply = yes
set pager_stop = yes
set resolve = yes
auto_view text/html
source ~/aliases
set alias_file=~/aliases
set record="+sent-mail"
set send_charset="us-ascii:iso-8859-1:gb2312:utf-8"
set wait_key = yes
set edit_headers = no
set pager_index_lines = 4
set index_format = "%Z %2C |%{%b%d日} %-15.15L (%5lk) %s"

macro index G "!fetchmail"
color normal white default
color attachment black magenta
color signature brightred default
color status white blue
color tilde blue default
color tree brightmagenta default
color underline yellow default
color bold green default
color error red default
color indicator black white
color markers brightred default
color message white blue

color body cyan default "ftp://[^ ]*"
color body cyan default "www.[^ ]*"
color body brightgreen default "[[:alnum:]][-+.#_[:alnum:]]*@[-+.[:alnum:]]*[[:alnum:]]"
color body cyan default "<URL:[^ ]*>"
color body brightblue default "(^|[[:space:]])\\*[^[:space:]]+\\*([[:space:]]|$)"
color body brightblue default "(^|[[:space:]])_[^[:space:]]+_([[:space:]]|$)"
color body brightblue default "(^|[[:space:]])/[^[:space:]]+/([[:space:]]|$)"
color body yellow default "[;:]-[)/(|]"
color body yellow default "[8][-\^][)|]"
color body yellow default "[;:][)/(|]"
color body brightblue default "(http|https|rsync|ftp|news|telnet|finger|gopher)://[^ ]*"
color body brightblue default "<(http|https|rsync|ftp|news|telnet|finger|gopher)://[^ ]*>"

color header yellow default "^cc: "
color header red cyan "^X-Spam-Status:"
color header green default "^date: "
color header yellow default "^from "
color header cyan default "^from: "
color header yellow default "^newsgroups: "
color header yellow default "^reply-to: "
color header cyan default "^subject: "
color header green default "^to: "
color header yellow default "^x-mailer: "
color header yellow default "^message-id:"
color header yellow default "^Organization:"
color header yellow default "^Organisation:"
color header yellow default "^User-Agent:"
color header yellow default "^message-id: .*pine"

color quoted cyan default
color quoted1 yellow default
color quoted2 red default
color quoted3 green default
color quoted4 cyan default
color quoted5 yellow default
color quoted6 red default
color quoted7 green default

color index green default ~N
color index red default ~O
color index magenta default ~F
color index blue default ~T
color index yellow default ~D

folder-hook . "ignore *; unignore from to subject date X-Mailer User-Agent"
folder-hook sent.* "ignore *; unignore from to subject date"
hdr_order X-Mailer User-Agent date from to subject
我的procmail分拣信件设置

MAILDIR="/home/gaoyang/Mail/"
LOGFILE="/var/log/procmail.log"
FORMAIL="/usr/bin/formail"
:0
* .*
gaoyang

安装mamtp,配置好可以通过smtp身份验证,以下是配置:

.msmtprc


account 126com
host smtp.126.com
from *********@126.com
auth login
user *********
password *********
port 25
account default : 126com


在 OpenWrt 上使用 Valgrind 需要注意以下几点: 1. 安装 Valgrind 可以通过 opkg 安装 Valgrind: ``` opkg update opkg install valgrind ``` 2. 配置 Valgrind 默认情况下,Valgrind 会使用 glibc 库,而 OpenWrt 中使用的是 uClibc 库,因此需要手动配置 Valgrind。 首先,需要创建一个文件 `/etc/valgrindrc`,并添加以下内容: ``` # Valgrind configuration file for uClibc libc-libraries: /lib/libuClibc-*.so.* ``` 然后,在运行 Valgrind 时,需要指定使用该配置文件: ``` valgrind --tool=memcheck --vgdb=no --trace-children=yes --num-callers=20 --suppressions=/usr/lib/valgrind/uClibc.supp --read-var-info=yes --malloc-fill=0xFE --free-fill=0xEF --leak-check=full --show-reachable=yes --track-origins=yes --log-file=/tmp/valgrind.log --error-limit=no --undef-value-errors=no --gen-suppressions=all --fair-sched=yes --quiet --trace-children=yes --trace-children-skip=*dhclient* --trace-children-skip=*udhcpc* --trace-children-skip=*pppd* --trace-children-skip=*klogd* --trace-children-skip=*syslogd* --trace-children-skip=*hotplug2* --trace-children-skip=*ntpd* --trace-children-skip=*odhcpd* --trace-children-skip=*dnsmasq* --trace-children-skip=*hostapd* --trace-children-skip=*wpa_supplicant* --trace-children-skip=*ubusd* --trace-children-skip=*logd* --trace-children-skip=*smbd* --trace-children-skip=*nmbd* --trace-children-skip=*irqbalance* --trace-children-skip=*procd* --trace-children-skip=*crond* --trace-children-skip=*ubus* --trace-children-skip=*ubusd* --trace-children-skip=*uhttpd* --trace-children-skip=*amule* --trace-children-skip=*transmission* --trace-children-skip=*minidlna* --trace-children-skip=*mjpg_streamer* --trace-children-skip=*sshd* --trace-children-skip=*swapon* --trace-children-skip=*swapoff* --trace-children-skip=*fstab* --trace-children-skip=*mount* --trace-children-skip=*umount* --trace-children-skip=*tar* --trace-children-skip=*rsync* --trace-children-skip=*scp* --trace-children-skip=*sftp* --trace-children-skip=*ftpd* --trace-children-skip=*ftp* --trace-children-skip=*telnetd* --trace-children-skip=*ssh* --trace-children-skip=*tftp* --trace-children-skip=*httpd* --trace-children-skip=*vnstatd* --trace-children-skip=*ntfs-3g* --trace-children-skip=*samba* --trace-children-skip=*proftpd* --trace-children-skip=*lighttpd* --trace-children-skip=*php* --trace-children-skip=*mysql* --trace-children-skip=*sqlite3* --trace-children-skip=*redis* --trace-children-skip=*memcached* --trace-children-skip=*mosquitto* --trace-children-skip=*influxd* --trace-children-skip=*grafana-server* --trace-children-skip=*postgresql* --trace-children-skip=*mongodb* --trace-children-skip=*cupsd* --trace-children-skip=*dovecot* --trace-children-skip=*nginx* --trace-children-skip=*php-fpm* --trace-children-skip=*thttpd* --trace-children-skip=*dnscrypt-proxy* --trace-children-skip=*tor* --trace-children-skip=*tinyproxy* --trace-children-skip=*privoxy* --trace-children-skip=*squid* --trace-children-skip=*polipo* --trace-children-skip=*darkhttpd* --trace-children-skip=*kamailio* --trace-children-skip=*opensips* --trace-children-skip=*asterisk* --trace-children-skip=*freeswitch* --trace-children-skip=*nagios* --trace-children-skip=*nrpe* --trace-children-skip=*collectd* --trace-children-skip=*snmpd* --trace-children-skip=*openvpn* --trace-children-skip=*pptpd* --trace-children-skip=*strongswan* --trace-children-skip=*xl2tpd* --trace-children-skip=*pppoe-server* --trace-children-skip=*pppoe-relay* --trace-children-skip=*pppoe* --trace-children-skip=*ppp* --trace-children-skip=*rtorrent* --trace-children-skip=*transmission-daemon* --trace-children-skip=*darkstat* --trace-children-skip=*vnstat* --trace-children-skip=*iptraf-ng* --trace-children-skip=*tcpdump* --trace-children-skip=*wireshark* --trace-children-skip=*snort* --trace-children-skip=*sflowtool* --trace-children-skip=*sflow-rt* --trace-children-skip=*ntopng* --trace-children-skip=*openvswitch* --trace-children-skip=*kmod* --trace-children-skip=*iptables* --trace-children-skip=*ip6tables* --trace-children-skip=*ipset* --trace-children-skip=*ulogd* --trace-children-skip=*dhcp6c* --trace-children-skip=*dhcp6s* --trace-children-skip=*wide-dhcpv6* --trace-children-skip=*radvd* --trace-children-skip=*6relayd* --trace-children-skip=*odhcp6c* --trace-children-skip=*odhcpd-dhcpv6* --trace-children-skip=*ip6tables-save* --trace-children-skip=*ip6tables-restore* --trace-children-skip=*iptables-save* --trace-children-skip=*iptables-restore* --trace-children-skip=*ip6tables-restore* --trace-children-skip=*iptables-restore* --trace-children-skip=*logrotate* --trace-children-skip=*sysupgrade* --trace-children-skip=*jffs2dump* --trace-children-skip=*ubiformat* --trace-children-skip=*ubiupdatevol* --trace-children-skip=*ubiattach* --trace-children-skip=*ubidetach* --trace-children-skip=*ubimkvol* --trace-children-skip=*ubirmvol* --trace-children-skip=*ubirename* --trace-children-skip=*ubiupdatevol* --trace-children-skip=*ubiblock* --trace-children-skip=*ubinize* --trace-children-skip=*ubi* --trace-children-skip=*mtd* --trace-children-skip=*dd* --trace-children-skip=*fdisk* --trace-children-skip=*parted* --trace-children-skip=*mkfs* --trace-children-skip=*mkswap* --trace-children-skip=*mkfs.ext3* --trace-children-skip=*mkfs.ntfs* --trace-children-skip=*mkfs.vfat* --trace-children-skip=*mkfs.xfs* --trace-children-skip=*mkfs.jffs2* --trace-children-skip=*mkfs.ubifs* --trace-children-skip=*mount* --trace-children-skip=*umount* --trace-children-skip=*mount* --trace-children-skip=*umount* --trace-children-skip=*fsck* --trace-children-skip=*fsck.ext3* --trace-children-skip=*fsck.ntfs* --trace-children-skip=*fsck.vfat* --trace-children-skip=*fsck.xfs* --trace-children-skip=*fsck.jffs2* --trace-children-skip=*fsck.ubifs* --trace-children-skip=*e2label* --trace-children-skip=*ntfslabel* --trace-children-skip=*dosfslabel* --trace-children-skip=*xfs_admin* --trace-children-skip=*jffs2* --trace-children-skip=*mke2fs* --trace-children-skip=*ntfs-3g.probe* --trace-children-skip=*ntfs-3g.secaudit* --trace-children-skip=*ntfs-3g.usermap* --trace-children-skip=*ntfs-3g* --trace-children-skip=*mount.ntfs-3g* --trace-children-skip=*mount.ntfs* --trace-children-skip=*udhcpc* --trace-children-skip=*dhclient* --trace-children-skip=*dhcpd* --trace-children-skip=*dnsmasq* --trace-children-skip=*hostapd_cli* --trace-children-skip=*wpa_cli* --trace-children-skip=*wpa_supplicant* --trace-children-skip=*pppd* --trace-children-skip=*pptp* --trace-children-skip=*l2tpd* --trace-children-skip=*openconnect* --trace-children-skip=*openvpn* --trace-children-skip=*strongswan* --trace-children-skip=*xl2tpd* --trace-children-skip=*pppoe-server* --trace-children-skip=*pppoe-relay* --trace-children-skip=*pppoe* --trace-children-skip=*ppp* --trace-children-skip=*smbd* --trace-children-skip=*nmbd* --trace-children-skip=*nmblookup* --trace-children-skip=*smbclient* --trace-children-skip=*smbpasswd* --trace-children-skip=*smbstatus* --trace-children-skip=*smbtree* --trace-children-skip=*wins* --trace-children-skip=*samba-tool* --trace-children-skip=*transmission* --trace-children-skip=*transmission-daemon* --trace-children-skip=*amule* --trace-children-skip=*aria2c* --trace-children-skip=*wget* --trace-children-skip=*curl* --trace-children-skip=*ftp* --trace-children-skip=*scp* --trace-children-skip=*sftp* --trace-children-skip=*rsync* --trace-children-skip=*tar* --trace-children-skip=*tftp* --trace-children-skip=*telnet* --trace-children-skip=*ssh* --trace-children-skip=*sftp-server* --trace-children-skip=*ftp-proxy* --trace-children-skip=*proxsmtp* --trace-children-skip=*spamassassin* --trace-children-skip=*fetchmail* --trace-children-skip=*dovecot* --trace-children-skip=*postfix* --trace-children-skip=*exim* --trace-children-skip=*sendmail* --trace-children-skip=*nginx* --trace-children-skip=*apache2* --trace-children-skip=*lighttpd* --trace-children-skip=*php* --trace-children-skip=*mysql* --trace-children-skip=*postgresql* --trace-children-skip=*mosquitto* --trace-children-skip=*influxd* --trace-children-skip=*grafana-server* --trace-children-skip=*memcached* --trace-children-skip=*redis* --trace-children-skip=*mongodb* --trace-children-skip=*cupsd* --trace-children-skip=*darkhttpd* --trace-children-skip=*dnscrypt-proxy* --trace-children-skip=*tor* --trace-children-skip=*tinyproxy* --trace-children-skip=*privoxy* --trace-children-skip=*squid* --trace-children-skip=*polipo* --trace-children-skip=*kamailio* --trace-children-skip=*opensips* --trace-children-skip=*asterisk* --trace-children-skip=*freeswitch* --trace-children-skip=*nagios* --trace-children-skip=*nrpe* --trace-children-skip=*collectd* --trace-children-skip=*snmpd* --trace-children-skip=*openvswitch* --trace-children-skip=*iptables* --trace-children-skip=*ip6tables* --trace-children-skip=*ipset* --trace-children-skip=*ulogd* --trace-children-skip=*dhcp6c* --trace-children-skip=*dhcp6s* --trace-children-skip=*wide-dhcpv6* --trace-children-skip=*radvd* --trace-children-skip=*6relayd* --trace-children-skip=*odhcp6c* --trace-children-skip=*odhcpd-dhcpv6* --trace-children-skip=*ip6tables-save* --trace-children-skip=*ip6tables-restore* --trace-children-skip=*iptables-save* --trace-children-skip=*iptables-restore* --trace-children-skip=*ip6tables-restore* --trace-children-skip=*iptables-restore* --trace-children-skip=*logrotate* --trace-children-skip=*sysupgrade* --trace-children-skip=*opkg* ``` 这里的参数根据需求来调整。 3. 运行 Valgrind 使用 `valgrind` 命令即可运行 Valgrind,例如: ``` valgrind --tool=memcheck --leak-check=full myprogram arg1 arg2 ``` 这里的 `myprogram` 是需要测试的程序,`arg1`、`arg2` 是该程序的参数。 注意:Valgrind 会对程序的运行速度有一定的影响,因此在测试时需要对程序进行压力测试,以确保测试结果的准确性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值