[exim] Re: Complex forwarding issue

Pàgina inicial
Delete this message
Reply to this message
Autor: kmb
Data:  
A: exim-users
Assumpte: [exim] Re: Complex forwarding issue

Tony,

Thankyou for sending me in the right direction. The following is
what I ended up with and it does seem to work.

Tony Finch Wrote:
> On Thu, 24 Feb 2005, kmb wrote:
> >
> > 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:
>
> Rather than using filters, it might be easier to use an autoreply
> transport. For example:
>
> # BlackBerry Router over sized message:
> blackberry_notify:
> driver = accept
> condition = ${if >{$message_size}{1000000} {yes} {no} }
> unseen
> no_verify
> transport = blackberry_notify
>
> # BlackBerry Transport over sized message:
> blackberry_notify:
> driver = autoreply
> from = postmaster@$qualify_domain
> to = $local_part@$domain
> subject = Oversized message
> # etc.
>
> Tony.
> --
>


MY two Routers the first for under 1M and the second for over 1M


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

blackberry_aliases:
driver = redirect
allow_fail
allow_defer
condition = ${if <{$message_size}{1M}{yes}{no}}
data = ${lookup{$local_part}lsearch{/etc/blackberry.aliases}}
user = exim
unseen
no_verify
file_transport = address_file
pipe_transport = address_pipe

blackberry_notify:
driver = redirect
allow_fail
allow_defer
condition = ${if <{$message_size}{1M}{no}{yes}}
data = ${lookup{$local_part}lsearch{/etc/blackberry.aliases}}
user = exim
unseen
no_verify
redirect_router = blackberry_oversize

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


The next Router (blackberry_oversize ) as seen above is called as a
redirect_router. And is positioned below ( after ) the localuser
router.


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

blackberry_oversize:
driver = accept
no_verify
user=exim
transport = blackberry_notify

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


The last piece of the puzzle is the blackberry_notify transport:


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

blackberry_notify:
driver = autoreply
from = <$sender_address>
subject = ${if def:h_Subject: {${quote:${escape:${length_50:$h_Subject:}}} (OVERSIZED)} }
text = "\
The message sent by $h_from was too large to deliver to your\n\
blackberry ( size = $message_size )\n\n\
"
to = "$local_part@$domain"

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



Again Tony, Thanks for nudging me in the right direction. If anyone
sees where This could be improved or where it could go badly please let
me know ...

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