![메일 서버 보내기/받기 문제 [닫기]](https://linux55.com/image/95687/%EB%A9%94%EC%9D%BC%20%EC%84%9C%EB%B2%84%20%EB%B3%B4%EB%82%B4%EA%B8%B0%2F%EB%B0%9B%EA%B8%B0%20%EB%AC%B8%EC%A0%9C%20%5B%EB%8B%AB%EA%B8%B0%5D.png)
Postfix, Dovecot을 SASL로, Rainloop를 WebClient로 사용하여 메일 서버를 설정했습니다. 저는 MySQL을 사용하고 있습니다(물어본 후내 마지막 질문) 내 사용자 계정과 비밀번호를 입력했는데 제대로 작동하지만 두 가지 문제가 있습니다. [두 번째 문제가 해결되었습니다.]
이메일을 받을 수 없습니다! (직원에게 이메일로만 연락하면 되는데 현재는 이메일을 받을 수 없습니다. 한 직원에서 다른 직원에게 이메일을 보낼 때 실패의 징후를 보여주는 로그 파일을 찾을 수 없습니다. 정말 잘 모르겠습니다. 그것을 받지 못하면 무엇이 문제가 될 수 있습니까).
[해결됨] ThunderBird에서 SMTP 및 IMAP 인증서 확인을 요청하므로 사용자는 ThunderBird를 통해 로그인할 수 있습니다. 즉, 로그인할 때 인증서를 수락해야 하고 처음으로 메일을 보낼 때 다른 인증서를 수락해야 작동합니다. 하지만 Outlook은 IMAP에 대해 인증서를 한 번만 요청하기 때문에 로그인할 수 없습니다.
이것은 내 구성 파일입니다.
/etc/postfix/main.cf
myhostname = mail.domain.tld
mydomain = domain.tld
myorigin = $mydomain
inet_interfaces = all
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#home_mailbox = Maildir/
#relayhost =
#mynetworks = 127.0.0.0/8, 172.16.67.68, [::1]/128
smtpd_tls_cert_file=/etc/ssl/certs/mailcert.pem
smtpd_tls_key_file=/etc/ssl/private/mail.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
smtpd_tls_security_level=may
#smtpd_tls_protocols = !SSLv2, !SSLv3
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
#
smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks
# reject_unauth_destination
#alias_maps = hash:/etc/aliases
#alias_database = hash:/etc/aliases
virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf, mysql:/etc/postfix/mysql-virtual-email2email.cf
mailbox_size_limit = 209715200
message_size_limit = 57671680
/etc/postfix/master.cf
smtp inet n - n - - smtpd
pickup unix n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr unix n - n 300 1 qmgr
#qmgr unix n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
submission inet n - - - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_wrappermode=no
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
-o smtpd_sasl_type=dovecot
-o smtpd_sasl_path=private/auth
smtps inet n - n - - smtpd
-o syslog_name=postfix/smtps
-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
virtual_domains, virtual_users, virtual_aliases라는 3개의 데이터베이스 테이블이 있습니다. Postfix는 이 모든 것을 알고 있으며 postmap
mysql-virtual-mailbox-domains.cf, mysql-virtual-mailbox-maps.cf, mysql-virtual-email2email.cf, mysql-setupvirtual aliasmap.cf의 명령과 구성을 통해 이를 입증했습니다.
/etc/dovecot/dovecot.conf
disable_plaintext_auth = yes
ssl=required
ssl_cert = </etc/ssl/certs/mailcert.pem
ssl_key = </etc/ssl/private/mail.key
!include conf.d/*.conf
# A config file can also tried to be included without giving an error if
# it's not found:
!include_try local.conf
userdb {
driver = static
args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
}
passdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf.ext
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
}
protocol imap {
mail_plugins = " autocreate"
# $mail_plugins = autocreate
}
plugin {
autocreate = Trash
autocreate2 = Sent
autosubscribe = Trash
autosubscribe2 = Sent
}
/etc/dovecot/conf.d/auth-sql.conf.ext
passdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf.ext
}
userdb {
driver = static
args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
}
/etc/dovecot/conf.d/10-mail.conf
namespace inbox {
# Namespace type: private, shared or public
#type = private
# Hierarchy separator to use. You should use the same separator for all
# namespaces or some clients get confused. '/' is usually a good one.
# The default however depends on the underlying mail storage format.
#separator =
# Prefix required to access this namespace. This needs to be different for
# all namespaces. For example "Public/".
#prefix =
# Physical location of the mailbox. This is in same format as
# mail_location, which is also the default for it.
#location =
# There can be only one INBOX, and this setting defines which namespace
# has it.
inbox = yes
# If namespace is hidden, it's not advertised to clients via NAMESPACE
# extension. You'll most likely also want to set list=no. This is mostly
# useful when converting from another server with different namespaces which
# you want to deprecate but still keep working. For example you can create
# hidden namespaces with prefixes "~/mail/", "~%u/mail/" and "mail/".
#hidden = no
# Show the mailboxes under this namespace with LIST command. This makes the
# namespace visible for clients that don't support NAMESPACE extension.
# "children" value lists child mailboxes, but hides the namespace prefix.
#list = yes
# Namespace handles its own subscriptions. If set to "no", the parent
# namespace handles them (empty prefix should always have this as "yes")
#subscriptions = yes
}
mbox_write_locks = fcntl
mail_location = maildir:/var/mail/vhosts/%d/%n
mail_privileged_group = mail
처음부터 시작하더라도 어떤 제안이라도 환영합니다. 하지만 정확하고 자세하게 설명해주세요. 저는 메일 서버 설정 전문가가 아닙니다. 미리 감사드립니다.
추가 정보가 필요한 경우 알려주시면 필요한 구성 파일로 질문을 업데이트하겠습니다.
고쳐 쓰다:
여러분, 모든 것이 올바른 것 같은데 왜 이메일을 받을 수 없는지 모르겠습니다. 누구 도와주실 수 있나요? 어떤 아이디어가 있나요? ?