Skip to content

Improve mail quality #87

@stoecker

Description

@stoecker

The email sent by certspotter is so low quality, that it's hard to get it through a spam filter.

Please add:

  • A configurable "From" (i.e. sender address).
  • Use this from in the SMTP hello message (-f option of sendmail)
  • Use the header line "Precendence: bulk" to indicate it's not human generated.
  • If possible add some short text like "This is an automated message of certspotter running on {machinename}. A new certificate for domain {domain} was detected in the list of {ctprovidername}. Following text describes the certificate:" ... or something similar to make it look like a real human would write this. Make the email also better readable.

Especially the sender from address and the "From:" mail header are important. They also enable to properly setup DKIM/DMARC.

First 3 points I fixed hardcoded in notify.go on my system:
fmt.Fprintf(stdin, "From: myname@mytld\n")
fmt.Fprintf(stdin, "To: %s\n", strings.Join(to, ", "))
fmt.Fprintf(stdin, "Subject: [certspotter] %s\n", notif.Summary())
fmt.Fprintf(stdin, "Date: %s\n", time.Now().Format(mailDateFormat))
fmt.Fprintf(stdin, "Message-ID: <%s>\n", generateMessageID())
fmt.Fprintf(stdin, "Mime-Version: 1.0\n")
fmt.Fprintf(stdin, "Content-Type: text/plain; charset=US-ASCII\n")
fmt.Fprintf(stdin, "X-Mailer: certspotter\n")
fmt.Fprintf(stdin, "Precedence: bulk\n")
fmt.Fprintf(stdin, "\n")
fmt.Fprint(stdin, notif.Text())

args := []string{"-i", "-f", "myname@mytld", "--"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    refinementAn improvement, but not a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions