Archive for the ‘Serverの構築と運用覚書き’ Category
Monday, August 18th, 2025
AlmaLinux10のクリーンインストールから、このうえでのメールシステムの構築作業をつづけてきたが、GoogleAIStudio(Gemini)の助けをかりながらなんとか、最終的なかたちが整ったのでまとめとしての記録を残しておいた。
メールシステムの最終的な構成:
- OS: AlmaLinux 10
- MTA: Postfix
- MDA/IMAP: Dovecot
- 受信フロー: インターネット → Postfix (port 25) → Amavis → (SpamAssassin + ClamAV) → Postfix → Dovecot → メールボックス
- 送信フロー (クライアント): Thunderbird → Postfix (port 587, SMTP-Auth) → Gmail (Relay) → インターネット
- セキュリティ: Let’s Encryptワイルドカード証明書によるTLS暗号化、SpamAssassin, ClamAV, nftables
Thuderbird SMTPサーバの設定:
- サーバー名: mail.yamasnet.com
- ポート番号: 587
- 接続の保護: STARTTLS
- 認証方式: 通常のパスワード認証
- ユーザー名: username
(続きを読む)
Posted in Serverの構築と運用覚書き | No Comments »
Saturday, August 16th, 2025
私の運用しているサーバは数年前までは固定(静的)IPアドレスを取得していたが、コスト削減のため動的IPアドレス(Asahi-netと契約)で運用している。そのころから、このサーバ上で構築したメールシステムでは送信機能を持たせることが難しくなった。
少なくとも、受信専用のメールシステムを構築しようと、Gemini(Google AI Studio)の助けを借りて、作業を進めた結果、なんとか使いものになるものができたので、作業記録を残しておいた。
(続きを読む)
Posted in Serverの構築と運用覚書き | No Comments »
Thursday, August 14th, 2025
1週間ほど前、自宅サーバのOSをAlamaLinux10にアップグレードした。
困ったことに、このサーバ上でメールサーバがうまく構築しない。
Postfixなど関連サービスを導入し、対応する設定ファイルを旧システムからのバックアップしたものを使っているのだが、うまく動作しない。OSを新しくするたびに同じ作業を何度もしているのだが、今回のようなことは初めてだ。
ここらあたりで、作業を続けることを断念。以降、Mailは、gmail一本とすることにした。
単なる覚書。
Posted in Serverの構築と運用覚書き | No Comments »
Wednesday, August 13th, 2025
LetsEncrypt SSLの有効期限が2日後に迫ってきたので、いつもどおり更新作業をした。
以下、更新時のLog を転記:
[root@Server01 ~]# certbot certonly --manual
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Please enter the domain name(s) you would like on your certificate (comma and/or
space separated) (Enter 'c' to cancel): *.yamasnet.com
Renewing an existing certificate for *.yamasnet.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name:
_acme-challenge.yamasnet.com.
with the following value:
t7WukSNQiZLhdtNk368IJLkVzrwcFE_juhlZlo3clHE
Before continuing, verify the TXT record has been deployed. Depending on the DNS
provider, this may take some time, from a few seconds to multiple minutes. You can
check if it has finished deploying with aid of online tools, such as the Google
Admin Toolbox: https://toolbox.googleapps.com/apps/dig/#TXT/_acme-challenge.yamasnet.com.
Look for one or more bolded line(s) below the line ';ANSWER'. It should show the
value(s) you've just added.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/yamasnet.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/yamasnet.com/privkey.pem
This certificate expires on 2025-11-10.
These files will be updated when the certificate renews.
NEXT STEPS:
- This certificate will not be renewed automatically. Autorenewal of --manual certificates requires the use of an authentication hook script (--manual-auth-hook) but one was not provided. To renew this certificate, repeat this same certbot command before the certificate's expiry date.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
* Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
* Donating to EFF: https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[root@Server01 ~]# systemctl restart httpd
[root@Server01 ~]# certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
Certificate Name: yamasnet.com
Serial Number: 5d93eeebba884f79aa4000ceffc9e0e13a6
Key Type: ECDSA
Domains: *.yamasnet.com
Expiry Date: 2025-11-10 23:17:16+00:00 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/yamasnet.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/yamasnet.com/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
httpd を更新し、証明書を反映:
[root@Server01 ~]# systemctl restart httpd
更新後の証明書の確認:
[root@Server01 ~]# certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
Certificate Name: yamasnet.com
Serial Number: 5d93eeebba884f79aa4000ceffc9e0e13a6
Key Type: ECDSA
Domains: *.yamasnet.com
Expiry Date: 2025-11-10 23:17:16+00:00 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/yamasnet.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/yamasnet.com/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Posted in Serverの構築と運用覚書き | No Comments »
ひと月前、AlmaLinux9.6にUpgradeし、その際、MajorUpdate版のAlmaLinx10への更新を検討するとしていた。
多少逡巡していたが、ここらでOSを更新し、このうえで我が家のサーバYamasNet.comシステムを整理しなおすことにし、AlmaLinux10.0のクリーンインストール、そのうえでシステムの作り直し作業を進めることにした。
これまでに、YamasNet.com上で実現していた諸機能のうち、Mailserver機能以外の、その他すべての機能の移植を終了したので、ここまでの一連の作業記録を記録しておいた。
(続きを読む)
Posted in Serverの構築と運用覚書き | No Comments »