Skip to content

Set Submission port 587 for smtp out? #15

@ZenDevMaster

Description

@ZenDevMaster

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:

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions