From 36e8ebbd75b21301ac472234e63b0bf294a56b25 Mon Sep 17 00:00:00 2001 From: Ranjiwei <32759763+r350178982@users.noreply.github.com> Date: Fri, 25 Apr 2025 18:11:39 +0800 Subject: [PATCH] Update sending_email.md (#512) * Update sending_email.md * Update sending_email.md --- manual/config/sending_email.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/manual/config/sending_email.md b/manual/config/sending_email.md index 1670fe6a..8b159ee8 100644 --- a/manual/config/sending_email.md +++ b/manual/config/sending_email.md @@ -65,6 +65,28 @@ interval = 30m ``` +## Add S/MIME signature to email + +If you want the email signed by S/MIME, please add the config in `seahub_settings.py` + + +```python +ENABLE_SMIME = True +SMIME_CERTS_DIR = /opt/seafile/seahub-data/smime-certs # including cert.pem and private_key.pem + +``` +The certificate can be generated by the openssl command, or you can apply to the certificate manufacturer, it is up to you. +For example, generate the certs using the following command: + +``` +mkdir -p /opt/seafile/seahub-data/smime-certs +cd /opt/seafile/seahub-data/smime-certs +openssl req -x509 -newkey rsa:4096 -keyout private_key.pem -outform PEM -out cert.pem -days 3650 -nodes +``` +!!! tip + Some email clients may not verify the email signed by certs generated by command line. So it's better to apply the certs from a manufacture + + ## Customize email messages The simplest way to customize the email messages is setting the `SITE_NAME` variable in `seahub_settings.py`. If it is not enough for your case, you can customize the email templates.