Re: [exim] Exim Relay and Dspam

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Phil Pennock
Dátum:  
Címzett: Brent Clark
CC: exim-users
Tárgy: Re: [exim] Exim Relay and Dspam
On 2008-01-08 at 15:11 +0200, Brent Clark wrote:
> Im trying to get my exim to act as a relay, but it almost appears as if the
> command is being ignore in the transport.


Logfiles to explain what you mean there would help; mail handling
policies are managed with Routers, the Transports are definitions for
the mechanism of actually delivering the mail, rather than deciding
whether to deliver the mail.

What happens when you send the mail through "exim -d" for debugging?
Perhaps "exim -d -bd -oX 26" and then sending mail to port 26 or, if
changing the client to do that is problematic, then
"exim -bh ip.add.re.ss" to run a fake SMTP session with Exim setting up
the variables as though you were connecting from that IP address.

Instead of -d, -d+route+expand might provide more detail about the
routing decisions made and the details of the results of the string
expansions used in your condition.

> dspam_router:
> debug_print = "R: dspam_router for $local_part@$domain"
> driver = redirect


redirect means it's supposed to provide a new address for the mail; do
you not mean "accept" ? Probably also using "no_verify" so that this
Router isn't used for testing recipient addresses during RCPT, so that
you still only accept an email address based upon other Routers.

This would explain why the transports aren't being run. I'm surprised
that this configuration isn't causing paniclog errors, in fact.

> allow_defer
> allow_fail
> domains = dsearch;/etc/exim4/virtual_directory
> data =
> ${expand:${lookup{$local_part}lsearch*@{/etc/exim4/virtual_directory/$domain}}}
>
>    # When to scan a message :
>    # - it isn't already flagged as spam from DSPAM
>    # - it isn't already scanned
>    condition = "${if and { \
>                 {!def:h_X-My-Dspam:} \
>                 {!eq {$received_protocol}{local}} \
>                 {!eq {$received_protocol}{despammed}} \
>                 { <= {$message_size}{3M}} \
>                 }\
>                 {1}{0}}"

>
>    headers_add  = "X-FILTER-DSPAM: by $primary_hostname on $tod_full"


Is that supposed to be X_FILTER_DSPAM to reference a macro giving the
value X-My-Dspam? If so, why not use it both places? Note then that
macros are made of letters, digits and underscores, starting with an
upper-case letter. The hyphens you have mean that you're not
referencing a macro.

>    file_transport = dspam_address_file
>    pipe_transport = dspam_address_pipe
>   redirect_router = smarthost_user


-Phil