Книга: Linux Network Administrator Guide, Second Edition

Barring users from receiving mail

Barring users from receiving mail

If you have users or automated processes that send mail but will never need to receive it, it is sometimes useful to refuse to accept mail destined for them. This saves wasted disk-space storing mail that will never be read. The blacklist_recipients feature, when used in combination with the access_db feature, allows you to disable the receipt of mail for local users.

To enable the feature, you add the following lines to your sendmail.mc file, if they're not already there:

FEATURE(access_db)
FEATURE(blacklist_recipients)

To disable receipt of mail for a local user, simply add his details into the access database. Usually you would use the ### entry style that would return a meaningful error message to the sender so they know why the mail is not being delivered. This feature applies equally well to users in virtual mail domains, and you must include the virtual mail domain in the access database specification. Some sample /etc/mail/access entries might look like:

daemon          550 Daemon does not accept or read mail.
flacco          550 Mail for this user has been administratively disabled.
[email protected] 550 Mail disabled for this recipient.

Оглавление книги


Генерация: 1.263. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз