On 2008-02-26 at 23:27 +0530, raghu vamsee wrote:
> I am completely new to exim.
> I want to filter the mail based on their subject and then forward it to specific mail addresses.
> For this i have written a .forward filter file like this
> # Exim filter
>
> if
> $h_subject :matches " content "
> then
> deliver "t3@???";
> endif
The :matches is a Sieve comparator, which means that you're using Sieve
syntax. In fact, that all looks like Sieve.
Exim's filters support two different filtering languages and the comment
on the first line selects which language is used. This is a little
confusing, yes; Exim has its own filtering language, and then later
Sieve came along as an IETF-standardised filtering language (now
specified in RFCs 5228-5233,5235,3894) so Exim supports that too.
Exim should have come with some documentation; alongside "spec.txt" is
another file, "filter.txt", which describes the mail filtering supported
by Exim. If you change the first line of your file to:
# Sieve filter
then it should work.
> 2008-02-25 22:20:03 1JTgWX-0002lv-LO == t2@??? R=userforward defer (-1): /home/t2/.forward is not a regular file
> 2008-02-25 22:23:22 1JTgWX-0002lv-LO == t2@??? routing defer (-51): retry time not reached
> 2008-02-25 22:51:27 1JTh0v-0000zm-Ns == t2@??? R=userforward defer (-1): bad owner for /home/t2/.forward
>
> I am unable to understand defer error code like -1 and -51
That's why an explanation comes immediately after them. :^)
> Also what are the methods to debug such issues.
Running exim with various levels of debugging turned on.
exim -d+filter will turn on debugging and then ramp up the output even
further for filtering logic.
A common approach is to run exim on a non-standard port with debugging
turned on, so that you get output on the terminal and don't interfere
with normal mail-service. For instance:
exim -d+filter -oX 24 -bd
and then telnet to port 24 of the machine and type SMTP to send a mail
directly. If you're uncertain of how to do that:
http://lists.exim.org/lurker/message/20080126.023937.8a46d127.en.html
-Phil