I have an email server setup using Postfix, Dovecot and MySQL with virtual mailboxes using PostfixAdmin. This was created following a tutorial, because I am fairly new to email servers, and everything is working really well.
I wanted to make a no-reply email address for purposes like sending newsletter-esque emails that people can't reply to. I first tried this by creating a new mailbox with a quota of 0 MB, this did not seem to work because I could still receive emails in that mailbox. I could not find another way to do this via PostfixAdmin, so I searched the internet on how to do this. I came across some solutions that suggest routing all emails received at that address to /dev/null
. I tried this, and at first it did not seem to work correctly, so I reverted the changes I made. I later found out that this was because I didn't do it correctly (there was an alias set for the no-reply address to go to devnull, and then that should have been routed to /dev/null
, via a different file that I did not set properly. This resulted in the email becoming undeliverable and a failure bounce from the email server that ended up in my spam folder, which I did not notice at the time).
Later on, I figured this could maybe be useful, since I've seen before that I get such a reply when trying to reply to a no-reply email address. However, I would like to change certain parts of the default message, so I looked up if there was a way to change this. I came across multiple sources (e.g. the Postfix docs) saying roughly the same, that there should be a file /etc/postfix/bounce.cf.default
, which you can then copy and edit accordingly. The issue is, I don't have this file somehow. I did find a seemingly older version of the file here (older because the failure message differs from the one I got). I could copy this of course and use it as a template, but I find it strange that I don't have this file (at least not in the right location), and curious where it's actually located.
Another question I have, is what would be the best way to configure a no-reply email in Postfix/Dovecot? Because maybe this way of making all emails undeliverable and bounce is a bit hacky and too much hassle. Thanks in advance.