Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

Maintaining email services

WebPlatform server Infrastructure architecture menu

See also

Every VM relies on a node to send email for them. The node who’s sole responsibility is to relay emails has “email” in its name, you can read more about that in the Infrastructure/architecture section about the “mail” VM role.

We are using two email servers (“MTA”):

Exim
On every VMs, except the mail node
Postfix
Only on the mail node

Postfix

@TODO

Useful commands

mailq
List messages in queue, bounces, frozen, deferred, etc along with an identifier
postqueue -p
same as mailq but specific to Postfix
postcat -q FOO
Display an email, use in conjunction with mailq to get “FOO” identifier
postfix check
Runs basic installation checks
postconf
List all currently loaded configurations from main.cf
postmap -q ‘root’ hash:/etc/postfix/virtual && echo OK || echo ‘No match found’
Test if an email alias (e.g. root@webplatform.org) works (e.g. `root@webplatform.org` to send to `team-webplatform-foo@w3.org`)

Purge messages according to a known pattern

Not something to do liberally, only to known email messages patterns that you know are obsolete.

A good time to use such command would be after a work session on a flapping service and all messages you see in the queue are byproduct of the issue you just fixed.

 postqueue -p | grep ubuntu@webplatform.org | awk '{print $1}' | tr -d '*' | while read mid ; do postsuper -d $mid ; done

Useful links

TODO: Read and evaluate

Exim

@TODO

mailq
List the mail queue
exim -Mvb FOO
Read email body of email with id FOO
exim -Mvh FOO
Read email header
exim -Mrm FOO
Delete email from queue
exim -q
Reprocess the queue
exim -qf
Reprocess the queue that has frozen messages

Purge messages according to a known pattern

Not something to do liberally, but can be handy.

 exiqgrep -i | xargs exim -Mrm

Useful links