[exim] Re: Complex forwarding issue

Top Page
Delete this message
Reply to this message
Author: kmb
Date:  
To: exim-users
Subject: [exim] Re: Complex forwarding issue

kmb Wrote:
> List memebers,
>
> I have a client that has several users that use BlackBerry
> units to read their email. I have worked out the delivery of the mail
> to the BlackBerry users via a router that mirrors the system aliases,
> as most blackberry webclient accounts only allow for 10MB of storage, I
> have also placed a Condition Statement to test if the message is over
> 1MB. Here is my Router
> >

Code:
--------------------
> >
> blackberry_aliases:
> driver = redirect
> allow_fail
> allow_defer
> condition = ${if <{$message_size}{1000000}{1}{0}}}
> data = ${lookup{$local_part}lsearch{/etc/blackberry.aliases}}
> headers_add = X-added-header: added by BlackBerry Forward\n
> user = exim
> unseen
> file_transport = address_file
> pipe_transport = address_pipe
>

--------------------
> >
>
> The headers_add is just for testing and will be removed.
>
> This works perfectly, But The client wants to be notified that a
> message did not get sent to the BlackBerry due to the size limt, so
> they can look for the skiped message on the Corporate server. Seems
> resonable to me. At first I thought that I could just add to my
> exsisting Routers to test if it was oversized, so I added a new
> Router:
> >

Code:
--------------------
> >
> # BlackBerry Router over sized message:
> blackberry_notify:
> driver = redirect
> allow_fail
> allow_defer
> condition = ${if <{$message_size}{1000000}{0}{1}}}
> data = ${lookup{$local_part}lsearch{/etc/blackberry.aliases}}
> headers_add = X-BlackBerry-oversize: Too Large\n
> user = exim
> allow_filter
> unseen
> no_verify
> file_transport = address_file
> reply_transport = address_reply
>

--------------------
> >
>


I have changed the over sized router to the folloing to allow fro a
separate filter

Code:
--------------------

blackberry_notify:
driver = redirect
allow_fail
allow_defer
condition = ${if >{$message_size}{1M}{0}{1}}
data = ${lookup{$local_part}lsearch{/etc/blackberry.aliases}}
headers_add = X-BlackBerry-oversize: Message was too large to deliver to BlackBerry\n
user = exim
unseen
no_verify
redirect_router = blackberry_oversize

--------------------


and I have added the following redirect router below the local user
router


Code:
--------------------

blackberry_oversize:
driver = redirect
unseen
no_verify
user=exim
allow_filter
file = /etc/mail/exim-blackberry.filter

--------------------


The exim-blackberry.filter looks line this

Code:
--------------------

# Exim filter

if "${if def:header_X-BlackBerry-oversize: {there}}" is there
then
mail to $header_to
from $header_from
reply_to $header_reply-to
subject $header_subject
text "\
The message sent by $h_from was too large to deliver to your\n\
blackberry ( size = $message_size )\n\
"
endif
seen finish

--------------------


Now the issue seems to be when the process comes back from this filter
the debug output says transport: <none>

Below is the last output of the exim run as it considers the resolved
addess aquired by the alias look up in the "oversized" router the
domain is a remote mail server but I have XXXX ed out the domain. mail
can be sent to this address directly so it is not a "general" routing
issue.


Code:
--------------------

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Considering kbarrett@???
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

routing kbarrett@???
--------> blackberry_oversize router <--------
local_part=kbarrett domain=xxxxx.com
calling blackberry_oversize router
rda_interpret (file): /etc/mail/exim-blackberry.filter
expanded: /etc/mail/exim-blackberry.filter
changed uid/gid: blackberry_oversize router (recipient is kbarrett@???)
uid=509 gid=510 pid=8192
auxiliary group list: <none>
467 bytes read from /etc/mail/exim-blackberry.filter
data is an Exim filter program
Filter: start of processing
Filter: end of processing
rda_interpret: subprocess yield=0 error=NULL
routed by blackberry_oversize router (unseen)
envelope to: kbarrett@???
transport: none
junk@???
<-- junk@???
router = localuser, transport = local_delivery
search_tidyup called
>>>>>>>>>>>>>>>> Exim pid=8191 terminating with rc=0 >>>>>>>>>>>>>>>>


--------------------


Is it possible that the mail command in a filter file does not inject
the message back into exim and that it simply returns the message back
to where it came into the filter?

Thanks,

Kevin


--
kmb


------------------------------------------------------------------------
kmb's Profile: http://www.exim-users.org/forums/member.php?action=getinfo&userid=1
View this thread: http://www.exim-users.org/forums/showthread.php?threadid=48184