什么是最简单的 IMAP 服务器,允许 Thunderbird 为 Ubuntu Linux 读取消息到 user@localhost?
我的假设是,如果mailutils可以使用“mail”命令读取邮件,则配置了 IMAP 或 POP,这是不正确的。
我正在 Arch Linux 上设置 postfix 服务器。到目前为止它似乎工作正常 - 我可以通过telnet localhost 25. 但是,当我尝试使用 openssl 进行连接时s_client,它会抱怨:
$ openssl s_client -connect localhost:25
CONNECTED(00000003)
140243743024808:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:766:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 228 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---
Run Code Online (Sandbox Code Playgroud)
并以状态 1 退出。
相关部分/etc/postfix/main.cf:
smtpd_tls_key_file = /path/to/server.key.pem
smtpd_tls_cert_file = /path/to/server.crt.pem
smtpd_tls_CAfile = /path/to/ca.pem …Run Code Online (Sandbox Code Playgroud) 我已经使用 Postfix 设置了 linux 电子邮件服务器,并且正确设置了 SPF 和 DKIM。当我发送电子邮件时,电子邮件已正确签名,当我从接收客户端(例如gmail)查看源时,我可以看到SPF和DKIM通过了。
我还安装了 dovecot,以便我可以使用 POP3 和 IMAP。目前,我使用 gmail 作为 POP3 客户端,以便我可以利用他们出色的反垃圾邮件过滤器。虽然服务器上的实际帐户可能有垃圾邮件,但当我通过 gmail 检查电子邮件时,垃圾邮件会被正确过滤。
我遇到的问题是退回的电子邮件。如果我向一个不存在的地址发送电子邮件,邮件被退回,然后 Postfix 向我发送一封退回电子邮件,内容类似于“远程邮件系统说邮箱不可用”。
此退回电子邮件未使用 DKIM 签名,我在查看源时可以看到这一点。因此,我的 POP3 客户端(即 gmail)将退回的电子邮件标记为垃圾邮件。
我必须做什么才能让我的退回电子邮件也通过 DKIM 处理?
我的 debian 服务器上有一个有效的 sendmail 配置,我尝试放置一个 postfix 来接收电子邮件但放弃了,删除 postfix,重新安装 sendmail 但没有任何工作了:(
这是我的mail.log
Feb 2 12:35:56 sd-42311 sendmail[14881]: s12BZuYe014881: from=root, size=69, class=0, nrcpts=1, msgid=<201402021135.s12BZuYe014881@sd-42311.dedibox.fr>, relay=root@localhost
Feb 2 12:35:56 sd-42311 sm-mta[14882]: s12BZuRw014882: SYSERR(root): collect: Cannot write ./dfs12BZuRw014882 (bfcommit, uid=0, gid=113): No such file or directory
Feb 2 12:35:57 sd-42311 sm-mta[14882]: s12BZuRw014882: from=<root@sd-42311.dedibox.fr>, size=336, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Feb 2 12:35:57 sd-42311 sendmail[14881]: s12BZuYe014881: to=personal@email.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30069, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: 421 4.3.0 collect: Cannot write ./dfs12BZuRw014882 (bfcommit, …Run Code Online (Sandbox Code Playgroud) 几天来,我一直在 Postfix/Dovecot 中遇到权限问题。设置使用虚拟域和用户,因此用户的路径home是/var/mail/<domain>/<user>; 路径MailDir是/var/mail/<domain>/<user>/MailDir
邮件日志继续显示Permission Denied:
Apr 3 05:44:16 debian-x2 postfix/virtual[5670]: D6DDD1780100: to=<jeff@deltoid.com>,
relay=virtual, delay=0.15, delays=0.1/0.01/0/0.04, dsn=4.2.0, status=deferred
(maildir delivery failed: create maildir file
/var/mail/deltoid.com/jeff/Maildir/tmp/1396518256.P5670.debian-x2: Permission denied)
Run Code Online (Sandbox Code Playgroud)
权限如下:
# ls -l /var/mail/
total 96
drw-rws--- 4 vmail vmail 4096 Apr 2 18:19 deltoid.com
-rw-rw---- 1 nobody mail 80586 Apr 2 07:45 nobody
# ls -l /var/mail/deltoid.com/
total 12
drw-rws--- 3 vmail vmail 4096 Apr 3 04:47 jeff
drw-rws--- 3 vmail vmail …Run Code Online (Sandbox Code Playgroud) 我正在使用本教程使用 postfix、dovecot 和 mysql 配置邮件服务器。
在配置 Postfix 时,我必须取消注释以下几行,然后使用service postfix restart. 重新启动时,我不断收到以下错误:
root@server-1:~# service postfix restart
* Stopping Postfix Mail Transport Agent postfix
/usr/sbin/postconf: fatal: file /etc/postfix/master.cf: line 23: bad field count
postfix/postfix-script: fatal: cannot execute /usr/sbin/postconf!
...fail!
Run Code Online (Sandbox Code Playgroud)
这是其中的一部分/etc/postfix/master.cf:
smtps inet n - - - - smtpd
-o syslog_name=postfix/smtps # <<< line 23
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
Run Code Online (Sandbox Code Playgroud)
出了什么问题,我该如何解决?
我的 postfix+dovecot 邮件服务器遇到了问题。每次我尝试向不同的服务器(gmail 等)发送电子邮件时,我都会在日志中收到以下消息:
postfix/qmgr[28918]: warning: connect to transport private/smtp: Connection refused
postfix/error[29298]: BB36617ABFB: to=<email@gmail.com>, relay=none, delay=575, delays=575/0.01/0/0.01, dsn=4.3.0, status=deferred (mail transport unavailable)
Run Code Online (Sandbox Code Playgroud)
不知何故,postfix 无法连接到它的 postscreen 传输。这是我的 main.cf(替换了域):
## These are all default Postfix settings that we won't change
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
inet_protocols = ipv4, ipv6
inet_interfaces = all
mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/conf.d/99-mail-stack-delivery.conf -m "${EXTENSION}"
mailbox_size_limit = 0
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database …Run Code Online (Sandbox Code Playgroud) 来自本地主机的消息工作正常,但是当我尝试将邮件从 ie gmail 发送到我的域(如在虚拟域映射中)时,postfix 拒绝它并显示错误(554 5.7.1:客户端主机被拒绝:访问被拒绝)。
主要.cf:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = ***
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory …Run Code Online (Sandbox Code Playgroud) 我正在 RHEL7 上使用 Postfix+Dovecot 设置邮件服务器。虽然不是必需的,但我想设置它以便邮件服务器能够托管多个域。
出现的问题是我有两个完全同义的域名:在过去的某个时候,引入了一个替代名称来节省用户的几次按键操作。以一个域名存在的所有电子邮件也以另一个域名存在。我希望将发送到这两个域的电子邮件发送到同一个邮箱。我想避免将地址硬重写为一个拼写:如果用户从包含长域名的地址发送电子邮件,则该电子邮件在发送时应显示为这样,较短的电子邮件地址也是如此。
Postfix 配置为将邮件中继到这两个域
# in /etc/postfix/main.cf
relay_domains = hash:/etc/postfix/relay_domains
# in /etc/postfix/relay_domains
my-long-named-domain.com lmtp:unix:private/lmtp-dovecot
mydomain.com lmtp:unix:private/lmtp-dovecot
Run Code Online (Sandbox Code Playgroud)Postfix 通过 Dovecot SASL 将身份验证外包给 Dovecot
身份验证和邮件传递适用于短登录,user@mydomain.com而长登录失败并user@my-long-named-domain.com抛出消息User does not exist。我猜这是因为路径,这在 3 和 4 中进行了解释。
Dovecot 对userdband使用 passwd-file 机制passdb,其中%d在文件路径中用于区分域。
# in /etc/dovecot/conf.d/auth-passwdfile.conf.ext
passdb {
driver = passwd-file
args = scheme=CRYPT username_format=%n /etc/dovecot/%d/users
}
userdb {
driver = passwd-file
args = username_format=%n /etc/dovecot/%d/users
default_fields = uid=vmail gid=vmail
}
Run Code Online (Sandbox Code Playgroud)
用户文件仅位于短域名下: …
我已将 Postfix 配置为使用 OpenDKIM 签署我的邮件。(我遵循了本教程。)
现在我想配置 Postfix 以拒绝配置了 DKIM 且邮件缺少正确签名的域的邮件(例如,当我自己的域被用作虚假发件人地址时)。
在 opendkim.conf 中我启用了验证 ( Mode sv),在 Postfic main.conf 中我启用了验证
milter_protocol = 2
milter_default_action = accept
smtpd_milters = inet:localhost:12301
Run Code Online (Sandbox Code Playgroud)
我发现了 mail.log
Feb 24 19:25:10 myhost postfix/cleanup[20016]: 113623DC1119: message-id=<20140623093302970001.H132BE30.southlands@example.com>
Feb 24 19:25:10 myhost opendkim[1355]: 113623DC1119: [78.90.96.5] [78.90.96.5] not internal
Feb 24 19:25:10 myhost opendkim[1355]: 113623DC1119: not authenticated
Feb 24 19:25:10 myhost opendkim[1355]: 113623DC1119: no signature data
Feb 24 19:25:10 myhost postfix/qmgr[1791]: 113623DC1119: from=<southlands515@example.dom>, size=1981, nrcpt=1 (queue active)
Run Code Online (Sandbox Code Playgroud)
所以 OpenDKIM …
postfix ×10
email ×5
dovecot ×3
dkim ×2
email-client ×1
linux ×1
mail-server ×1
mysql ×1
permissions ×1
sendmail ×1
smtp ×1
thunderbird ×1
tls ×1
ubuntu ×1