-
-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Hi, thanks for this project! We've moved away from port 465 in favor of port 587 for all outbound SMTP client traffic, and eliminated POP3 too.
I was looking for a way to specify this confirmation, for example:
IMAP_HOSTNAME: mail.server.com
IMAP_PORT: 993
IMAP_SOCKET: SSL
#POP_HOSTNAME: mail.server.com
SMTP_HOSTNAME: mail.server.com
SMTP_PORT: 587
SMTP_SOCKET: STARTTLS
But it does seem like the ports are statically configured in the templates. I also found that commenting out the POP_HOSTNAME will cause the server to fail to start. Perhaps that is a bad idea anyways, I'm not sure if email clients can still reliably parse the templates if POP info is missing.
I'm not a rust developer, but I'm guessing that extending the environment variable parsing and changing templates might not be too much of a challenge.
Starting somewhere around here for parsing:
mail-autodiscover-autoconfig/src/util.rs
Lines 35 to 45 in 2548f51
| let imap_hostname: String = env::var("IMAP_HOSTNAME").expect("IMAP_HOSTNAME must be set"); | |
| let pop_hostname: String = env::var("POP_HOSTNAME").expect("IMAP_HOSTNAME must be set"); | |
| let smtp_hostname: String = env::var("SMTP_HOSTNAME").expect("IMAP_HOSTNAME must be set"); | |
| Config { | |
| domain: domain, | |
| display_name: domain.to_owned() + " Mail", | |
| imap_hostname: imap_hostname, | |
| pop_hostname: pop_hostname, | |
| smtp_hostname: smtp_hostname, | |
| } |
And updating templates such as this:
| <hostname>{{ smtp_hostname }}</hostname> |
What do you think, is this a reasonable strategy or do you have any experience moving ports like this?