
방금 Postfix에서 첫 번째 가상 메일함을 설정했습니다. 동일한 도메인 내에서 동일한 서버에 두 개의 사서함(가상 사서함과 셸 계정이 있는 사서함)을 둘 수 있는지 궁금합니다.
[email protected] => goes to /home/first/..
[email protected] => goes to /var/spool/mail/virtual/..
나에게 필요한 것은 .forward
파일을 사용하여 이메일을 전달하는 것이며 가상 사서함이 아닌 쉘 계정에서만 가능합니다. 따라서 두 가지 유형의 사서함(저장용 사서함과 전달용 사서함)이 모두 필요합니다.
내가 가진 문제는 mydomain.com을 mydestination
목록에 추가하면 가상 사서함에 이메일이 저장되지 않는다는 것입니다. 그리고 ThunderBird는 다음과 같은 메시지를 표시합니다.
An error occurred while sending mail. The mail server responded: 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table. Please check the message recipient [email protected] and try again.
[업데이트]
지금까지 내가 성공하지 못한 일은 다음과 같습니다.
나의 /etc/postfix/main.cf
:
mydestination = localhost
virtual_mailbox_domains = mydomain.com
virtual_alias_maps = hash:/etc/postfix/valias
virtual_mailbox_base = /var/spool/mail/virtual
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
나의 /etc/postfix/valias
:
shell_account shell_account@localhost
나의 /etc/postfix/vmailbox
:
[email protected] mydomain.com/virtual/
그리고 나서 나는 달렸고 postmap /etc/postfix/valias
마침내 . 그리고 IMAP 서버로 Courier를 사용하고 있으므로 다음과 같이 표시됩니다.postmap /etc/postfix/vmailbox
postfix reload
userdb -show
virtual
그런데 이메일을 보내려고 하면[이메일 보호됨], Thunderbird는 다음과 같은 메시지를 표시합니다.
An error occurred while sending mail. The mail server responded: 5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table. Please check the message recipient [email protected] and try again.
[업데이트]
그리고 여기 내 mail.log
:
postfix/smtpd[10098]: connect from localhost[127.0.0.1]
postfix/smtpd[10098]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table; from=<mehran@localhost> to=<[email protected]> proto=ESMTP helo=<[127.0.0.1]>
postfix/smtpd[10098]: disconnect from localhost[127.0.0.1]
답변1
글쎄요, 이것이 귀하의 필요를 충족시켰는지 아닌지는 모르겠습니다. 가정하다
mydestination = local.mydomain.com
virtual_mailbox_domains = mydomain.com
그런 다음 virtual_alias_maps에 별칭을 추가하십시오.
virtual_alias_maps = hash:/etc/postfix/virtual_alias
/etc/postfix/virtual_alias
(업데이트됨) 의 내용
[email protected] second
.forward는 로컬 도메인에서만 작동하기 때문에 virtual_mailbox 도메인에서 로컬 도메인으로 별칭을 생성하는 것이 좋습니다.
참고자료:postfix.org