How to prevent users from receiving email
Giorgos Keramidas
keramida at ceid.upatras.gr
Sat Aug 19 23:48:35 UTC 2006
On 2006-08-19 19:21, Bill Moran <wmoran at collaborativefusion.com> wrote:
>
> Apparently my memory is useless and I've lost the ability to use
> google as well.
>
> I just added a user account to a mail server, but I don't want that
> user to receive mail on that server. It's running Postfix.
>
> I seem to remember a canonical method for preventing certain users
> from receiving email. But my memory has failed, and I can't seem
> to find anything on google.
>
> Is it an /etc/aliases trick?
You can use the Postfix `access' map for this. You can enable an
`access' map in Postfix by setting in your `main.cf' file:
smtpd_client_restrictions = \
check_client_access hash:/usr/local/etc/postfix/access
Then, in `/usr/local/etc/postfix/access' put:
user at domain REJECT
and run `postmap' on the `access' file:
# postmap /usr/local/etc/postfix/access
Reload Postfix and off you go :-)
There are other reject options too, which offer more fine-grained
control of the SMTP error codes and the text of the error messages
Postfix will return. See, for example:
http://www.postfix.org/access.5.html
More information about the freebsd-questions
mailing list