openmediavault の通知メールをさくらインターネットのレンサバ経由で送信する方法

この記事は公開されてから時間が経っています

openmediavault でファイルサーバーを構築したのですが、通知メールがなかなか送信されず困っていたのですが、やっと送信出来る様になりましたので、忘れないように書いておこう!

OpenMediaVault で、社内用にファイルサーバーを作成したのですが、RAID の設定とかディスクの寿命とかをメールで通知してくれるそうなのです
この通知メールを送信できなくて困っていたのですが、テストメールを送信できる様になったので、設定方法の備忘録をのこしておこう

postfix を使っているのですが、何回テストしてもメールが送信されてきません
その上、mail.log を確認すると、無限にメールを送信しては失敗している様子

なので、postfix を止めていたのですが、こんな感じで送信出来る様になりました

SMTP サーバーの指定に [] を付けないとイケないようです

root@File-Server2:/etc/postfix# cat main.cf
# This file is auto-generated by openmediavault (https://www.openmediavault.org)
# WARNING: Do not edit this file, your changes will get lost.
 
compatibility_level = 2
mydomain = local
mydestination =
inet_interfaces = localhost
relayhost = [xxxxxxxx.co.jp]:587
sender_canonical_maps = regexp:/etc/postfix/sender_canonical
sender_bcc_maps = hash:/etc/postfix/sender_bcc
recipient_canonical_maps = hash:/etc/postfix/recipient_canonical
recipient_bcc_maps = hash:/etc/postfix/recipient_bcc
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_mechanism_filter =
smtp_tls_security_level = encrypt
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_tls_CApath = /etc/ssl/certs
smtp_header_checks = regexp:/etc/postfix/smtp_header_checks
alias_maps = hash:/etc/aliases
transport_maps = hash:/etc/postfix/transport

[] を付けないと、relayhost にサーバ名がそのままついてしまいホスト名を見付けられずにエラーするようです

Received: by File-Server2.local (Postfix, from userid 0)
id 198F140xxxx; Tue, 7 Apr 2020 15:57:44 +0900 (JST)
To: st@xxxxxxxx.co.jp
Subject: [File-Server2.local] Test message from File-Server2.local
Date: Tue, 07 Apr 2020 15:57:44 +0900
From: alfresco@xxxxxxxx.co.jp
Message-Id: <20200407065744.198F140xxxx@File-Server2.local>
 
This is an automatically generated mail message from the system notification service running on File-Server2.local.

こんな感じのメールが届くようになりました

2件のコメント

  1. はじめまして、同様の案件で迷っていましたが解決しました。ありがとう御座います。
    私の場合はメール専用のレンタルサーバでしたが、やはり[]をつけると問題なく送信できました。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です


The reCAPTCHA verification period has expired. Please reload the page.