Fetchmail不会把消息放入Cyrus中。 Postfix的LMTP问题?

我试图让fetchmail从POP3服务器上剔除邮件,并将它们插入Cyrus进行本地IMAP传送。

赛勒斯本身工作得很好,我可以用远程计算机上的ThunderBird连接到它。

Fetchmail似乎是在吮吸邮件,但是并没有把它们放在居鲁士(或任何其他地方)。

/var/log/mail.log显示:

Aug 5 03:58:57 IMAP postfix/lmtp[8537]: 57ECB1A15BC: to=, relay=none, delay=77830, delays=77829/0.56/0/0, dsn=4.4.1, status=deferred (connect to IMAP.IMAP[/var/run/cyrus/socket/lmtp]: No such file or directory) 

套接字“/ var / run / cyrus / socket / lmtp”确实存在于系统中。 它由root:root拥有,但是为了进行故障排除,我已经将它修改为777,所以不应该有任何权限问题。

我的后缀main.cf文件:

 smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no append_dot_mydomain = no readme_directory = no smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache myhostname = IMAP.IMAP alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = myserver.com, IMAP.IMAP, localhost.IMAP, localhost relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all mailbox_transport = lmtp:unix:/var/run/cyrus/socket/lmtp virtual_transport = lmtp:unix:/var/run/cyrus/socket/lmtp virtual_alias_domains = somesite.com virtual_alias_maps = hash:/etc/postfix/virtual home_mailbox = Maildir/ mailbox_command = 

后缀master.cf

 .... # ========================================================================== # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (100) # ========================================================================== smtp inet n - n - - smtpd #submission inet n - - - - smtpd # -o smtpd_tls_security_level=encrypt # -o smtpd_sasl_auth_enable=yes # -o smtpd_client_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING #smtps inet n - - - - smtpd # -o smtpd_tls_wrappermode=yes # -o smtpd_sasl_auth_enable=yes # -o smtpd_client_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING #628 inet n - - - - qmqpd pickup fifo n - - 60 1 pickup cleanup unix n - - - 0 cleanup qmgr fifo n - n 300 1 qmgr #qmgr fifo n - - 300 1 oqmgr tlsmgr unix - - - 1000? 1 tlsmgr rewrite unix - - - - - trivial-rewrite bounce unix - - - - 0 bounce defer unix - - - - 0 bounce trace unix - - - - 0 bounce verify unix - - - - 1 verify flush unix n - - 1000? 0 flush proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap smtp unix - - n - - smtp # When relaying mail as backup MX, disable fallback_relay to avoid MX loops relay unix - - - - - smtp -o smtp_fallback_relay= # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 showq unix n - - - - showq error unix - - - - - error retry unix - - - - - error discard unix - - - - - discard local unix - nn - - local virtual unix - nn - - virtual lmtp unix - - n - - lmtp anvil unix - - - - 1 anvil scache unix - - - - 1 scache ... 

imapd.conf

 ... # Unix domain socket that lmtpd listens on. lmtpsocket: /var/run/cyrus/socket/lmtp ... 

cyrus.conf

 ... lmtpunix cmd="lmtpd" listen="/var/run/cyrus/socket/lmtp" prefork=0 maxchild=20 ... 

的.fetchmailrc

 set syslog; set daemon 90; set postmaster "postfix" poll "mail.somesite.com" with protocol pop3 user "[email protected]" there with password "54321" is "me" here --keep poll "mail.mia.bellsouth.net" with protocol pop3 user "me" there with password "54321" is "me" here --keep 

我还有什么可以尝试?

请检查您的postfix lmtp是否通过master.cf中的configurationchrooted

如果你find一条线

lmtp unix - - - - - lmtp

甚至

lmtp unix - - y - - lmtp

你需要检查套接字是否存在于chroot中(很可能是/ var / spool / postfix)。

例如:/ var / spool / postfix / var / run / cyrus / socket / lmtp是否存在? (而不是/ var / run / cyrus / socket / lmtp)

如果是这样的话你可以从lmtp中删除chroot,通过master.cf中的一行来进行

lmtp unix - - n - - lmtp

或者你可以挂载/ var / run / cyrus / socket在chroot中共存。

现在似乎在工作。 我在postfix / main.cf中将“myhostname”更改为“localhost”,突然之间事情似乎正在工作。 感谢您的回复!