home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Previous Section Next Section

-x

Exclude a list of addresses vacation command-line switch

Some addresses should not receive replies from vacation. Your boss might be one such case, or perhaps some friends who don't need to know you're away. To exclude addresses, just create a file that contains the list of addresses, one address per line. For example:

boss@your.domain
friend@your.domain
another@another.domain

You execute vacation from the command line like this:

% /usr/ucb/vacation -x <  list  

The -x command-line switch causes vacation to read one address at a time from its standard input and add it to a list of addresses to exclude from replies.

To make things easier, if you specify a domain with an @ at the front, all addresses in that domain will also be excluded:

% echo @your.domain | /usr/ucb/vacation -x

Here, instead of using a file as before, a single domain is echoed through the vacation program. The -x command-line switch causes all addresses in the domain your.domain to be excluded from vacation replies.

Whenever you add addresses to the exclusion list, you can rerun vacation with -x and the new addresses will be added. Initializing the database with -i clears the list, so whenever you initialize, be sure to reload your list with -x. The two switches can be combined, perhaps in a Makefile, to make initializing easier:

vacation:
        /usr/ucb/vacation -i -x < $(HOME)/.vacation.exclude
    Previous Section Next Section