I am trying to create a blackhole account in Postfix and did the following which seems to be the most commonly employed method of doing this in Postfix:
1) Created a user (I named the user blackhole
) with /dev/null
as the user's home directory.
useradd blackhole -d /dev/null
2) Made an entry in /etc/postfix/virtual
to direct all the emails sent to blackhole@<subdomain.myhostname.com>
to blackhole user's mailbox, which by default is /home/<user/Maildir/new
:
/^blackhole@subdomain.myhostname.com$/ blackhole
Then, updated postfix database and reloaded the service with the following commands:
postmap /etc/postfix/virtual
/etc/init.d/postfix reload
While this is working as expected, that is, emails sent to blackhole@<subdomain.myhostname.com>
vanishes without sending a bounce message to the sender, I see the following in the maillog which gives out the impression that this method is an easy, crude method to create a blackhole account and makes me wonder whether there is a correct and legal way to do this in Postfix.
Jan 17 09:21:20 plmercury01 postfix/local[17760]: DBC8F16197F: to=<blackhole@plmercury01.myhostname.com>, orig_to=<blackhole@plmercury01.myhostname.com>, relay=local, delay=0.19, delays=0.09/0/0/0.1, dsn=5.2.0, status=bounced (maildir delivery failed: create maildir file /dev/null/Maildir/tmp/1484666479.P17760.plmercury01.myhostname.com: Not a directory)
My question:
1) Is this the legal way to create a blackhole account in Postfix and not a short-cut?
2) Can I ignore what I see the in the maillogs complaining about /dev/null
?