質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
CentOS

CentOSは、主にRed Hat Enterprise Linux(RHEL)をベースにした、フリーのソフトウェアオペレーティングシステムです。

SMTP

SMTP(Simple Mail Transfer Protocol)はIPネットワークでemailを伝送する為のプロトコルです。

Linux

Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

Postfix

Postfixは、電子メールサーバソフトウェアで、 メールを配送するシステムMTAの一種です。

Q&A

解決済

1回答

5397閲覧

受信メールの転送時にno signing table matchとなり迷惑メール扱いされる

tk_flavor

総合スコア104

CentOS

CentOSは、主にRed Hat Enterprise Linux(RHEL)をベースにした、フリーのソフトウェアオペレーティングシステムです。

SMTP

SMTP(Simple Mail Transfer Protocol)はIPネットワークでemailを伝送する為のプロトコルです。

Linux

Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

Postfix

Postfixは、電子メールサーバソフトウェアで、 メールを配送するシステムMTAの一種です。

0グッド

2クリップ

投稿2019/02/01 16:50

編集2019/02/06 15:03

現在、起こっている問題は下記となります。

送信専用のメールサーバのドメインが@mail.example.jpです
送信する際にsender_canonical_mapsで
Return-Pathをsupport@mail.example.jpのsupportアカウントに変えてメールを送っています。

このメールサーバからdocomo.ne.jp i.softbank.jp ezweb.ne.jp宛てのキャリア向けアドレスにメール送信を行います。
受信したキャリアメールを送信アドレスに返信します。
返信されたメールは元の送信専用メールサーバに到着し、/etc/aliasで指定されたアカウントメールを
OFFICE365側にあるexample.comの別ドメインに転送するようにしています。

この時、OFFICE365側にあるアカウント@example.com向けに転送されますが、迷惑フォルダに入ってくる事が問題になっています。
メールログを見ると、DKIM設定で、no signing table matchのログが確認出来ます。

ですが、gmail.com、yahoo.co.jp宛てに送信したメールから返信されたメールについては
aliasesでexample.comに転送され、受信ボックスに格納されてきます

gmail.com、yahoo.co.jpから返信したメールの転送時は受信ボックスに格納され、
携帯キャリアからの返信メールの転送時は迷惑ボックスに格納されるのかが不明となっています。

キャリアメールから受信メールに対して返信を行い、送信専用のメールサーバからtest@example.comに転送した時のログです

また、本サーバ構成を添付しますのでご参照ください

イメージ説明

■auキャリア宛メール送信⇒test@mail.example.jpに返信⇒test@example.comに転送

■mail.example.jp⇒auキャリア宛メール送信 Feb 5 13:29:59 mailserver01 postfix/cleanup[1264]: E2ED0C5270E: message-id=<20190205042959.E2ED0C5270E@mail.example.jp> Feb 5 13:29:59 mailserver01 opendkim[1089]: E2ED0C5270E: DKIM-Signature field added (s=20190117, d=mail.example.jp) Feb 5 13:30:00 mailserver01 postfix/qmgr[26631]: E2ED0C5270E: from=<support@mail.example.jp>, size=1391, nrcpt=1 (queue active) Feb 5 13:30:00 mailserver01 amavis[77266]: (77266-01) Passed CLEAN {RelayedOutbound}, MYNETS LOCAL [**.**.**.**]:51716 <support@mail.example.jp> -> <abc@ezweb.ne.jp>, Queue-ID: 329F0C5270C, mail_id: Q61yBWbSIT2Z, Hits: -0.86, size: 779, queued_as: E2ED0C5270E, 1721 ms Feb 5 13:30:00 mailserver01 postfix/smtp[1265]: 329F0C5270C: to=<abc@ezweb.ne.jp>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.8, delays=0.09/0.01/0.01/1.7, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as E2ED0C5270E) Feb 5 13:30:00 mailserver01 postfix/qmgr[26631]: 329F0C5270C: removed Feb 5 13:30:00 mailserver01 postfix/smtp[1276]: E2ED0C5270E: to=<abc@ezweb.ne.jp>, relay=lsean.ezweb.ne.jp[***.**.***.***]:25, delay=0.22, delays=0.09/0.01/0.09/0.04, dsn=2.0.0, status=sent (250 Ok: queued as 1C4AFCE)
■auキャリア宛メール⇒test@mail.example.jpに返信⇒test@example.comに転送 Feb 5 13:30:13 mailserver01 postfix/smtpd[20863]: connect from localhost[127.0.0.1] Feb 5 13:30:13 mailserver01 postfix/smtpd[20863]: BE826C5270E: client=localhost[127.0.0.1] Feb 5 13:30:13 mailserver01 postfix/cleanup[20854]: BE826C5270E: message-id=<2019proxy09.ezweb.ne.jp> Feb 5 13:30:13 mailserver01 opendkim[1058]: BE826C5270E: no signing table match for 'abc@ezweb.ne.jp' Feb 5 13:30:13 mailserver01 opendkim[1058]: BE826C5270E: no signature data Feb 5 13:30:13 mailserver01 postfix/qmgr[46328]: BE826C5270E: from=<support@mail.example.jp>, size=1332, nrcpt=1 (queue active) Feb 5 13:30:13 mailserver01 amavis[99888]: (99888-01) Passed CLEAN {RelayedOpenRelay}, [***.**.***.**]:3862 [**.***.**.**] <support@mail.example.jp> -> <test@example.com>, Queue-ID: 129C1C5270C, Message-ID: <2019proxy09.ezweb.ne.jp>, mail_id: wh1F6zkehPCM, Hits: 2.932, size: 791, queued_as: BE826C5270E, 1697 ms Feb 5 13:30:13 mailserver01 postfix/smtp[20856]: 129C1C5270C: to=<test@example.com>, orig_to=<test@mail.example.jp>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.8, delays=0.1/0.01/0.01/1.7, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as BE826C5270E) Feb 5 13:30:13 mailserver01 postfix/qmgr[46328]: 129C1C5270C: removed Feb 5 13:30:16 mailserver01 postfix/smtp[20865]: BE826C5270E: to=<test@example.com>, relay=example.com.mail.eo.outlook.com[***.**.**.**]:25, delay=2.6, delays=0.08/0.01/0.36/2.1, dsn=2.6.0, status=sent (250 2.6.0 <2019proxy09.ezweb.ne.jp> [InternalId=19683835119297, Hostname=TY***.prod.outlook.com] 8912 bytes in 0.304, 28.612 KB/sec Queued mail for delivery) Feb 5 13:30:16 mailserver01 postfix/qmgr[46328]: BE826C5270E: removed
  • 2/6 追記

gmail.comから返信されたメールをtest@example.comに宛ての受信ボックスに転送された時のヘッダ情報は下記となります

Authentication-Results: spf=pass (sender IP is **.**.**.**) smtp.mailfrom=mail.example.jp; example.jp; dkim=pass (signature was verified) header.d=gmail.com;example.jp; dmarc=pass action=none header.from=gmail.com;compauth=pass reason=100 Received-SPF: Pass (protection.outlook.com: domain of mail.example.jp designates **.**.**.** as permitted sender) receiver=protection.outlook.com; client-ip=**.**.**.**; helo=mail.example.jp; Received: from mail.example.jp (**.**.**.**) by OS2JPN01FT014.mail.protection.outlook.com (**.**.**.**) with Microsoft SMTP Server id 15.20.1580.10 via Frontend Transport; Mon, 4 Feb 2019 03:27:16 +0000 Received: by mail.example.jp (Postfix) id D680BC5270F; Mon, 4 Feb 2019 12:27:15 +0900 (JST) Delivered-To: test-sender@mail.example.jp Received: from localhost (localhost [127.0.0.1]) by mail.example.jp (Postfix) with ESMTP id BDC75C5270E for <test-sender@mail.example.jp>; Mon, 4 Feb 2019 12:27:15 +0900 (JST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.example.jp BDC75C5270E Authentication-Results-Original: mail.example.jp; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FQTsoxTx" X-Virus-Scanned: amavisd-new at mail.example.jp Authentication-Results-Original: mailserver01.example.jp (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mail.example.jp ([127.0.0.1]) by localhost (mailserver01.example.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0jv0lMK8BnWF for <test-sender@mail.example.jp>; Mon, 4 Feb 2019 12:27:15 +0900 (JST) Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [**.**.**.**]) by mail.example.jp (Postfix) with ESMTP id DA4ADC5270C for <test-sender@mail.example.jp>; Mon, 4 Feb 2019 12:27:14 +0900 (JST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.example.jp DA4ADC5270C Received: by mail-oi1-f174.google.com with SMTP id y23so10393548oia.4 for <test-sender@mail.example.jp>; Sun, 03 Feb 2019 19:27:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=4*****************************=; ****************************************************** 9g0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025;

auから返信されたメールをtest@example.comに宛ての迷惑ボックスに転送された時のヘッダ情報は下記となります

このメッセージはスパムと判定されました。29 日後に削除されます。 スパムではありません  ラベル: Junk Email (30 日) 有効期限: 2019/03/06 (水) 20:35 abc@ezweb.ne.jp 2019/02/04 (月) 20:35 Test Received: from HK****:.****.outlook.com (2******) by HK****:.****.outlook.com with HTTPS via **********.OUTLOOK.COM; Mon, 4 Feb 2019 11:35:07 +0000 Received: from ***********.outlook.com (****) by ********.outlook.com (*****) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1580.17; Mon, 4 Feb 2019 11:35:06 +0000 Received: from ***********.outlook.com (*********) by ********.office365.com (*****) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1580.17 via Frontend Transport; Mon, 4 Feb 2019 11:35:05 +0000 Authentication-Results: spf=pass (sender IP is ***.***.**.**) smtp.mailfrom=mail.example.jp; example.jp; dkim=none (message not signed) header.d=none;example.jp; dmarc=fail action=none header.from=ezweb.ne.jp;compauth=fail reason=001 Received-SPF: Pass (****.outlook.com: domain of mail.example.jp designates ***.**.**.** as permitted sender) receiver=****.outlook.com; client-ip=***.**.**.**; helo=mail.example.jp; Received: from mail.example.jp (***.**.**.**) by *****.outlook.com (***.**.**.**) with Microsoft SMTP Server id 15.20.1580.10 via Frontend Transport; Mon, 4 Feb 2019 11:35:05 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.example.jp (Postfix) with ESMTP id B2136C5270E for <test@example.com>; Mon, 4 Feb 2019 20:35:04 +0900 (JST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.example.jp B2136C5270E X-Virus-Scanned: amavisd-new at mail.example.jp Received: from mail.example.jp ([127.0.0.1]) by localhost (mailserver01.example.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8sonWnwK4MOR for <test@example.com>; Mon, 4 Feb 2019 20:35:04 +0900 (JST) Received: from ezweb.ne.jp (nx3oBP05-10.ezweb.ne.jp [***.***.**.***]) by mail.example.jp (Postfix) with ESMTP id 1E339C5270C for <test-sender@mail.example.jp>; Mon, 4 Feb 2019 20:35:04 +0900 (JST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.example.jp 1E339C5270C Received: from mm01proxy07 (localhost [127.0.0.1]) by au.com with ESMTP id x14BZ3cF031103 for <test-sender@mail.example.jp>; Mon, 4 Feb 2019 20:35:03 +0900 Date: Mon, 4 Feb 2019 20:35:03 +0900 From: <abc@ezweb.ne.jp> To: <test-sender@mail.example.jp> Message-ID: <20*******1proxy07.ezweb.ne.jp> Subject: Reply MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-Path: support@mail.example.jp

virtual_alias_maps = hash:/etc/postfix/virtualでの転送設定でも当該事象は解消されませんでした。

また、https://blog.jicoman.info/2014/09/postfix_aliases_envelope_from/
のように、

virtual_alias_maps = regexp:/etc/postfix/recipient_canonical.regexp /etc/postfix/sender_canonical.regexp

を設定をしましたが、
mail.example.jpのメールサーバからabc@ezweb.ne.jp宛てのキャリア向けに送信しようとすると、
このメールサーバ内でabcユーザのドメインをexample.comドメインに書き換えてしまい、
example.comにはabcユーザがいない事でbounceになってしまいます。


2/7 追記

opendkim.confにRemoveOldSignatures yes の設定を入れました。

# 20190206 ADD RemoveOldSignatures yes

RemoveOldSignatures設定を入れる事で私のau宛てのメールアドレスから返信してOFFICE365側に転送すると10通中8通は受信ボックスに格納されるようになりましたが、docomo.ne.jp i.softnbanl.jpからの返信はスパム扱いのままです

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

CHERRY

2019/02/04 21:59 編集

メールの配送に関係しているサーバーの関係図と各サーバーの設定を記載していただくことは可能でしょうか。(ドメインなどは、example.comexample.jp に置き換えてください。
tk_flavor

2019/02/05 17:03

改めて質問内で構成画像の添付をしました。 送信元メールサーバから携帯向けキャリア宛てに送信したメールに返信された メールを/etc/aliasesでOFFICE365側にある、社内利用メールサーバドメインexample.com に転送すると、example.comメールサーバで迷惑ボックスに格納されてきますが gmail.com yahoo.co.jpから返信されたメール転送時はexample.comの受信ボックスに格納されます なぜ、携帯キャリアからの返信は迷惑メール扱いになるのか不明です よろしければ、ご回答頂けますと幸いです
tk_flavor

2019/02/06 11:07

どうでしょうか お手数ですが、ご回答をいただけますと 助かります
tk_flavor

2019/02/06 22:29

回答は難しい感じでしょうか?
tk_flavor

2019/02/09 14:19

構成を記載しましたが、回答はないのでしょうか?
guest

回答1

0

ベストアンサー

DKIMの署名がされなくて迷惑メールと判定されているのであれば、下記を参考にヘッダーfromを書き換えればopendkimでDKIM署名をしてくれてdkim認証はpassするかもしれません。未検証で何か副作用もあるかも。
https://fsck.jp/?p=311

転送メールのdkimは諦めるかDMARCやarcに対応しそちらで判定する方がいいと思います。
メール業界では昔からある問題です。
dkimはそもそもメールデータの改竄を検知する仕組みです。
改竄して無理やり署名したメールを検証することは無意味です。
opendkimで特定のホストから届いたメールは検証をしない設定があったと思います。

aliasでなくvirtual_alias_mapsを使って宛先を書き換えた場合はどうなりますかね。書き換え後のドメインのメールサーバも同じホストで運用しているのであればそのままメールボックスに格納されないですかね。

投稿2019/02/01 20:41

編集2019/02/01 21:17
scsi

総合スコア2840

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

tk_flavor

2019/02/04 14:54

ご回答ありましたように、 virtual_alias_maps = hash:/etc/postfix/virtual の設定を入れてみましたが キャリアからの返信メールをofice365側のメールサーバへ転送すると迷惑メールに格納されてしまいました。 しかし、yahoo.co.jpやgmail.comから返信したメールは/etc/aliasesで ofice365側のメールサーバへ転送すると 普通に受信フォルダに格納されてきます キャリアからの返信で迷惑メールに格納されたヘッダを見てみると、 dkimやspf、dmarcがfailになってしまいます 何故、キャリアからの返信は正しく解釈されないのでしょうか ご教示頂けますと幸いです また、https://blog.jicoman.info/2014/09/postfix_aliases_envelope_from/ のように、 virtual_alias_maps = regexp:/etc/postfix/recipient_canonical.regexp /etc/postfix/sender_canonical.regexp を設定をしましたが、 mail.example.jpのメールサーバからaaa@docomo.ne.jp宛てのキャリア向けに送信しようとすると、 このメールサーバ内でaaaユーザのドメインをmail.example.jpドメインに書き換えてしまい、 mail.example.jpにはaaaユーザがいない事でbounceになってしまいます。 これは、受信用のアドレスをサーバ内で書き換えるものなるようです
scsi

2019/02/04 20:56

突然office365が出てきましたね。 構成の説明が不十分すぎるのとdkimを理解していないのでまずはdkimがどういうものか理解した方がいいですよ。 構成とやりたいことを図でも書いて頂ければ返答を検討します
tk_flavor

2019/02/05 17:04

度々すみません 質問内に構成画像を添付しました 内容本文も修正しています ご確認頂きご回答頂けますと幸いです
scsi

2019/02/05 18:43

virtual_alias_mapsはpostfixが動いているサーバでdovecotが動いていた場合に対応策になるかもと考えたものなのでoffice365が最終的な宛先な場合はテストするまでもありません。混乱を招くので質問から削除しちゃってください。 Office365に届いたキャリアからの転送メールのheaderのfromとauthentication-resultsとDKIM-Signatureを追加し、opendkimの設定もお願いします!
scsi

2019/02/05 19:02

また、opendkimに下記の設定をそれぞれ追加した場合、どうなるかも確認お願いします!設定値は調べてみてください。 RemoveOldSignatures ResignAll MultipleSignatures それぞれで変わらなければ複合してみてください
scsi

2019/02/05 19:20

改めてgmailからのメールのヘッダーを確認しましたが、aliasでの転送時にheader fromを書き換えて再署名していると考えてましたが、違うようですね。で、あれば上のテストはRemoveOldSignaturesだけで大丈夫です。 Office365のホワイトリストを使うのが正解かと思います。https://itnews.jp/?p=2060
scsi

2019/02/05 19:41

そもそもの質問のno signing table match になる原因ですが、ezweb.ne.jp が opendkim で署名するリストにないドメインだからです。 gmailからのメールで発生しないのは gmail側で署名されているメールだからだと思います。RemoveOldSignatures 設定をいれれば gmail からのメールでも発生するかも。
tk_flavor

2019/02/06 15:18 編集

■opendkim設定関連ファイル■ ●SigningTable *@mail.example.jp 20190117._domainkey.mail.example.jp ----------------------------------------------------------- ●KeyTable 20190117._domainkey.mail.example.jp mail.example.jp:20190117:/etc/opendkim/keys/mail_example/20190117.private ----------------------------------------------------------- ●/etc/opendkim/keys/mail_example/20190117.txt 20190117._domainkey IN TXT ( "v=DKIM1; k=rsa; " "p=*******************************" ) ; ----- DKIM key 20190117 for mail.example.jp ----------------------------------------------------------- ■opendkim.confに、RemoveOldSignaturesを入れた opendkim.conf設定です■ ●/etc/opendkim.conf ## BASIC OPENDKIM CONFIGURATION FILE ## See opendkim.conf(5) or /usr/share/doc/opendkim/opendkim.conf.sample for more ## BEFORE running OpenDKIM you must: ## - make your MTA (Postfix, Sendmail, etc.) aware of OpenDKIM ## - generate keys for your domain (if signing) ## - edit your DNS records to publish your public keys (if signing) ## See /usr/share/doc/opendkim/INSTALL for detailed instructions. ## DEPRECATED CONFIGURATION OPTIONS ## ## The following configuration options are no longer valid. They should be ## removed from your existing configuration file to prevent potential issues. ## Failure to do so may result in opendkim being unable to start. ## ## Removed in 2.10.0: ## AddAllSignatureResults ## ADSPAction ## ADSPNoSuchDomain ## BogusPolicy ## DisableADSP ## LDAPSoftStart ## LocalADSP ## NoDiscardableMailTo ## On-PolicyError ## SendADSPReports ## UnprotectedPolicy ## CONFIGURATION OPTIONS ## Specifies the path to the process ID file. PidFile /var/run/opendkim/opendkim.pid ## Selects operating modes. Valid modes are s (sign) and v (verify). Default is v. ## Must be changed to s (sign only) or sv (sign and verify) in order to sign outgoing ## messages. Mode sv ## Log activity to the system log. Syslog yes ## Log additional entries indicating successful signing or verification of messages. SyslogSuccess yes ## If logging is enabled, include detailed logging about why or why not a message was ## signed or verified. This causes an increase in the amount of log data generated ## for each message, so set this to No (or comment it out) if it gets too noisy. LogWhy yes ## Attempt to become the specified user before starting operations. UserID opendkim:opendkim ## Create a socket through which your MTA can communicate. Socket inet:8891@localhost ## Required to use local socket with MTAs that access the socket as a non- ## privileged user (e.g. Postfix) Umask 002 ## This specifies a text file in which to store DKIM transaction statistics. ## OpenDKIM must be manually compiled with --enable-stats to enable this feature. # Statistics /var/spool/opendkim/stats.dat ## Specifies whether or not the filter should generate report mail back ## to senders when verification fails and an address for such a purpose ## is provided. See opendkim.conf(5) for details. SendReports yes ## Specifies the sending address to be used on From: headers of outgoing ## failure reports. By default, the e-mail address of the user executing ## the filter is used (executing_user@hostname). # ReportAddress "Example.com Postmaster" <postmaster@example.com> ## Add a DKIM-Filter header field to messages passing through this filter ## to identify messages it has processed. SoftwareHeader yes ## SIGNING OPTIONS ## Selects the canonicalization method(s) to be used when signing messages. Canonicalization relaxed/relaxed ## Domain(s) whose mail should be signed by this filter. Mail from other domains will ## be verified rather than being signed. Uncomment and use your domain name. ## This parameter is not required if a SigningTable is in use. # Domain example.com ## Defines the name of the selector to be used when signing messages. Selector default ## Specifies the minimum number of key bits for acceptable keys and signatures. MinimumKeyBits 1024 ## Gives the location of a private key to be used for signing ALL messages. This ## directive is ignored if KeyTable is enabled. KeyFile /etc/opendkim/keys/default.private ## Gives the location of a file mapping key names to signing keys. In simple terms, ## this tells OpenDKIM where to find your keys. If present, overrides any KeyFile ## directive in the configuration file. Requires SigningTable be enabled. # KeyTable /etc/opendkim/KeyTable KeyTable refile:/etc/opendkim/KeyTable ## Defines a table used to select one or more signatures to apply to a message based ## on the address found in the From: header field. In simple terms, this tells ## OpenDKIM how to use your keys. Requires KeyTable be enabled. SigningTable refile:/etc/opendkim/SigningTable ## Identifies a set of "external" hosts that may send mail through the server as one ## of the signing domains without credentials as such. ExternalIgnoreList refile:/etc/opendkim/TrustedHosts ## Identifies a set "internal" hosts whose mail should be signed rather than verified. InternalHosts refile:/etc/opendkim/TrustedHosts # 20190206 ADD RemoveOldSignatures yes ## Contains a list of IP addresses, CIDR blocks, hostnames or domain names ## whose mail should be neither signed nor verified by this filter. See man ## page for file format. # PeerList X.X.X.X ## Always oversign From (sign using actual From and a null From to prevent ## malicious signatures header fields (From and/or others) between the signer ## and the verifier. From is oversigned by default in the Fedora package ## because it is often the identity key used by reputation systems and thus ## somewhat security sensitive. OversignHeaders From ## Instructs the DKIM library to maintain its own local cache of keys and ## policies retrieved from DNS, rather than relying on the nameserver for ## caching service. Useful if the nameserver being used by the filter is ## not local. # QueryCache yes
tk_flavor

2019/02/06 15:13 編集

RemoveOldSignatures設定を入れて Office365の受信ボックスに届いたauキャリアからの転送メールのheader情報です Received: from ***.prod.outlook.com (**********) by *******.prod.outlook.com with HTTPS via *********.PROD.OUTLOOK.COM; Tue, 5 Feb 2019 07:54:14 +0000 Received: from *********d.outlook.com (2603:1096:201:20::11) by HK0PR02MB3649.apcprd02.prod.outlook.com (**********) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id **.**.***.**; Tue, 5 Feb 2019 07:54:13 +0000 Received: from *****.protection.outlook.com (**********::207) by **********.outlook.office365.com (**********::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id ********** via Frontend Transport; Tue, 5 Feb 2019 07:54:13 +0000 Authentication-Results: spf=pass (sender IP is ***.***.**.**) smtp.mailfrom=mail.example.jp; example.jp; dkim=none (message not signed) header.d=none;example.jp; dmarc=fail action=none header.from=ezweb.ne.jp;compauth=fail reason=001 Received-SPF: Pass (*****.outlook.com: domain of example.jp designates ***.***.**.** as permitted sender) receiver=****.outlook.com; client-ip=***.***.**.**; helo=mail.example.jp; Received: from mail.example.jp (***.***.**.**) by *******.outlook.com (***.***.**.**) with Microsoft SMTP Server id 15.20.1580.10 via Frontend Transport; Tue, 5 Feb 2019 07:54:12 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.example.jp (Postfix) with ESMTP id 64120C5270E by (Postfix) with ESMTP id 64120C5270E for <test@example.com>; Tue, 5 Feb 2019 16:54:12 +0900 (JST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.example.jp 64120C5270E X-Virus-Scanned: amavisd-new at mail.example.jp Received: from mail.example.jp ([127.0.0.1]) by localhost (mailserver01.example.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Kjdu897bPMgY for <test@example.com>; Tue, 5 Feb 2019 16:54:11 +0900 (JST) Received: from ezweb.ne.jp (nx3obp05-02.ezweb.ne.jp [**.***.***.***]) by mail.example.jp (Postfix) with ESMTP id B38A9C5270C for <test@mail.example.jp>; Tue, 5 Feb 2019 16:54:11 +0900 (JST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.example.jp B38A9C5270C Received: from mm01proxy04 (localhost [127.0.0.1]) by au.com with ESMTP id x157sBco022533 for <test@mail.example.jp>; Tue, 5 Feb 2019 16:54:11 +0900 Date: Tue, 5 Feb 2019 16:54:11 +0900 From: <abc@ezweb.ne.jp> To: <test@mail.example.jp> Message-ID: <2019****:::@proxy04.ezweb.ne.jp> Subject: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-Path: support@mail.example.jp X-MS-Exchange-Organization-ExpirationStartTime: 05 Feb 2019 07:54:12.9487 (UTC) X-MS-Exchange-Organization-ExpirationStartTimeReason: OriginalSubmit X-MS-Exchange-Organization-ExpirationInterval: 2:00:00:00.0000000 X-MS-Exchange-Organization-ExpirationIntervalReason: OriginalSubmit X-MS-Exchange-Organization-Network-Message-Id: 9649fe7c-748a-453e-eff6-08d68b3f1e71 X-EOPAttributedMessage: 0 X-EOPTenantAttributedMessage: aa213902-1338-4634-8441-67bc16c0ede6:0 X-MS-Exchange-Organization-MessageDirectionality: Incoming X-Forefront-Antispam-Report:
tk_flavor

2019/02/06 15:10 編集

opendkim.confにRemoveOldSignatures yes の設定を入れました。 # 20190206 ADD RemoveOldSignatures yes RemoveOldSignatures設定を入れる事で私のau宛てのメールアドレスから返信してOFFICE365側に転送すると10通中8通は受信ボックスに格納されるようになりましたが、docomo.ne.jp i.softnbanl.jpからの返信はスパム扱いのままです gmail.comからの返信⇒OFFICE365側への転送はこれまで同様受信ボックスに格納されています
scsi

2019/02/07 00:32 編集

これがこの件の最後の回答になります。 RemoveOldSignatures yes は入れたままで転送するのがメールの流れ的にはいいかなと思います。Office365で迷惑メール判定されないためにはメールを転送するサーバをOffice365のホワイトリストに入れる他ありません。 https://itnews.jp/?p=2060 転送メールのDKIM署名はヘッダーのFromを改竄しなとできませんから"no signing table match" については出力されていて問題ありません。 気になるなら rsyslog の フィルター設定でmaillogに出力しないなど対応しましょう。
tk_flavor

2019/02/08 15:34

O365側に転送元のIPアドレスをホワイトリスト追加は行いました ですが、softbank、docomoからの返信メールはスパム扱いされてしまいます auは自身のアカウントは受信トレイには格納されます(他アカウントだとスパム扱いされるのかも) O365側の設定反映まで時間が掛かるのかもしれませんが。。 とりあえず、outlookメーラの迷惑メールオプションで @mail.example.jpドメインは信頼されたドメインとして追加して様子を見る事にしました
tk_flavor

2019/03/03 09:55

MSのO365側にホワイトリスト設定を入れて、2週間ほど経過してから docomo、softbankキャリアからの返信メール⇒O365側へ転送しても 受信メールとして扱われるようになりました 今回は、貴重なご回答ありがとうございました。
scsi

2019/03/03 10:13

解決したなら何よりです。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問