Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
qmail-autoresponder(1)	    General Commands Manual	qmail-autoresponder(1)

NAME
       qmail-autoresponder - Produce automatic responses with qmail

SYNOPSIS
       qmail-autoresponder  [ -cLNqT ] [ -O NAME[=VALUE] ] [ -n	NUM ] [	-s STR
       ] [ -t TIME ] [ MESSAGE-FILE ] DIRECTORY

DESCRIPTION
       qmail-autoresponder sends an  automatically-generated  message  in  re-
       sponse to an incoming message.  By default, it limits the number	of re-
       sponses it sends	to a maximum of	one message per	hour per  sender.   It
       will  not respond to any	known mailing list, nor	will it	respond	to ei-
       ther bounces or loops.

       The MESSAGE-FILE	is used	as the response	message, and  must  contain  a
       complete	 mail  message	including  From: and Subject: headers.	If the
       MESSAGE-FILE argument is	not present, it	defaults to message.txt.   All
       occurrences  of	%S  in the message file	are replaced with the original
       message's subject.  To put a percent sign in the	message, write	it  as
       %%.

       qmail-autoresponder limits the rate at which it sends responses to each
       recipient to prevent mail flooding or denial-of-service	attacks.   For
       each  response  it  sends, it creates a file in DIRECTORY.  The name of
       that file consists of the process ID of qmail-autoresponder, a  period,
       the current UNIX	time number, and the envelope sender address (with any
       / characters replaced with : to prevent creation	of  files  outside  of
       DIRECTORY).  When it receives a message,	it scans DIRECTORY.  Any files
       that are	older than the time interval (see below) are deleted  and  ig-
       nored.	If  the	number of remaining files with the same	sender address
       is greater than or equal	to the maximum number of replies, no  response
       is generated.

       If  DIRECTORY  contains	a writeable file named log.txt,	then a line is
       added to	this file each time a sender  is  processed.   The  format  of
       these lines are as follows:
	      TIMESTAMP	+SENDER
	      TIMESTAMP	-SENDER
       The first line indicates	a message was sent to the sender, and the sec-
       ond that	a message was not sent.	 The timestamp is expressed  as	 stan-
       dard UNIX time (the number of seconds since Jan 1 1970 GMT).

OPTIONS
       qmail-autoresponder  supports options specified on the command line and
       as files	in the DIRECTORY named on the command line.  Option  files  in
       the directory override options set on the command line.

   COMMAND LINE
       -c     Equivalent to -O copymsg=1

       -L     Create  new  files  (instead of making links) for	each recipient
	      file.  This uses more inodes, but	may be required	 for  filesys-
	      tems (such as Coda) that don't handle links properly.

       -N     Write the	generated response to standard output instead of send-
	      ing it.

       -n NUM Equivalent to -O msglimit=NUM

       -O NAME[=VALUE]
	      Sets named option	NAME to	VALUE.	If VALUE is omitted,  a	 value
	      of 1 is used.  See below for all the named options.

       -q     Quiet.  Don't show error messages.

       -s STR Equivalent to -O subject_prefix=STR

       -T     Do not add a To: _SENDER_	line to	the response.

       -t TIME
	      Equivalent to -O timelimit=TIME

   NAMED OPTIONS
       bcc (string)
	      If  given,  all responses	are copied to this address in addition
	      to the original sender.

       copymsg (boolean)
	      Copy the original	message	into the response.

       headerkeep (string)
	      If this option is	given, only the	headers	listed	in  the	 value
	      are  copied from the message into	the response.  Separate	header
	      names with a colon.  If neither this nor headerstrip  are	 used,
	      all headers are copied.

       headerstrip (string)
	      If  this	option	is  given  and	headerkeep is not, the headers
	      listed in	the value are omitted when copying  from  the  message
	      into  the	response.  Separate header names with a	colon.	Header
	      names are	treated	as patterns, and so may	contain	* to match any
	      string.	For example, the pattern x-* will match	the headers X-
	      DomainKeys: and X-SpamLevel:.

       msglimit	(integer)
	      Set the maximum number of	replies	per timelimit (defaults	to 1).

       no_inreplyto (boolean)
	      Do not add an In-Reply-To: header	to the outgoing	message.  Nor-
	      mally, if	a Message-Id: header is	found in the original message,
	      qmail-autoresponder will add the contents	of that	header to  the
	      outgoing	message.  This allows some email programs to group re-
	      sponses more intelligently.

       numlines	(integer)
	      Limits the maximum number	of lines copied	from the original mes-
	      sage  body  into	the response.  This option is only relevant if
	      the copymsg option is also used.	If not given, all the lines in
	      the  original  message body are copied.  This limit does not im-
	      pact how many lines of the header	are copied.

       separator (string)
	      Add a separator line (or lines) between the response message and
	      the copied message.

       subject_prefix (string)
	      Add  a subject line to the response message composed of the pre-
	      fix STR followed by the original subject.	 This can also be  ac-
	      complished  by  putting  the  following line at the start	of the
	      message file:

	      Subject: STR %S

       timelimit (integer)
	      Set the interval during which responses are counted (in seconds)
	      (defaults	to 1 hour).

RETURN VALUE
       Exits zero if there were	no problems, otherwise exits 111.

ENVIRONMENT
       DTLINE qmail-autoresponder  searches for	this line (generated by	qmail-
	      local) in	the input and bounces the message  if  it  is  present
	      (which  indicates	 a  mail  loop).  It then adds the line	to the
	      output.

       SENDER This contains the	envelope sender	address	and is used as the ad-
	      dress to send the	reply to.

							qmail-autoresponder(1)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | RETURN VALUE | ENVIRONMENT

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=qmail-autoresponder&sektion=1&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help