On 14/04/2010 14:28, Brent Clark wrote:
> Hiya
>
> Im trying trying to get the following to work.
>
> if $sender_host_name is localhost then
> noerror unseen save
> /usr/local/backups/mail/${substr_0_10:$tod_log}/${lc:$local_part}/outgoing/$message_exim_id
>
> else
> noerror unseen save
> /usr/local/backups/mail/${substr_0_10:$tod_log}/${lc:$local_part}/incoming/$message_exim_id
>
> endif
>
> I seem to be having a problem with ${lc:$local_part}
>
> The following is in my access log.
>
> /usr/local/backups/mail/2010-04-14//incoming/1O21SI-0007EO-QK
> <system-filter> T=address_file
>
> Would anyone know how I could get the string before @.
>
> Kind Regards
> Brent Clark
>
>
Hiya
Horrible hack, but I find this works.
if $sender_address matches "([a-z0-9-]+)@" then
noerror unseen save
/usr/local/backups/mail/${substr_0_10:$tod_log}/${lc:$1}/outgoing/$message_exim_id
endif
Brent