가상 도메인에는 exim을 사용합니다. 다음 라우터를 만들었습니다.
domains_virtual:
debug_print = "R: domains_virtual for $local_part@$domain"
driver = accept
domains = /etc/exim4/domains_virtual.txt
require_files = /var/mail/virtual/$domain_data/$local_part_data
transport = virtual_mailbox
cannot_route_message = Unknown virtual user $local_part@$domain
[email protected]
수락해서는 안 되는 테스트 이메일을 보냈습니다.
# ls -la /var/mail/virtual/example.local
insgesamt 30
drwxrwsr-x 3 root mailuser 4 10. Sep 07:34 .
drwxrwsr-x 4 root mailuser 4 10. Sep 06:20 ..
-rw-r--r-- 1 root mailuser 92 10. Sep 06:26 .aliases
drwxrws--- 5 root mailuser 5 9. Mär 2011 ouzncwso
#
그러나 메시지는 승인되고 exim은 maildir을 생성합니다 oehtgczb
!
왜? 내가 또 어떻게 말할 수 있겠는가?
편집: 예, 라우터에 전화를 겁니다.
# exim4 -bt [email protected]
R: domains_virtual_forward for [email protected]
R: domains_virtual for [email protected]
[email protected]
router = domains_virtual, transport = virtual_mailbox
다음은 localhost와의 SMTP 세션 로그입니다.
2021-09-10 09:38:50.990 [32472] SMTP connection from [127.0.0.1]:57196 I=[127.0.0.1]:25 (TCP/IP connection count = 2)
2021-09-10 09:39:27.136 [34113] 1mOb84-0008sD-82 SA: Debug: SAEximRunCond expand returned: ''
2021-09-10 09:39:27.137 [34113] 1mOb84-0008sD-82 SA: Action: Not running SA because SAEximRunCond expanded to false (Message-Id: 1mOb84-0008sD-82). From <test@localhost> (host=localhost [127.0.0.1]) for [email protected]
2021-09-10 09:39:27.161 [34113] 1mOb84-0008sD-82 <= test@localhost H=localhost (x) [127.0.0.1]:57196 I=[127.0.0.1]:25 P=smtp S=477 M8S=0 RT=6s id*[email protected] from <test@localhost> for [email protected]
2021-09-10 09:39:27.182 [34120] 1mOb84-0008sD-82 Warning: Tainted '/var/mail/virtual/example.local/oehtgczb' (file or directory name for virtual_mailbox transport) not permitted
2021-09-10 09:39:27.201 [34119] 1mOb84-0008sD-82 => oehtgczb <[email protected]> F=<test@localhost> P=<test@localhost> R=domains_virtual T=virtual_mailbox S=596 QT=6s DT=0.021s
2021-09-10 09:39:27.202 [34119] 1mOb84-0008sD-82 Completed QT=6s
2021-09-10 09:39:28.899 [34113] SMTP connection from localhost (x) [127.0.0.1]:57196 I=[127.0.0.1]:25 closed by QUIT
답변1
내 생각엔 해결책이 있는 것 같아. local_parts
대신 사용하십시오 require_files
:
domains_virtual:
debug_print = "R: domains_virtual for $local_part@$domain"
driver = accept
domains = /etc/exim4/domains_virtual.txt
local_parts = dsearch;/var/mail/virtual/$domain_data
transport = virtual_mailbox
cannot_route_message = Unknown virtual user $local_part@$domain