News for hackers. Stuff that matters.

Ask HN: How to send dkim/spf compliant email from Debian?

I don't need to create a full blown email implementation.

I don't need to receive emails from anybody.

I just want to be able to to send emails from [email protected] for password resets, email address verifications, things like that.

And I would like to at least make an attempt to have the emails I send pass through a basic spam filter. So I assume at the very least I need to setup DKIM and SPF records.

Is it as simple as following https://wiki.debian.org/Postfix and https://wiki.debian.org/opendkim ?

(That is the route I am taking right now, will report back here what I find out in a few hours!)

( 6 comments | 5 points | on HN )
Re:Ask HN: How to send dkim/spf compliant email from Debian? by pbourke on Saturday August 28, 2021 @10:29AM (#28338361)
I’m a big fan of hosting stuff myself, but I will nope out of email at the first chance I get. I would just use AWS Simple Email Service, Mailgun, Sendgrid, etc.
Re:Ask HN: How to send dkim/spf compliant email from Debian? by hardwaresofton on Monday August 30, 2021 @12:31AM (#28352830)
Use https://maddy.email, it's fantastic and will spit out DKIM for you. The rest (DMARC, SPF) you'll have to set up yourself but it's mostly setting up DNS records.

Is there a reason why you're not choosing an email provider? there are very cheap ones out there. What you're trying to do is normally called "transactional" email normally and there are a lot of providers who specialize in that.

Re:Ask HN: How to send dkim/spf compliant email from Debian? by toast0 on Monday August 30, 2021 @01:58AM (#28353116)
SPF is relatively easy (as long as you've got a static IP). DKIM isn't terrible, but it is frustrating. IIRC, you need to setup a milter in postfix and give that a key that you also need to put into DNS. After that, test it a bunch.

Then be sure to set a DMARC DNS record that advises recipients to require DKIM. Downside is your mail will bounce when you mess up DKIM, upside is you'll get somewhat clear feedback.

Re:Ask HN: How to send dkim/spf compliant email from Debian? by high_byte on Sunday August 29, 2021 @03:17PM (#28349615)
you would need to setup dns records either way.

I used dkimpy, pretty simple: https://russell.ballestrini.net/quickstart-to-dkim-sign-emai...

Re:Ask HN: How to send dkim/spf compliant email from Debian? by johnnyApplePRNG on Saturday August 28, 2021 @08:01PM (#28342692)
Andddddddd I want to rip my fucking hair out by the root!

Going to try again tomorrow :S

Re:Ask HN: How to send dkim/spf compliant email from Debian? by monkeydata on Saturday August 28, 2021 @11:34AM (#28338850)
amavis

All email is perl.