Jay Lee wrote:
Jimmy Ott wrote:
hello to everyone,
i try to implement a simple autoresponder as many of you already did or
use. i have a global maildroprc which redirects spam to other folder and
local .mailfilter for user filters.
Courier has a wonderful little utility that will handle this for you
called mailbot. It takes care of checking to see if the message is bulk
or mailing list. According to the man page, mailbot won't respond if
the original message has any of the following headers:
Precedence: junk
Precedence: bulk
Precedence: list
List-ID:
if its MIME content type is "multipart/report" (this is the MIME content
type for delivery status notifications)
Which saves you the trouble. Mailbot also takes care of "remembering
via a small database who has already received an autoreply so you don't
keep sending out the same autoreply.
now i want to do the following, as an example a file called "aliases"
has email addresses of one user in it like follows:
You want to look at http://www.courier-mta.org/maildropfilter.html and
the lookup() function. It does what you are looking for, but maildrop
is a better solution to your problem. Here's what I have in my global
maildroprc:
#If there is a autoreply.txt file in the user's home directory, use it
`test -f autoreply.txt`
if ($RETURNCODE==0)
{
cc "| /usr/lib/courier/bin/mailbot -t autoreply.txt -d autoreply.db -D
7 -A 'Courier-Autoreply: 1'"
}
This will simply test to find out if there is an autoreply.txt file in
the user's home directory. If there is, it gets sent by mailbot as the
autoreply (but only once mailbot determines that none of the above
mentioned headers were in the original and that the user isn't listed in
the autoreply.db file as having received an autoreply in the past 7 days.)
thank you jay,
i just tried it out, and it works great!
jimmy