teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

5

2019/04/03 16:34

投稿

kodiack
kodiack

スコア13

title CHANGED
File without changes
body CHANGED
@@ -165,9 +165,9 @@
165
165
  smtp_sasl_tls_security_options = noanonymous
166
166
  smtp_sasl_mechanism_filter = plain
167
167
 
168
- myhostname = server.example.com
168
+ myhostname = server.example.jp
169
- myorigin = server.example.com
169
+ myorigin = server.example.jp
170
- mydomain = example.com
170
+ mydomain = example.jp
171
171
 
172
172
  mynetworks = 127.0.0.1 [::1]
173
173
 

4

2019/04/03 16:34

投稿

kodiack
kodiack

スコア13

title CHANGED
File without changes
body CHANGED
File without changes

3

main.cfの設定内容を追加

2019/04/03 16:32

投稿

kodiack
kodiack

スコア13

title CHANGED
File without changes
body CHANGED
@@ -45,4 +45,199 @@
45
45
  > Apr 3 11:25:17 server postfix/smtpd[4768]: NOQUEUE: reject: RCPT from mail-lf1-f46.google.com[209.85.167.46]: 550 5.1.1 <test@example.jp>: Recipient address rejected: User unknown in virtual mailbox table; from=<test-test@gmail.com> to=<test@example.jp> proto=ESMTP helo=<mail-lf1-f46.google.com>
46
46
  > Apr 3 11:25:18 server postfix/smtpd[4768]: disconnect from mail-lf1-f46.google.com[209.85.167.46] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 quit=1 commands=5/7
47
47
 
48
+
49
+
50
+ 現在までのmain.cfの変更箇所は、設定をちょこちょこ変えているので変更した箇所のみの抜粋が難しいですが
51
+ 念のため、現在のmain.cfでコメントアウト部分を抜いた設定情報を以下に記します。
52
+
53
+ ```ここに言語を入力
54
+ root@server:/# cat /etc/postfix/main.cf
55
+
56
+ queue_directory = /var/spool/postfix
57
+ command_directory = /usr/sbin
58
+ daemon_directory = /usr/lib/postfix/sbin
59
+ data_directory = /var/lib/postfix
60
+ mail_owner = postfix
61
+ sendmail_path = /usr/sbin/sendmail
62
+ newaliases_path = /usr/bin/newaliases
63
+ mailq_path = /usr/bin/mailq
64
+ setgid_group = postdrop
65
+
66
+ debugger_command =
67
+ PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
68
+ ddd $daemon_directory/$process_name $process_id & sleep 5
69
+
70
+ debug_peer_level = 2
71
+
72
+ luser_relay = user1@example.jp
73
+ local_recipient_maps =
74
+
75
+ biff = no
76
+
77
+ swap_bangpath = no
78
+
79
+ allow_percent_hack = no
80
+
81
+ allow_min_user = no
82
+
83
+ disable_vrfy_command = yes
84
+
85
+ inet_protocols = all
86
+
87
+ inet_interfaces = all
88
+
89
+ smtpd_tls_protocols = !SSLv2 !SSLv3
90
+ smtpd_tls_mandatory_protocols = !SSLv2 !SSLv3
91
+ smtp_tls_protocols = !SSLv2 !SSLv3
92
+ smtp_tls_mandatory_protocols = !SSLv2 !SSLv3
93
+ lmtp_tls_protocols = !SSLv2 !SSLv3
94
+ lmtp_tls_mandatory_protocols = !SSLv2 !SSLv3
95
+
96
+ smtpd_tls_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CDC3-SHA, KRB5-DE5, CBC3-SHA
97
+ smtpd_tls_dh512_param_file = /etc/ssl/dh512_param.pem
98
+ smtpd_tls_dh1024_param_file = /etc/ssl/dh2048_param.pem
99
+
100
+ tls_random_source = dev:/dev/urandom
101
+
102
+ smtp_tls_loglevel = 1
103
+ smtpd_tls_loglevel = 1
104
+
105
+ smtpd_tls_security_level = may
106
+
107
+ smtp_tls_security_level = may
108
+
109
+ smtp_tls_CApath = /etc/ssl/certs
110
+ smtp_tls_CAfile = $smtpd_tls_CAfile
111
+ smtp_tls_note_starttls_offer = yes
112
+
113
+ enable_long_queue_ids = yes
114
+
115
+ smtpd_reject_unlisted_recipient = yes
116
+ smtpd_reject_unlisted_sender = yes
117
+
118
+ header_checks = pcre:/etc/postfix/header_checks
119
+ body_checks = pcre:/etc/postfix/body_checks.pcre
120
+
121
+ smtpd_command_filter = pcre:/etc/postfix/command_filter.pcre
122
+
123
+ smtpd_helo_required = yes
124
+ smtpd_helo_restrictions =
125
+ permit_mynetworks
126
+ permit_sasl_authenticated
127
+ check_helo_access pcre:/etc/postfix/helo_access.pcre
128
+ reject_non_fqdn_helo_hostname
129
+ reject_unknown_helo_hostname
130
+
131
+ smtpd_sender_restrictions =
132
+ reject_unknown_sender_domain
133
+ reject_non_fqdn_sender
134
+ reject_unlisted_sender
135
+ permit_mynetworks
136
+ permit_sasl_authenticated
137
+ check_sender_access pcre:/etc/postfix/sender_access.pcre
138
+
139
+ smtpd_recipient_restrictions =
140
+ reject_non_fqdn_recipient
141
+ reject_unlisted_recipient
142
+ check_policy_service inet:127.0.0.1:7777
143
+ permit_mynetworks
144
+ permit_sasl_authenticated
145
+ reject_unauth_destination
146
+
147
+ smtpd_end_of_data_restrictions =
148
+ check_policy_service inet:127.0.0.1:7777
149
+
150
+ smtpd_data_restrictions = reject_unauth_pipelining
151
+
152
+ proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps
153
+
154
+ enable_original_recipient = no
155
+
156
+ virtual_minimum_uid = 2000
157
+ virtual_uid_maps = static:2000
158
+ virtual_gid_maps = static:2000
159
+ virtual_mailbox_base = /var/vmail
160
+
161
+ relayhost = [MAIL.PROVIDER.SERVER.NAME.COM]:587
162
+ smtp_use_tls = yes
163
+ smtp_sasl_auth_enable = yes
164
+ smtp_sasl_password_maps = hash:/etc/postfix/saslpass
165
+ smtp_sasl_tls_security_options = noanonymous
166
+ smtp_sasl_mechanism_filter = plain
167
+
168
+ myhostname = server.example.com
169
+ myorigin = server.example.com
170
+ mydomain = example.com
171
+
172
+ mynetworks = 127.0.0.1 [::1]
173
+
174
+ mydestination = $myhostname, localhost, localhost.localdomain
175
+
176
+ alias_maps = hash:/etc/postfix/aliases
177
+ alias_database = hash:/etc/postfix/aliases
178
+
179
+ message_size_limit = 20971520
180
+
181
+ recipient_delimiter = +
182
+
183
+ compatibility_level = 2
184
+
185
+ transport_maps =
186
+ proxy:pgsql:/etc/postfix/pgsql/transport_maps_user.cf
187
+ proxy:pgsql:/etc/postfix/pgsql/transport_maps_maillist.cf
188
+ proxy:pgsql:/etc/postfix/pgsql/transport_maps_domain.cf
189
+
190
+ sender_dependent_relayhost_maps =
191
+ proxy:pgsql:/etc/postfix/pgsql/sender_dependent_relayhost_maps.cf
192
+
193
+ smtpd_sender_login_maps =
194
+ proxy:pgsql:/etc/postfix/pgsql/sender_login_maps.cf
195
+
196
+ virtual_mailbox_domains =
197
+ proxy:pgsql:/etc/postfix/pgsql/virtual_mailbox_domains.cf
198
+
199
+ relay_domains =
200
+ $mydestination
201
+ proxy:pgsql:/etc/postfix/pgsql/relay_domains.cf
202
+
203
+ virtual_mailbox_maps =
204
+ proxy:pgsql:/etc/postfix/pgsql/virtual_mailbox_maps.cf
205
+
206
+ virtual_alias_maps =
207
+ proxy:pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf
208
+ proxy:pgsql:/etc/postfix/pgsql/domain_alias_maps.cf
209
+ proxy:pgsql:/etc/postfix/pgsql/catchall_maps.cf
210
+ proxy:pgsql:/etc/postfix/pgsql/domain_alias_catchall_maps.cf
211
+
212
+ sender_bcc_maps =
213
+ proxy:pgsql:/etc/postfix/pgsql/sender_bcc_maps_user.cf
214
+ proxy:pgsql:/etc/postfix/pgsql/sender_bcc_maps_domain.cf
215
+
216
+ recipient_bcc_maps =
217
+ proxy:pgsql:/etc/postfix/pgsql/recipient_bcc_maps_user.cf
218
+ proxy:pgsql:/etc/postfix/pgsql/recipient_bcc_maps_domain.cf
219
+
220
+ postscreen_greet_action = drop
221
+ postscreen_blacklist_action = drop
222
+ postscreen_dnsbl_action = drop
223
+ postscreen_dnsbl_threshold = 2
224
+
225
+ postscreen_dnsbl_sites =
226
+ zen.spamhaus.org=127.0.0.[2..11]*3
227
+ b.barracudacentral.org=127.0.0.2*2
228
+
229
+ postscreen_dnsbl_reply_map = texthash:/etc/postfix/postscreen_dnsbl_reply
230
+ postscreen_access_list = permit_mynetworks cidr:/etc/postfix/postscreen_access.cidr
231
+
232
+ postscreen_dnsbl_whitelist_threshold = -2
233
+
234
+ smtpd_sasl_type = dovecot
235
+ smtpd_sasl_path = private/dovecot-auth
236
+ virtual_transport = dovecot
237
+ dovecot_destination_recipient_limit = 1
238
+
239
+ mlmmj_destination_recipient_limit = 1
240
+ ```
241
+
242
+
48
243
  どのような事が問題となっている可能性があるか、ご存じの方がいらっしゃいましたらご教授頂けると幸いです。

2

現時点で通常のメール送受信は問題なく出来ているという点と、/var/log/maillogよりの抜粋を追記致しました。

2019/04/03 16:22

投稿

kodiack
kodiack

スコア13

title CHANGED
File without changes
body CHANGED
@@ -36,4 +36,13 @@
36
36
  このような宛先不明のメッセージが返ってくるという問題と、 luser_relayが指定されているにも関わらず、
37
37
  メールが転送されないという2つの問題が発生しているように見えます。
38
38
 
39
+ また、この際 /var/log/maillogを確認してみると以下のようなログが出力されています。
40
+ (この例では test-test@gmail.comという確認用のGmailメールアカウントより
41
+ test@example.jpにテストメールが送信されています。)
42
+
43
+ > Apr 3 11:25:15 server postfix/smtpd[4768]: connect from mail-lf1-f46.google.com[209.85.167.46]
44
+ > Apr 3 11:25:16 server postfix/smtpd[4768]: Anonymous TLS connection established from mail-lf1-f46.google.com[209.85.167.46]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
45
+ > Apr 3 11:25:17 server postfix/smtpd[4768]: NOQUEUE: reject: RCPT from mail-lf1-f46.google.com[209.85.167.46]: 550 5.1.1 <test@example.jp>: Recipient address rejected: User unknown in virtual mailbox table; from=<test-test@gmail.com> to=<test@example.jp> proto=ESMTP helo=<mail-lf1-f46.google.com>
46
+ > Apr 3 11:25:18 server postfix/smtpd[4768]: disconnect from mail-lf1-f46.google.com[209.85.167.46] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 quit=1 commands=5/7
47
+
39
48
  どのような事が問題となっている可能性があるか、ご存じの方がいらっしゃいましたらご教授頂けると幸いです。

1

2019/04/03 02:32

投稿

kodiack
kodiack

スコア13

title CHANGED
File without changes
body CHANGED
@@ -6,7 +6,7 @@
6
6
  ここに質問の内容を詳しく書いてください:
7
7
 
8
8
  現在Postfixにて1つのドメイン(@example.jp)を利用し以下の3つのメールアドレスを
9
- 用いて運用しているとします。
9
+ 用いて運用しているとします。現在以下の3つのメールアドレスでは正常に通常のメールは送受信出来ております。
10
10
 
11
11
  abc@example.jp
12
12
  123@example.jp