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.
test@example.com 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 123.123.123.123: 554 5 …