Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Best practices for sending emails (individually or in bulk mailing ) from your software.

Info

This guide is for writing software applications that need to send mail – if you need to send large amounts of mail as a normal staff member, check out the IST https://uwaterloo.atlassian.net/wiki/x/9QAs6gk article.

Table of Contents
stylenone

Sending from Applications

For the purposes of sending general purpose emails to users / students / external contacts, you should use bulkmail.uwaterloo.ca.

...

A simple SMTP connection with username / password is all that is required for this service.

Sending from Servers (cron / errors / etc)

This should be mostly for cron/automated server information. bulkmail should be used for application email sending, etc.

Postfix

Postfix for @uwaterloo.ca relay

/etc/postfix/main.cf

Code Block
# INTERNET OR INTRANET

relayhost = [sas-relay.private.uwaterloo.ca]

If you will be relaying to ONLY @uwaterloo.ca e-mail addresses, then you can leave it at that. If you wish to relay to external users as well, you will need to use authentication

Postfix for relaying to non @uwaterloo.ca as well

You will

/etc/postfix/main.cf

...

Code Block
languagebash
postmap relay_passwd

DragonFly Mail (dma)

DMA for @uwaterloo.ca relay

/etc/dma/dma.conf

Code Block
SMARTHOST mxer.uwaterloo.ca

DMA for relaying to non @uwaterloo.ca as well (needs to be validated)

Code Block
SMARTHOST mxer.uwaterloo.ca
AUTHPATH /etc/dma/auth.conf

...

Code Block
service-account|mxer.uwaterloo.ca:password

Exim

Needs to be filled in