[Exim] transport_filter problem

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Brad Lay
Dátum:  
Címzett: exim-users
Tárgy: [Exim] transport_filter problem
Hey guys, I'm new to this list, I had a quick look over the archives but
couldn't really find any solution to my problem.

From what I can tell this is the thread that really relates closely to
what I wanna do;

http://www.exim.org/mailman/htdig/exim-users/Week-of-Mon-20030113/048361.html

Which this email hitting the nail on the head for what I wanna achieve;

http://www.exim.org/mailman/htdig/exim-users/Week-of-Mon-20030113/048446.html

I have this command working perfectly currently;

transport_filter = /usr/bin/spamc -u "${lookup mysql{select unix_user from domain left join domain_alias on domain_alias.domain_name = domain.domain_name where domain.domain_name = '${quote_mysql:$domain}' or domain_alias.alias = '${quote_mysql:$domain}'}{$value}fail}"

(That'll wrap really badly :)

Basically it pulls the unix_user outta mysql and applys spam preferences
for the domain on a global sense. Herein lies my problem.

When 2 domains on the system get an email: eg: info@??? and
sales@??? that line returns with a fail. This only happens
rarely so I would basically like that if my transport_filter fails, it
just skips spanning the mail for spam (because almost 9 times outta 10 its
not spam anyway), and contines on.

Error from exim

== brad@??? T=spamcheck defer (-1): Expansion of "${lookup
mysql{select unix_user from domain left join domain_alias on
domain_alias.domain_name = domain.domain_name where domain.domain_name =
'${quote_mysql:$domain}' or domain_alias.alias =
'${quote_mysql:$domain}'}{$value}fail}" from command "/usr/bin/spamc -u
"${lookup mysql{select unix_user from domain left join domain_alias on
domain_alias.domain_name = domain.domain_name where domain.domain_name =
'${quote_mysql:$domain}' or domain_alias.alias =
'${quote_mysql:$domain}'}{$value}fail}"" in transport filter failed:
"lookup" failed and "fail" requested: MYSQL: no data found

If there is a way I could improve it to query both domains preferences for
both domains that would be even better! But I suspect that I wont have any
luck.

Thanks in advance.

Regards,

Brad Lay (brad@???)

P) (07) 55 311177
W) http://coombabah.net/