FreeBSD Manual Pages
[4mGNARWL[24m(8) System Manager's Manual
[4mGNARWL[24m(8)
[1mNAME[0m
gnarwl - GNU Neat Autoreply With LDAP
[1mSYNOPSIS[0m
[1mgnarwl [22m[-h] [-c <cfgfile>] [-a <address>] [-s <ad-
dress>]
[1mDESCRIPTION[0m
[1mgnarwl [22mis an email autoresponder, intended to be a
successor to the old
vaction(1) program. Since a modern mailserver, usually
serves hundreds
(or even thousands) of mailaccounts, it is not sensible
to give (un-
trusted) users shell access so they may create/maintain
the .forward
file, required by [1mvacation(1).[0m
With [1mgnarwl [22m, all user-suplied data is stored
within an LDAP database,
so there are no per user ".forward" files (or even
homedirs) needed.
Configuration is conveniently done via one systemwide con-
figfile.
Like the old [1mvacation(1) [22mprogram, gnarwl accepts
incomming mail through
stdin, and will send outgoing mail via an external MTA (it
even main-
tains basic commandline compatibility, so it may be used
as a drop in
replacement).
Several gdbm databases are maintained, in order to make
sure, a) mail
does not bounce back and force between gnarwl and an-
other automated
MUA, b) mailing lists will not be bothered and c)
specifc local ad-
dresses may never produce automatic replies. All these
database files
may be managed using the [1mdamnit(8) [22mprogram.
[1mOPTIONS[0m
-c <cfgfile>
Use a different configfile than the one, compiled
in.
-a <alias>
Force <address> as receiving address.
-s <address>
Force <address> as sending address.
-h Print usage information.
[1mCONFIGURATION[0m
[1mgnarwl [22mtypically uses one global configura-
tionfile, but a per user
setup is also possible using the -c commandline switch.
The following
keywords are recognized in the configfile:
map_sender <macroname>
Binds a macroname (case insensitive), refering to
the sender of
an incomming email. Defaults to "$sender".
map_receiver <macroname>
Binds a macroname (case insensitive), refering
to the re-
ceiver(s) of an incomming email. Defaults to "$re-
ceiver".
map_subject <macroname>
Binds a macroname (case insensitive), refering to
the subject of
an incomming email. Defaults to "$subject".
map_field <ldapattribute> <macroname>
Binds a macroname (case insensitive), refering to a
field in the
resultset, returned by the database. There are no
defaults for
this directive.
server <address>
Address of the databaseserver to query. Defaults to
localhost.
port <portnumber>
Port, the LDAP server listens on. Defaults to 389.
scope <base|one|sub>
The scope used for searching the database. Default
is "sub".
login <string>
Destinguished name to bind with to the LDAP data-
base. Default is
to bind anonymously.
password <string>
Password to use for binding to the LDAP database.
If a password
is required to access the server, then the config-
file should be-
long to the gnarwl user and have file permission
0400.
base <destinguished name>
Entrypoint of the search. There is no default for
this direc-
tive, it must be supplied by the administrator.
protocol <0|2|3>
Select protocol to bind to the ldapserver. The
default is 0,
which means "autodetect".
queryfilter <ldap queryfilter>
Search pattern to match against the database.
Defaults to:
"(&(mail=$recepient)(vacationActive=TRUE)".
result <ldap attribute>
The name of the attribute, that is to be taken as
the emailbody.
The content of this field will be pasted in be-
tween the data
found via forceheader and forcefooter directives.
Afterwards all
remaining macros are expanded in the order of dec-
laration, and
the result will be piped through to the MTA.
blockfiles <directory>
The directory, where gnarwl stores it's block-
files. These files
are required to keep track on who was sent an au-
tomatic reply.
Default is: "/usr/local/var/lib/gnarwl/block/".
umask <mode>
What permission to give newly generated database
files. The de-
fault is 0600.
blockexpire <number>
How long (in hours) to block a certain sender/re-
cepient combo.
Default is 48 hours. Setting <number> to 0 dis-
ables the feature
(not recommended). No blockfiles are read/written
in this case.
maxreceivers <number>
Ignore incomming email, specifying too many receiv-
ing addresses.
It does not matter, whether these are local or
not, as [1mgnarwl[0m
doesn't know domains. Default is 256.
maxheader <number>
Ignore incomming email with more than this
number of header
lines. Lines are counted before unfolding them, so
a folded line
really counts as at least two lines. Default is
256.
badheaders <filename>
Path to a database file, containing matching pat-
terns for the
mailheader. If an entry stored in this file
matches a line in
the header exactly, then this mail will be ignored
by [1mgnarwl [22mis
deactivated by default.
blacklist <filename>
Pointer to a database file, containing emailad-
dresses, [1mgnarwl [22mis
not allowed to generate automatic replies for (use-
ful to prevent
automatic replies from addresses, which are
shared by several
people). This feature is deactivated by default.
forceheader <filename>
Path to a text file, containing a standardized
header, that is
to be pasted in front of every outgoing mail.
This file should
end with a single empty line. Otherwise it is as-
sumed, that the
users are allowed to continue the header and
will provide the
separating empty line themselves. Default is not
to force any-
thing (that is: The user has to supply the
header in the "re-
sult" attribute).
forcefooter <filename>
Path to a text file, containing a standardized
footer, that is
to be appended at the end of every generated mail.
Default is to
not to force anything.
mta <prog> [<args>]
Specify MTA for sending mail. It must be able to
accept mail on
STDIN. Default is "/usr/sbin/sendmail".
charset <encoding>
LDAP stores text in unicode, which is ok, as long
as outgoing
mail doesn't contain any non ASCII characters.
However, locale
specific characters (like german umlaute) end up
as strange
glyphs. With the "charset" directive, gnarwl
tries to convert
these to the correct symbols. The <encoding> argu-
ment must con-
tain a string recognized by iconv(3). Default is
not to try to
convert anything (assume US-ASCII charset / MIME
encoded mail).
recvheader <string>
A whitespace separated list of headers (case does
not matter),
which may contain receiving addresses. Defaults to:
"To Cc".
loglevel <0|1|2|3>
Specifies what to send to the syslog. A higher
loglevel automat-
ically includes all lower loglevels (see section
syslog for more
information).
[1mSYSLOG[0m
Since [1mgnarwl [22mis not meant to be invoked by anything
but the mailsystem,
it'll never print out messages to the systemconsole, but
logs them via
syslog(3), using the facility "mail". A log line is always
of the fol-
lowing format:
<level>/<origin> <message>
The <level> field indicates the severity of the message,
it corresponds
to the "loglevel" config directive. Possible values are:
CRIT (loglevel 0)
Critical messages. [1mgnarwl cannot continue and
will die with a[0m
[1mnon-zero exit [22mcode. This usually causes the
mailsystem to bounce
mail.
WARN (loglevel 1)
A warning. [1mgnarwl [22mcan will continue, but
not with the full/in-
tended functionality.
INFO (loglevel 2)
Status information. A message in the INFO
loglevel indicates
normal behaviour.
DEBUG (loglevel 3)
Debugging information. [1mgnarwl will log a lot of
information on[0m
[1mhow mail is processed.[0m
The <origin> field gives a short hint about what caused
the log entry
in question, while <message> contains a short description
of what actu-
ally happened.
[1mAUTHOR[0m
Patrick Ahlbrecht <p.ahlbrecht@billiton.de>
[1mSEE ALSO[0m
[1mvacation[22m(1), [1mpostfix[22m(1), [1miconv[22m(1),
[1mdamnit[22m(8), [1mrfc822[0m
[1mFILES[0m
[4m/usr/local/etc/gnarwl.cfg[0m
main configuration file.
[4m/usr/local/var/lib/gnarwl/.forward[0m
forward file for the mailsystem.
[4m/usr/local/var/lib/gnarwl/blacklist.db[0m
[1mgnarwl [22mwon't send an autoreply for anyone
whose emailaddress is
listed herin.
[4m/usr/local/var/lib/gnarwl/badheaders.db[0m
[1mgnarwl [22mwill ignore mail, it is able to
match a headerline with
an entry in this file. Case is significant, no
wildcards are ex-
panded.
[4m/usr/local/var/lib/gnarwl/header.txt[0m
Standard header to paste in front of every outgoing
mail.
[4m/usr/local/var/lib/gnarwl/footer.txt[0m
Standard footer to append to every outgoing mail.
[4m/usr/local/var/lib/gnarwl/block/*[0m
block files.
[4mG-
NARWL[24m(8)
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=gnarwl&sektion=8&manpath=FreeBSD+Ports+15.0>
