nitnelave
10/11/2023, 7:00 PMazelphur
10/11/2023, 7:01 PMazelphur
10/11/2023, 7:04 PMnitnelave
10/11/2023, 7:09 PMazelphur
10/11/2023, 7:11 PMnitnelave
10/11/2023, 7:11 PMlldap send_test_email --to=my@email.com
azelphur
10/11/2023, 7:13 PM# ./lldap send_test_email --to=azelphur@azelphur.com
Loading configuration from lldap_config.toml
2023-10-11T19:12:35.200319567+00:00 ERROR 🚨 [error]: Could not send email: Connection error: Address not available (os error 99): Address not available (os error 99)
Interesting, giving us an error now 🙂azelphur
10/11/2023, 7:13 PM[smtp_options]
## Whether to enabled password reset via email, from LLDAP.
enable_password_reset=true
## The SMTP server.
server="smtp"
## The SMTP port.
port=25
## How the connection is encrypted, either "NONE" (no encryption), "TLS" or "STARTTLS".
smtp_encryption = "NONE"
## The SMTP user, usually your email address.
user="noreply@azelphur.com"
## The SMTP password.
password=""
## The header field, optional: how the sender appears in the email. The first
## is a free-form name, followed by an email between <>.
from="LLDAP Admin <noreply@azelphur.com>"
## Same for reply-to, optional.
reply_to="Azelphur <azelphur@azelphur.com>"
That's what I have set for my confignitnelave
10/11/2023, 7:14 PMazelphur
10/11/2023, 7:14 PMsmtp:
host: smtp
port: 25
sender: noreply@azelphur.com
disable_require_tls: true
azelphur
10/11/2023, 7:14 PMnitnelave
10/11/2023, 7:15 PMsmtp
?azelphur
10/11/2023, 7:15 PMnitnelave
10/11/2023, 7:16 PM--verbose
with the send_test_email
command?azelphur
10/11/2023, 7:16 PM# ./lldap send_test_email --verbose --to=azelphur@azelphur.com
Loading configuration from lldap_config.toml
Configuration: Configuration {
ldap_host: "0.0.0.0",
ldap_port: 3890,
http_host: "0.0.0.0",
http_port: 17170,
jwt_secret: ***SECRET***,
ldap_base_dn: "dc=azelphur,dc=com",
ldap_user_dn: UserId(
"admin",
),
ldap_user_email: "",
ldap_user_pass: ***SECRET***,
database_url: "sqlite://users.db?mode=rwc",
ignored_user_attributes: [],
ignored_group_attributes: [],
verbose: true,
key_file: "server_key",
key_seed: None,
smtp_options: MailOptions {
enable_password_reset: false,
from: None,
reply_to: None,
server: "localhost",
port: 587,
user: "",
password: ***SECRET***,
smtp_encryption: Tls,
tls_required: None,
},
ldaps_options: LdapsOptions {
enabled: false,
port: 6360,
cert_file: "cert.pem",
key_file: "key.pem",
},
http_url: Url {
scheme: "http",
cannot_be_a_base: false,
username: "",
password: None,
host: Some(
Domain(
"localhost",
),
),
port: None,
path: "/",
query: None,
fragment: None,
},
server_setup: None,
}
2023-10-11T19:16:21.372972899+00:00 DEBUG 🐛 [debug]: Sending email to 'azelphur@azelphur.com' as 'LLDAP <nobody@lldap>' via ''@'localhost':'587'
2023-10-11T19:16:21.373969462+00:00 ERROR 🚨 [error]: Could not send email: Connection error: Address not available (os error 99): Address not available (os error 99)
azelphur
10/11/2023, 7:17 PMnitnelave
10/11/2023, 7:17 PMsmtp_options
in the confignitnelave
10/11/2023, 7:17 PMserver: localhost
nitnelave
10/11/2023, 7:17 PMuser: ""
nitnelave
10/11/2023, 7:17 PMazelphur
10/11/2023, 7:17 PMnitnelave
10/11/2023, 7:17 PMnitnelave
10/11/2023, 7:18 PM--config_file=/data/lldap_config.toml
(I think that's the default for docker)azelphur
10/11/2023, 7:19 PMnitnelave
10/11/2023, 7:20 PMsend_test_email
command with verbose
and --config_file=/data/lldap_config.toml
?nitnelave
10/11/2023, 7:21 PMazelphur
10/11/2023, 7:21 PMbash-5.1# ./lldap send_test_email --config-file=/data/lldap_config.toml --verbose --to=azelphur@azelphur.com
Loading configuration from /data/lldap_config.toml
Configuration: Configuration {
ldap_host: "0.0.0.0",
ldap_port: 3890,
http_host: "0.0.0.0",
http_port: 17170,
jwt_secret: ***SECRET***,
ldap_base_dn: "dc=azelphur,dc=com",
ldap_user_dn: UserId(
"admin",
),
ldap_user_email: "",
ldap_user_pass: ***SECRET***,
database_url: "sqlite:///data/users.db?mode=rwc",
ignored_user_attributes: [],
ignored_group_attributes: [],
verbose: true,
key_file: "/data/private_key",
key_seed: None,
smtp_options: MailOptions {
enable_password_reset: true,
from: Some(
Mailbox {
name: Some(
"LLDAP Admin",
),
email: Address {
serialized: "noreply@azelphur.com",
at_start: 7,
},
},
),
reply_to: Some(
Mailbox {
name: Some(
"Azelphur",
),
email: Address {
serialized: "azelphur@azelphur.com",
at_start: 8,
},
},
),
server: "smtp",
port: 25,
user: "noreply@azelphur.com",
password: ***SECRET***,
smtp_encryption: None,
tls_required: None,
},
ldaps_options: LdapsOptions {
enabled: false,
port: 6360,
cert_file: "cert.pem",
key_file: "key.pem",
},
http_url: Url {
scheme: "https",
cannot_be_a_base: false,
username: "",
password: None,
host: Some(
Domain(
"lldap.home.azelphur.com",
),
),
port: None,
path: "/",
query: None,
fragment: None,
},
server_setup: None,
}
2023-10-11T19:20:34.816961269+00:00 DEBUG 🐛 [debug]: Sending email to 'azelphur@azelphur.com' as 'LLDAP Admin <noreply@azelphur.com>' via 'noreply@azelphur.com'@'smtp':'25'
2023-10-11T19:20:34.851319744+00:00 ERROR 🚨 [error]: Could not send email: internal client error: No compatible authentication mechanism was found: No compatible authentication mechanism was found
azelphur
10/11/2023, 7:21 PMazelphur
10/11/2023, 7:24 PMazelphur
10/11/2023, 7:26 PMazelphur
10/11/2023, 7:27 PMazelphur
10/11/2023, 7:36 PM./lldap send_test_email --to=azelphur@azelphur.com
doesn't work, because it doesn't load my config
./lldap send_test_email --config-file=/data/lldap_config.toml --to=azelphur@azelphur.com
does work, and sends an email
password reset doesn't work, and nothing is shown in the logsnitnelave
10/11/2023, 7:39 PMazelphur
10/11/2023, 7:40 PMLoading configuration from /data/lldap_config.toml
Configuration: Configuration {
ldap_host: "0.0.0.0",
ldap_port: 3890,
http_host: "0.0.0.0",
http_port: 17170,
jwt_secret: ***SECRET***,
ldap_base_dn: "dc=azelphur,dc=com",
ldap_user_dn: UserId(
"admin",
),
ldap_user_email: "",
ldap_user_pass: ***SECRET***,
database_url: "sqlite:///data/users.db?mode=rwc",
ignored_user_attributes: [],
ignored_group_attributes: [],
verbose: true,
key_file: "/data/private_key",
key_seed: None,
smtp_options: MailOptions {
enable_password_reset: true,
from: Some(
Mailbox {
name: Some(
"LLDAP Admin",
),
email: Address {
serialized: "noreply@azelphur.com",
at_start: 7,
},
},
),
reply_to: Some(
Mailbox {
name: Some(
"Azelphur",
),
email: Address {
serialized: "azelphur@azelphur.com",
at_start: 8,
},
},
),
server: "smtp",
port: 25,
user: "",
password: ***SECRET***,
smtp_encryption: None,
tls_required: Some(
false,
),
},
ldaps_options: LdapsOptions {
enabled: false,
port: 6360,
cert_file: "cert.pem",
key_file: "key.pem",
},
http_url: Url {
scheme: "https",
cannot_be_a_base: false,
username: "",
password: None,
host: Some(
Domain(
"lldap.home.azelphur.com",
),
),
port: None,
path: "/",
query: None,
fragment: None,
},
server_setup: None,
}
nitnelave
10/11/2023, 7:42 PMnitnelave
10/11/2023, 7:42 PMazelphur
10/11/2023, 7:44 PMnitnelave
10/11/2023, 7:45 PMnitnelave
10/11/2023, 7:45 PMazelphur
10/11/2023, 7:47 PMazelphur
10/11/2023, 7:47 PMnitnelave
10/11/2023, 7:48 PMazelphur
10/11/2023, 7:48 PMnitnelave
10/11/2023, 7:49 PMnitnelave
10/11/2023, 7:49 PMazelphur
10/11/2023, 7:49 PMazelphur
10/11/2023, 7:50 PMnitnelave
10/11/2023, 7:50 PMazelphur
10/11/2023, 7:51 PMazelphur
10/11/2023, 7:51 PMnitnelave
10/11/2023, 7:52 PMnitnelave
10/11/2023, 7:52 PMnitnelave
10/11/2023, 7:53 PMazelphur
10/11/2023, 7:53 PMazelphur
10/11/2023, 7:54 PMazelphur
10/11/2023, 7:55 PMnitnelave
10/11/2023, 7:55 PMazelphur
10/11/2023, 7:55 PMnitnelave
10/11/2023, 7:55 PMnitnelave
10/11/2023, 7:56 PMnitnelave
10/11/2023, 7:57 PMazelphur
10/11/2023, 7:57 PMazelphur
10/11/2023, 7:57 PMazelphur
10/11/2023, 7:58 PMnitnelave
10/11/2023, 7:58 PMazelphur
10/11/2023, 7:59 PMnitnelave
10/11/2023, 7:59 PMnitnelave
10/11/2023, 7:59 PMnitnelave
10/11/2023, 8:00 PMazelphur
10/11/2023, 8:00 PM