# Email on IEC
## Postfix
Mail pipeline looks like:
* `smtp` (port 25) and `submission` (port 587) smtpds run with `-o content_filter=spamassassin`
## ClamAV
At present, clamd needs ~ 1.3 GB of RAM, bursting to twice that during signature updates. This is causing it to regularly go out of memory each day:
```
Sep 15 17:02:47 iec kernel: Out of memory: Killed process 4085007 (clamd) total-vm:1854724kB, anon-rss:1579144kB, file-rss:0kB, shmem-rss:0kB, UID:115 pgtables:3264kB oom_score_adj:0
Sep 15 17:01:48 iec kernel: Out of memory: Killed process 4066157 (clamd) total-vm:1625844kB, anon-rss:1355248kB, file-rss:0kB, shmem-rss:0kB, UID:115 pgtables:2820kB oom_score_adj:0
Sep 14 17:01:09 iec kernel: Out of memory: Killed process 4042572 (clamd) total-vm:1866520kB, anon-rss:1589140kB, file-rss:0kB, shmem-rss:0kB, UID:115 pgtables:3288kB oom_score_adj:0
Sep 14 17:00:39 iec kernel: Out of memory: Killed process 4022424 (clamd) total-vm:1625928kB, anon-rss:1352028kB, file-rss:0kB, shmem-rss:0kB, UID:115 pgtables:2820kB oom_score_adj:0
Sep 13 17:28:16 iec kernel: Out of memory: Killed process 3996755 (clamd) total-vm:1863532kB, anon-rss:1589940kB, file-rss:0kB, shmem-rss:0kB, UID:115 pgtables:3272kB oom_score_adj:0
Sep 13 17:27:17 iec kernel: Out of memory: Killed process 3976000 (clamd) total-vm:1625928kB, anon-rss:1351752kB, file-rss:0kB, shmem-rss:0kB, UID:115 pgtables:2816kB oom_score_adj:0
```
Memory is likely to continue increasing as the signature database grows over time.
## DMARC
There are three aspects of [DMARC](https://en.wikipedia.org/wiki/DMARC) we might care about:
1. Checking DMARC policies on incoming email
2. Collecting statistics on incoming email to send out aggregate reports to sender domains
3. Receive aggregate reports from recipient domains
The OpenDKIM milter can handle (1) and (2). It requires a MySQL database to collect data for (2).
SpamAssassin can do (1) as well, so maybe that is enough.
For (3), this involves setting `rua=` in the `_dmarc` DNS record. We had experimented with Dmarcian before, but we likely aren't eligible for the free personal plan.
I've instead set up [Postmark's free DMARC summary service](https://dmarc.postmarkapp.com/) to send weekly reports to admin@.
## Other
I've set up to [Google's Postmaster Tools](https://postmaster.google.com) to get some visibility of email delivered to Gmail/Workspace accounts. We can share access to the data similar to [Search Console](https://search.google.com/search-console).