我正在使用获取邮件和购买邮件转发电子邮件到一个gmail帐户。我在用Mac终端。
这是我的.fetchmailrc:
set no bouncemail
poll outlook.office365.com with protocol imap
port 993
auth password
user user@domain.com password password
ssl
sslfingerprint "<Correct Fingerprint - not sure if I should copy this here>"
sslcertpath /Users/myuser/.certs
keep
no rewrite
mda "/usr/local/bin/procmail -f %F -d %T";这是我的.procmailrc文件:
VERBOSE=yes
:0
! myusername@gmail.com当我运行-vv时,似乎一切都正常,它会在我从电子邮件帐户中找到一个未读的电子邮件。在procmail下输出的最后一件事是:
procmail: Executing "/usr/sbin/sendmail,-oi,myusername@gmail.com"没有列出明显的错误。
但是,在我的gmail账户里什么都没出现?
发布于 2017-06-09 15:33:21
作为将来的参考,@KevinO的评论和@thrig的回答都奏效了,因为我的gmail中现在出现了这些邮件(尽管它们看起来像是来自myusername@gmail.com,而不是原始发件人,但这是另一个问题)。
对于那些想使用procmail/postfix作为更新的用户,将sendmail配置为从OSX Sierra上的gmail发送,这些指令与@KevinO提供的链接略有不同:
编辑文件/etc/后缀/main.cf,添加到底部:
mydomain_fallback = localhost
mail_owner = _postfix
setgid_group = _postdrop
relayhost = smtp.gmail.com:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_use_tls = yes
#smtp_tls_security_level = encrypt
#tls_random_source = dev:/dev/urandom
smtp_sasl_mechanism_filter = login
smtp_sasl_mechanism_filter = login在sasl_passwd中:
smtp.gmail.com:587 username@gmail.com:password测试设置:
date | mail -s test test@testdomain.comhttps://unix.stackexchange.com/questions/369842
复制相似问题