
모든 도메인과 서비스를 포팅하는 한 서버 공급자에서 다른 서버 공급자로 이동했습니다. 첫눈에는 모든 것이 순조롭게 진행되었지만 이제 나는 dovecot/postfix에 몇 가지 문제가 있음을 깨달았습니다.
첫 번째 문제: 웹 인터페이스(Roundcube)에서는 올바른 타임스탬프가 있는 모든 오래된 메일을 볼 수 있습니다. 메일 클라이언트에서 메일을 받을 때 항상 2015년 5월 5일(서버가 이동된 지 하루 후)이 날짜로 표시됩니다.
두 번째 문제: IMAP을 통해 메일을 주고받을 수 없는 것 같습니다. 오류가 발생하지 않습니다(이 게시물의 뒷부분에 로그를 게시하겠습니다). 메일이 전송된 것 같습니다.
세 번째 문제: 로그 파일에 다음 오류가 포함되어 스팸 처리되었습니다. warning: 9C42A2408E2: virtual_alias_maps map lookup problem for root@dirty-harry -- message not accepted, try again later
(dirty-harry는 내 서버 이름입니다!)
이 모든 문제를 검색하고 구성을 다시 살펴보았지만 문제를 해결할 수 있는 항목을 찾을 수 없습니다.
구성은 다음과 같습니다.
main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_tls_cert_file=/etc/postfix/sslcert/mailserver.crt
smtpd_tls_key_file=/etc/postfix/sslcert/mailserver.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_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = dirty-harry
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = static.136.90.47.78.clients.your-server.de, dirty-harry, localhost.localdomain, 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
disable_vrfy_command = yes
smtpd_sasl_type=dovecot
smtpd_sasl_path=private/auth_dovecot
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
broken_sasl_auth_clients = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql_sender_login_maps.cf
smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch
reject_unknown_sender_domain
smtpd_recipient_restrictions = permit_sasl_authenticated
permit_mynetworks
reject_unauth_destination
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_base = /var/vmail/
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 112400000
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 104
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
master.cf
smtp inet n - - - - smtpd
smtps inet n - - - - smtpd
-o smtpd_tls_wrappermode=yes
#628 inet n - - - - qmqpd
pickup unix n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr unix n - n 300 1 qmgr
#qmgr unix n - 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 - - - - - smtp
relay unix - - - - - smtp
showq unix n - - - - showq
error unix - - - - - error
retry unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}
dovecot.conf
protocols = imap imaps pop3 pop3s
log_timestamp = "%Y-%m-%d %H:%M:%S "
ssl_cert_file = /etc/postfix/sslcert/mailserver.crt
ssl_key_file = /etc/postfix/sslcert/mailserver.key
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
postmaster_address = [email protected]
auth_socket_path = /var/run/dovecot/auth-master
}
auth default {
mechanisms = plain login
passdb sql {
args = /etc/dovecot/dovecot-mysql.conf
}
userdb sql {
# Path for SQL configuration file, see /etc/dovecot/dovecot-sql.conf for example
args = /etc/dovecot/dovecot-mysql.conf
}
user = root
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0600
user = vmail
}
client {
path = /var/spool/postfix/private/auth_dovecot
mode = 0660
user = postfix
group = postfix
}
}
}
메일.로그(제거된 메시지는 매초마다 반복됩니다.)
May 18 06:24:48 dirty-harry postfix/pickup[20017]: warning: B46BD2416D6: message has been queued for 6 days
May 18 06:24:48 dirty-harry postfix/pickup[20017]: B46BD2416D6: uid=0 from=<root>
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: B46BD2416D6: message-id=<20150518042448.B46BD2416D6@dirty-harry>
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: warning: proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf lookup error for "[email protected]"
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: warning: B46BD2416D6: virtual_alias_maps map lookup problem for [email protected] -- message not accepted, try again later
May 18 06:24:48 dirty-harry postfix/pickup[20017]: warning: B4B262416D6: message has been queued for 2 days
May 18 06:24:48 dirty-harry postfix/pickup[20017]: B4B262416D6: uid=0 from=<root>
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: B4B262416D6: message-id=<20150518042448.B4B262416D6@dirty-harry>
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: warning: proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf lookup error for "[email protected]"
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: warning: B4B262416D6: virtual_alias_maps map lookup problem for [email protected] -- message not accepted, try again later
May 18 06:24:48 dirty-harry postfix/pickup[20017]: warning: B4F932416D6: message has been queued for 8 days
May 18 06:24:48 dirty-harry postfix/pickup[20017]: B4F932416D6: uid=0 from=<root>
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: B4F932416D6: message-id=<20150518042448.B4F932416D6@dirty-harry>
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: warning: proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf lookup error for "[email protected]"
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: warning: B4F932416D6: virtual_alias_maps map lookup problem for [email protected] -- message not accepted, try again later
May 18 06:24:48 dirty-harry postfix/pickup[20017]: warning: B53FA2416D6: message has been queued for 3 days
May 18 06:24:48 dirty-harry postfix/pickup[20017]: B53FA2416D6: uid=0 from=<root>
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: B53FA2416D6: message-id=<20150518042448.B53FA2416D6@dirty-harry>
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: warning: proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf lookup error for "[email protected]"
May 18 06:24:48 dirty-harry postfix/cleanup[20080]: warning: B53FA2416D6: virtual_alias_maps map lookup problem for [email protected] -- message not accepted, try again later
mail.err 및 mail.warn은 비어 있습니다.
누군가가 그것을 볼 수 있다면 나는 매우 좋을 것입니다! 감사합니다!
답변1
이제 여기 Server Fault의 사람들과 함께 해결책을 찾았습니다.
두 가지 문제가 발생했습니다.
왜 메일을 받을 수 없나요?
서버를 마이그레이션하고 DNS A 레코드를 업데이트했지만 mx 레코드를 업데이트하는 것을 잊어버렸기 때문에 이전 서버는 여전히 메일을 받고 있었고 postfix와 dovecot은 여전히 실행 중이었습니다. mx 레코드를 업데이트하면 문제가 해결되었습니다.
메일을 보낼 수 없고 로그가 스팸 처리되는 이유는 무엇입니까?
postfix 데이터베이스 이름에 오타가 있었습니다. 문제를 해결하여 문제를 해결했습니다.