11.04.2013 Views

Guida avanzata di scripting Bash - Portale Posta DMI

Guida avanzata di scripting Bash - Portale Posta DMI

Guida avanzata di scripting Bash - Portale Posta DMI

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}<br />

Appen<strong>di</strong>ce A. Script aggiuntivi<br />

echo ’Advanced <strong>Bash</strong> Scripting Guide: is_spammer.bash, v2, 2004-msz’<br />

# How to use it?<br />

# (See also, "Quickstart" at end of script.)<br />

usage() {<br />

cat Script failure,<br />

2 -> Something is Blacklisted.<br />

Requires the external program ’<strong>di</strong>g’ from the ’bind-9’<br />

set of DNS programs. See: http://www.isc.org<br />

The domain name lookup depth limit defaults to 2 levels.<br />

Set the environment variable SPAMMER_LIMIT to change.<br />

SPAMMER_LIMIT=0 means ’unlimited’<br />

Limit may also be set on the command line.<br />

If arg#1 is an integer, the limit is set to that value<br />

and then the above argument rules are applied.<br />

Setting the environment variable ’SPAMMER_DATA’ to a filename<br />

will cause the script to write a GraphViz graphic file.<br />

For the development version;<br />

Setting the environment variable ’SPAMMER_TRACE’ to a filename<br />

will cause the execution engine to log a function call trace.<br />

_usage_statement_<br />

}<br />

# The default list of Blacklist servers:<br />

# Many choices, see: http://www.spews.org/lists.html<br />

700

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!