Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b6f2f83a79 | |||
| c1060efd4d | |||
| 06c63037f1 | |||
| 8b7a141caa |
@@ -2,6 +2,6 @@ apiVersion: v2
|
|||||||
name: phpfpm
|
name: phpfpm
|
||||||
description: Nginx + PHP-FPM Helm Chart with external DB and optional Selenium support
|
description: Nginx + PHP-FPM Helm Chart with external DB and optional Selenium support
|
||||||
type: application
|
type: application
|
||||||
version: 8.5.3
|
version: 8.5.3-d
|
||||||
appVersion: "8.5.3"
|
appVersion: "8.5.3"
|
||||||
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/PHP-logo.svg/330px-PHP-logo.svg.png
|
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/PHP-logo.svg/330px-PHP-logo.svg.png
|
||||||
|
|||||||
128
README.md
128
README.md
@@ -147,6 +147,21 @@ kubectl logs -l app.kubernetes.io/name=phpfpm -c nginx
|
|||||||
| `externalDatabase.username` | ユーザー名 | `user` |
|
| `externalDatabase.username` | ユーザー名 | `user` |
|
||||||
| `externalDatabase.password` | パスワード | `pass` |
|
| `externalDatabase.password` | パスワード | `pass` |
|
||||||
|
|
||||||
|
### SMTP設定
|
||||||
|
|
||||||
|
| パラメータ | 説明 | デフォルト |
|
||||||
|
|-----------|------|-----------|
|
||||||
|
| `smtp.enabled` | SMTP機能有効化 | `false` |
|
||||||
|
| `smtp.host` | SMTPサーバーホスト名 | `smtp.example.com` |
|
||||||
|
| `smtp.protocol` | プロトコル(auto/starttls/tls) | `auto` |
|
||||||
|
| `smtp.port` | ポート番号 | `587` |
|
||||||
|
| `smtp.auth.enabled` | 認証有効化 | `true` |
|
||||||
|
| `smtp.auth.username` | SMTPユーザー名 | `smtp-user@example.com` |
|
||||||
|
| `smtp.auth.password` | SMTPパスワード | `""` (Secretで指定) |
|
||||||
|
| `smtp.from` | 送信元メールアドレス(固定) | `noreply@example.com` |
|
||||||
|
| `smtp.tls.verify` | TLS証明書検証 | `true` |
|
||||||
|
| `smtp.tls.allowSelfSigned` | 自己署名証明書を許可 | `false` |
|
||||||
|
|
||||||
### Ingress設定
|
### Ingress設定
|
||||||
|
|
||||||
| パラメータ | 説明 | デフォルト |
|
| パラメータ | 説明 | デフォルト |
|
||||||
@@ -418,10 +433,8 @@ composer:
|
|||||||
additionalPhpExtensions:
|
additionalPhpExtensions:
|
||||||
- "gd"
|
- "gd"
|
||||||
- "exif"
|
- "exif"
|
||||||
additionalApkPackages:
|
# 注:GDが指定されている場合、依存パッケージ (libpng-dev, libjpeg-turbo-dev, freetype-dev)
|
||||||
- "libpng-dev"
|
# は自動的にインストールされます。手動指定は不要です。
|
||||||
- "libjpeg-turbo-dev"
|
|
||||||
- "freetype-dev"
|
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -438,6 +451,13 @@ ingress:
|
|||||||
- host: images.example.com
|
- host: images.example.com
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**特記事項**: GD拡張を `additionalPhpExtensions` に指定した場合、以下の依存パッケージが自動的にインストールされます:
|
||||||
|
- `libpng-dev` - PNG画像処理
|
||||||
|
- `libjpeg-turbo-dev` - JPEG画像処理
|
||||||
|
- `freetype-dev` - フォント処理
|
||||||
|
|
||||||
|
`additionalApkPackages` で明示的に指定する必要はありません。
|
||||||
|
|
||||||
### 例9: 本番環境構成(フル機能)
|
### 例9: 本番環境構成(フル機能)
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -544,6 +564,106 @@ helm install production-api cafepieters/phpfpm \
|
|||||||
--set externalDatabase.password=$(kubectl get secret db-password -o jsonpath='{.data.password}' | base64 -d)
|
--set externalDatabase.password=$(kubectl get secret db-password -o jsonpath='{.data.password}' | base64 -d)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 例10: SMTP設定によるメール送信
|
||||||
|
|
||||||
|
PHPアプリケーションからSMTP経由でメール送信を行う設定です。
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# values.yaml
|
||||||
|
smtp:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Gmail の場合
|
||||||
|
host: "smtp.gmail.com"
|
||||||
|
protocol: "starttls" # または "tls" (port 465)
|
||||||
|
port: 587
|
||||||
|
|
||||||
|
# Office365の場合は以下のようにコメント解除
|
||||||
|
# host: "smtp.office365.com"
|
||||||
|
# port: 587
|
||||||
|
# protocol: "starttls"
|
||||||
|
|
||||||
|
auth:
|
||||||
|
enabled: true
|
||||||
|
username: "your-email@gmail.com"
|
||||||
|
# password は以下の方法で指定:
|
||||||
|
# helm install ... --set smtp.auth.password='your-password'
|
||||||
|
password: ""
|
||||||
|
|
||||||
|
# 送信元アドレス(PHPで上書き可能)
|
||||||
|
from: "noreply@your-domain.com"
|
||||||
|
|
||||||
|
tls:
|
||||||
|
verify: true
|
||||||
|
allowSelfSigned: false
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
```
|
||||||
|
|
||||||
|
**PHPでの使用例**:
|
||||||
|
|
||||||
|
```php
|
||||||
|
<?php
|
||||||
|
// 設定を初期化
|
||||||
|
require_once '/etc/smtp-config/php-smtp-config.php';
|
||||||
|
SmtpConfig::init();
|
||||||
|
|
||||||
|
// デフォルトの送信元で送信
|
||||||
|
$to = 'user@example.com';
|
||||||
|
$subject = 'テストメール';
|
||||||
|
$body = 'このメールはSMTP経由で送信されています。';
|
||||||
|
|
||||||
|
if (mail($to, $subject, $body)) {
|
||||||
|
echo 'メール送信成功';
|
||||||
|
} else {
|
||||||
|
echo 'メール送信失敗';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 異なる送信元で上書き指定
|
||||||
|
$headers = [
|
||||||
|
'From: custom@your-domain.com',
|
||||||
|
'Return-Path: custom@your-domain.com',
|
||||||
|
];
|
||||||
|
SmtpConfig::mail($to, $subject, $body, $headers, 'custom@your-domain.com');
|
||||||
|
```
|
||||||
|
|
||||||
|
**デプロイ手順**:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Secretにパスワードを設定して展開
|
||||||
|
helm install my-app cafepieters/phpfpm \
|
||||||
|
-f values.yaml \
|
||||||
|
--set smtp.auth.password='your-secure-password'
|
||||||
|
|
||||||
|
# または、既存のSecretから取得
|
||||||
|
helm install my-app cafepieters/phpfpm \
|
||||||
|
-f values.yaml \
|
||||||
|
--set smtp.auth.password=$(kubectl get secret email-password -o jsonpath='{.data.password}' | base64 -d)
|
||||||
|
```
|
||||||
|
|
||||||
|
**設定詳細**:
|
||||||
|
|
||||||
|
- **protocol**:
|
||||||
|
- `auto`: 自動判定(推奨)
|
||||||
|
- `starttls`: SMTP + STARTTLS(ポート587)
|
||||||
|
- `tls`: SSL/TLS(ポート465)
|
||||||
|
|
||||||
|
- **from**: 固定の送信元アドレス
|
||||||
|
- PHPコードで `$fromAddress` パラメータを指定することで上書き可能
|
||||||
|
- `mail($to, $subject, $body, $headers, '-f custom@example.com')` で指定
|
||||||
|
|
||||||
|
- **認証**: PLAIN認証に対応(ほとんどのSMTPサーバーで利用可能)
|
||||||
|
|
||||||
|
**よくある設定**:
|
||||||
|
|
||||||
|
| プロバイダ | ホスト | ポート | プロトコル |
|
||||||
|
|-----------|-------|--------|----------|
|
||||||
|
| Gmail | smtp.gmail.com | 587 | starttls |
|
||||||
|
| Office365 | smtp.office365.com | 587 | starttls |
|
||||||
|
| Sendgrid | smtp.sendgrid.net | 587 | starttls |
|
||||||
|
| Amazon SES | email-smtp.region.amazonaws.com | 587 | starttls |
|
||||||
|
|
||||||
## アップグレード
|
## アップグレード
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
157
templates/configmap-smtp.yaml
Normal file
157
templates/configmap-smtp.yaml
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
{{- if .Values.smtp.enabled }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ include "phpfpm.fullname" . }}-smtp-config
|
||||||
|
labels:
|
||||||
|
{{- include "phpfpm.labels" . | nindent 4 }}
|
||||||
|
data:
|
||||||
|
msmtprc: |
|
||||||
|
# msmtp設定ファイル
|
||||||
|
# PHPのsendmail_pathから呼び出される
|
||||||
|
|
||||||
|
defaults
|
||||||
|
{{- if .Values.smtp.tls.verify }}
|
||||||
|
tls on
|
||||||
|
tls_trust_file /etc/ssl/certs/ca-certificates.crt
|
||||||
|
{{- else }}
|
||||||
|
tls off
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.smtp.tls.allowSelfSigned }}
|
||||||
|
tls_certcheck off
|
||||||
|
{{- else }}
|
||||||
|
tls_certcheck on
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq .Values.smtp.protocol "starttls" }}
|
||||||
|
# STARTTLS (SMTP + STARTTLS at port 587)
|
||||||
|
protocol smtp
|
||||||
|
{{- else if eq .Values.smtp.protocol "tls" }}
|
||||||
|
# SSL/TLS (SMTPS at port 465)
|
||||||
|
protocol smtps
|
||||||
|
{{- else }}
|
||||||
|
# Auto mode - protocol will be determined by port
|
||||||
|
{{- if eq (int .Values.smtp.port) 465 }}
|
||||||
|
protocol smtps
|
||||||
|
{{- else }}
|
||||||
|
protocol smtp
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
account default
|
||||||
|
host {{ .Values.smtp.host }}
|
||||||
|
port {{ .Values.smtp.port }}
|
||||||
|
{{- if eq .Values.smtp.protocol "starttls" }}
|
||||||
|
protocol smtp
|
||||||
|
{{- else if eq .Values.smtp.protocol "tls" }}
|
||||||
|
protocol smtps
|
||||||
|
{{- else if eq (int .Values.smtp.port) 465 }}
|
||||||
|
protocol smtps
|
||||||
|
{{- else }}
|
||||||
|
protocol smtp
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.smtp.auth.enabled }}
|
||||||
|
auth on
|
||||||
|
user {{ .Values.smtp.auth.username }}
|
||||||
|
passwordeval "cat /etc/smtp-secrets/password"
|
||||||
|
{{- else }}
|
||||||
|
auth off
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
from {{ .Values.smtp.from }}
|
||||||
|
{{- if .Values.smtp.tls.verify }}
|
||||||
|
tls on
|
||||||
|
tls_trust_file /etc/ssl/certs/ca-certificates.crt
|
||||||
|
{{- else }}
|
||||||
|
tls off
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.smtp.tls.allowSelfSigned }}
|
||||||
|
tls_certcheck off
|
||||||
|
{{- else }}
|
||||||
|
tls_certcheck on
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
# PHPスクリプトで利用する設定用PHPクラス
|
||||||
|
php-smtp-config.php: |
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPからSMTP設定を利用するためのヘルパークラス
|
||||||
|
* 使用例:
|
||||||
|
* SmtpConfig::init();
|
||||||
|
* mail($to, $subject, $body);
|
||||||
|
*
|
||||||
|
* // 別の送信者で上書きする場合:
|
||||||
|
* $headers = [
|
||||||
|
* 'From: custom@example.com',
|
||||||
|
* 'Return-Path: custom@example.com',
|
||||||
|
* ];
|
||||||
|
* mail($to, $subject, $body, implode("\r\n", $headers), '-f custom@example.com');
|
||||||
|
*/
|
||||||
|
class SmtpConfig {
|
||||||
|
private static $initialized = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SMTP設定を初期化
|
||||||
|
* PHP-FPMスタートアップ時に呼び出す
|
||||||
|
*/
|
||||||
|
public static function init() {
|
||||||
|
if (self::$initialized) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// PHPメール設定の確認
|
||||||
|
$sendmailPath = ini_get('sendmail_path');
|
||||||
|
if (!empty($sendmailPath)) {
|
||||||
|
error_log("SMTP configured via sendmail_path: " . $sendmailPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
self::$initialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指定した送信者でメール送信
|
||||||
|
*
|
||||||
|
* @param string $to 受信者アドレス
|
||||||
|
* @param string $subject メール件名
|
||||||
|
* @param string $body メール本文
|
||||||
|
* @param array $headers オプションのヘッダー
|
||||||
|
* @param string $fromAddress 送信元アドレス(オプション)
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function mail($to, $subject, $body, $headers = [], $fromAddress = null) {
|
||||||
|
$headerString = '';
|
||||||
|
if (!empty($headers)) {
|
||||||
|
if (is_array($headers)) {
|
||||||
|
$headerString = implode("\r\n", $headers);
|
||||||
|
} else {
|
||||||
|
$headerString = (string)$headers;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 送信元アドレスでmsmtpを呼び出す
|
||||||
|
$parameters = '';
|
||||||
|
if (!empty($fromAddress)) {
|
||||||
|
// メールヘッダーにFromを追加
|
||||||
|
if (!preg_match('/^From:/mi', $headerString)) {
|
||||||
|
$headerString .= (!empty($headerString) ? "\r\n" : '') . "From: " . $fromAddress;
|
||||||
|
}
|
||||||
|
// sendmail互換パラメータで送信者を指定
|
||||||
|
$parameters = '-f ' . escapeshellarg($fromAddress);
|
||||||
|
}
|
||||||
|
|
||||||
|
return mail($to, $subject, $body, $headerString, $parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHPのメール設定を取得
|
||||||
|
*/
|
||||||
|
public static function getConfig() {
|
||||||
|
return [
|
||||||
|
'sendmail_path' => ini_get('sendmail_path'),
|
||||||
|
'sendmail_from' => ini_get('sendmail_from'),
|
||||||
|
'SMTP' => ini_get('SMTP'),
|
||||||
|
'smtp_port' => ini_get('smtp_port'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{{- end }}
|
||||||
@@ -51,14 +51,30 @@ spec:
|
|||||||
# MySQL/MariaDB接続に必要なパッケージ
|
# MySQL/MariaDB接続に必要なパッケージ
|
||||||
APK_PACKAGES="$APK_PACKAGES mysql-client mysql-dev"
|
APK_PACKAGES="$APK_PACKAGES mysql-client mysql-dev"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.smtp.enabled }}
|
||||||
|
# SMTP送信に必要なパッケージ
|
||||||
|
APK_PACKAGES="$APK_PACKAGES msmtp ca-certificates"
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Values.composer.additionalApkPackages }}
|
{{- if .Values.composer.additionalApkPackages }}
|
||||||
# ユーザー指定の追加APKパッケージ
|
# ユーザー指定の追加APKパッケージ
|
||||||
{{- range .Values.composer.additionalApkPackages }}
|
{{- range .Values.composer.additionalApkPackages }}
|
||||||
APK_PACKAGES="$APK_PACKAGES {{ . }}"
|
APK_PACKAGES="$APK_PACKAGES {{ . }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
# GD拡張の依存パッケージを自動的に追加
|
||||||
|
{{- if .Values.composer.additionalPhpExtensions }}
|
||||||
|
for ext in {{ join " " .Values.composer.additionalPhpExtensions }}; do
|
||||||
|
if [ "$ext" = "gd" ]; then
|
||||||
|
echo "GD extension detected, adding required dependencies..."
|
||||||
|
APK_PACKAGES="$APK_PACKAGES libpng-dev libjpeg-turbo-dev freetype-dev"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
if [ -n "$APK_PACKAGES" ]; then
|
if [ -n "$APK_PACKAGES" ]; then
|
||||||
echo "Installing APK packages: $APK_PACKAGES"
|
echo "Installing APK packages: $APK_PACKAGES"
|
||||||
apk add --no-cache $APK_PACKAGES
|
apk add --no-cache $APK_PACKAGES
|
||||||
@@ -142,7 +158,30 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.smtp.enabled }}
|
||||||
|
# ========================================
|
||||||
|
# SMTP設定(msmtp)
|
||||||
|
# ========================================
|
||||||
|
echo "Configuring SMTP for mail sending..."
|
||||||
|
|
||||||
|
# msmtprc設定ファイルをコピー
|
||||||
|
cp /etc/smtp-config/msmtprc /etc/msmtprc
|
||||||
|
chmod 600 /etc/msmtprc
|
||||||
|
|
||||||
|
# PHP設定をphp.ini.d/に作成
|
||||||
|
cat > /usr/local/etc/php/conf.d/99-smtp.ini << 'PHP_SMTP_EOF'
|
||||||
|
; SMTP設定 - msmtp経由でメール送信
|
||||||
|
sendmail_path = "/usr/bin/msmtp -t"
|
||||||
|
sendmail_from = "{{ .Values.smtp.from }}"
|
||||||
|
PHP_SMTP_EOF
|
||||||
|
|
||||||
|
echo "SMTP configured:"
|
||||||
|
echo " Host: {{ .Values.smtp.host }}:{{ .Values.smtp.port }}"
|
||||||
|
echo " Protocol: {{ .Values.smtp.protocol }}"
|
||||||
|
echo " From: {{ .Values.smtp.from }}"
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
echo "Setup complete, starting PHP-FPM..."
|
echo "Setup complete, starting PHP-FPM..."
|
||||||
php-fpm
|
php-fpm
|
||||||
ports:
|
ports:
|
||||||
@@ -155,6 +194,16 @@ spec:
|
|||||||
- name: composer-config
|
- name: composer-config
|
||||||
mountPath: /tmp/composer-init
|
mountPath: /tmp/composer-init
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.smtp.enabled }}
|
||||||
|
- name: smtp-config
|
||||||
|
mountPath: /etc/smtp-config
|
||||||
|
readOnly: true
|
||||||
|
{{- if .Values.smtp.auth.enabled }}
|
||||||
|
- name: smtp-secrets
|
||||||
|
mountPath: /etc/smtp-secrets
|
||||||
|
readOnly: true
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
env:
|
env:
|
||||||
{{- if .Values.externalDatabase.enabled }}
|
{{- if .Values.externalDatabase.enabled }}
|
||||||
- name: DB_HOST
|
- name: DB_HOST
|
||||||
@@ -202,4 +251,21 @@ spec:
|
|||||||
- name: composer-config
|
- name: composer-config
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ include "phpfpm.fullname" . }}-composer-config
|
name: {{ include "phpfpm.fullname" . }}-composer-config
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.smtp.enabled }}
|
||||||
|
- name: smtp-config
|
||||||
|
configMap:
|
||||||
|
name: {{ include "phpfpm.fullname" . }}-smtp-config
|
||||||
|
items:
|
||||||
|
- key: msmtprc
|
||||||
|
path: msmtprc
|
||||||
|
{{- if .Values.smtp.auth.enabled }}
|
||||||
|
- name: smtp-secrets
|
||||||
|
secret:
|
||||||
|
secretName: {{ include "phpfpm.fullname" . }}-smtp
|
||||||
|
items:
|
||||||
|
- key: password
|
||||||
|
path: password
|
||||||
|
mode: 0600
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
13
templates/secret-smtp.yaml
Normal file
13
templates/secret-smtp.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{{- if .Values.smtp.enabled }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ include "phpfpm.fullname" . }}-smtp
|
||||||
|
labels:
|
||||||
|
{{- include "phpfpm.labels" . | nindent 4 }}
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
{{- if .Values.smtp.auth.enabled }}
|
||||||
|
password: {{ .Values.smtp.auth.password | b64enc }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
43
values.yaml
43
values.yaml
@@ -130,4 +130,47 @@ externalDatabase:
|
|||||||
username: user
|
username: user
|
||||||
password: pass
|
password: pass
|
||||||
|
|
||||||
|
# SMTP設定(PHPのメール送信用)
|
||||||
|
smtp:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# SMTPサーバー設定
|
||||||
|
host: "smtp.example.com"
|
||||||
|
|
||||||
|
# プロトコルとポート設定
|
||||||
|
# - auto: 自動判定(推奨)
|
||||||
|
# - starttls: STARTTLS(ポート587)
|
||||||
|
# - tls: SSL/TLS(ポート465)
|
||||||
|
protocol: "auto"
|
||||||
|
|
||||||
|
# ポート番号(通常は自動判定されるため手動設定は不要)
|
||||||
|
# protocol: auto の場合は以下の値を参考に
|
||||||
|
# - 25: SMTP (非暗号化)
|
||||||
|
# - 587: SMTP + STARTTLS (暗号化)
|
||||||
|
# - 465: SMTP + SSL/TLS (暗号化)
|
||||||
|
port: 587
|
||||||
|
|
||||||
|
# 認証設定
|
||||||
|
auth:
|
||||||
|
enabled: true
|
||||||
|
username: "smtp-user@example.com"
|
||||||
|
# password はSecretで管理する
|
||||||
|
# values-secret.yaml などで以下のように指定:
|
||||||
|
# smtp:
|
||||||
|
# auth:
|
||||||
|
# password: "your-smtp-password"
|
||||||
|
password: ""
|
||||||
|
|
||||||
|
# 送信元アドレス(固定値)
|
||||||
|
# PHPプログラムで mail() 関数の $additional_parameters で上書き可能
|
||||||
|
# 例: mail($to, $subject, $body, $headers, "-f user@example.com")
|
||||||
|
from: "noreply@example.com"
|
||||||
|
|
||||||
|
# TLS/SSL設定
|
||||||
|
tls:
|
||||||
|
# 証明書検証を有効化(本番環境では true を推奨)
|
||||||
|
verify: true
|
||||||
|
# 自己署名証明書を許可する場合(テスト環境のみ)
|
||||||
|
allowSelfSigned: false
|
||||||
|
|
||||||
resources: {}
|
resources: {}
|
||||||
Reference in New Issue
Block a user