I think most of us have been in a position where we really shouldn’t continue communicating with someone or contact that person when drunk… You know what I mean, ex relationships etc (it happens.)
With Postfix you can block yourself from emailing that person again, which is quite useful.
In /etc/postfix/main.cf add make the start of your smtpd_recipient_restrictions look like below.
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/recipient_access,
Create a new file /etc/postfix/recipient_access and add the email address you wish to block, the word REJECT in capitals and optionally; a reason. Example below.
firstname.lastname@example.org REJECT Don't be silly... You're probably drunk.
For every address you wish to block yourself from emailing, simply add them on a new line.
You can see the email is blocked from being sent in /var/log/mail.log.
NOQUEUE: reject: RCPT from 184.108.40.206: 554 5.7.1 <email@example.com>: Recipient address rejected: Don't be silly... You're probably drunk.; from=<firstname.lastname@example.org> to=<email@example.com> proto=ESMTP helo=<[220.127.116.11]>
Each time you change the file, you need to generate a new hashed version and reload Postfix.
sudo postmap hash:/etc/postfix/recipient_access sudo /etc/init.d/postfix reload