The preview providers that should be explicitly enabled.
'';
};
mail_domain=lib.mkOption{
type=lib.types.nullOrlib.types.str;
default=null;
description=''
The return address that you want to appear on emails sent by the Nextcloud server, for example `nc-admin@example.com`, substituting your own domain, of course.
'';
};
mail_from_address=lib.mkOption{
type=lib.types.nullOrlib.types.str;
default=null;
description=''
FROM address that overrides the built-in `sharing-noreply` and `lostpassword-noreply` FROM addresses.
Defaults to different FROM addresses depending on the feature.
"null"# Yes, this is really a string null and not null.
];
default="smtp";
description=''
Which mode to use for sending mail.
If you are using local or remote SMTP, set this to `smtp`.
For the `sendmail` option, you need an installed and working email system on the server, with your local `sendmail` installation.
For `qmail`, the binary is /var/qmail/bin/sendmail, and it must be installed on your Unix system.
Use the string null to send no mails (disable mail delivery). This can be useful if mails should be sent via APIs and rendering messages is not necessary.
'';
};
mail_smtphost=lib.mkOption{
type=lib.types.str;
default="127.0.0.1";
description=''
This depends on `mail_smtpmode`. Specify the IP address of your mail server host. This may contain multiple hosts separated by a semicolon. If you need to specify the port number, append it to the IP address separated by a colon, like this: `127.0.0.1:24`.
'';
};
mail_smtpport=lib.mkOption{
type=lib.types.port;
default=25;
description=''
This depends on `mail_smtpmode`. Specify the port for sending mail.
'';
};
mail_smtptimeout=lib.mkOption{
type=lib.types.int;
default=10;
description=''
This depends on `mail_smtpmode`. This sets the SMTP server timeout, in seconds. You may need to increase this if you are running an anti-malware or spam scanner.
'';
};
mail_smtpsecure=lib.mkOption{
type=lib.types.enum[
""
"ssl"
];
default="";
description=''
This depends on `mail_smtpmode`. Specify `ssl` when you are using SSL/TLS. Any other value will be ignored.
If the server advertises STARTTLS capabilities, they might be used, but they cannot be enforced by this config option.
'';
};
mail_smtpauth=lib.mkOption{
type=lib.types.bool;
default=false;
description=''
This depends on `mail_smtpmode`. Change this to `true` if your mail server requires authentication.
'';
};
mail_smtpname=lib.mkOption{
type=lib.types.str;
default="";
description=''
This depends on `mail_smtpauth`. Specify the username for authenticating to the SMTP server.
'';
};
# mail_smtppassword is skipped as it must be set through services.nextcloud.secrets
mail_template_class=lib.mkOption{
type=lib.types.str;
default="\\OC\\Mail\\EMailTemplate";
description=''
Replaces the default mail template layout. This can be utilized if the options to modify the mail texts with the theming app are not enough.
The class must extend `\OC\Mail\EMailTemplate`
'';
};
mail_send_plaintext_only=lib.mkOption{
type=lib.types.bool;
default=false;
description=''
Email will be sent by default with an HTML and a plain text body. This option allows sending only plain text emails.
'';
};
mail_smtpstreamoptions=lib.mkOption{
type=lib.types.listOflib.types.str;
default=[];
description=''
This depends on `mail_smtpmode`. Array of additional streams options that will be passed to underlying Swift mailer implementation.
'';
};
mail_sendmailmode=lib.mkOption{
type=lib.types.enum[
"smtp"
"pipe"
];
default="smtp";
description=''
For `smtp`, the sendmail binary is started with the parameter `-bs`: Use the SMTP protocol on standard input and output.
For `pipe`, the binary is started with the parameters `-t`: Read message from STDIN and extract recipients.
'';
};
};
};
default={};
@@ -1165,6 +1307,13 @@ in
If `services.nextcloud.config.adminpassFile` is null, `services.nextcloud.config.adminuser` must be null as well in order to disable initial admin user creation.
'';
}
{
assertion=!(cfg.settings?mail_smtppassword);
message=''
The option `services.nextcloud.settings.mail_smtppassword` must not be used, as it puts the password into the world-readable nix store.
Use `services.nextcloud.secrets.mail_smtppassword` instead and set it to a file containing the password.