Re: [exim] mail account followed by random number

Top Page
Delete this message
Reply to this message
Author: Eric Fox
Date:  
To: Brent Clark
CC: exim
Subject: Re: [exim] mail account followed by random number
Your needs are very similar to a multidrop mail box, so assuming that
'bookings' is a real user, you can use a router as such:

  account_bookings:
    driver = accept
    local_parts = bookings
    local_part_suffix = -*
    local_part_suffix_optional
    transport = bookings_multidrop


and a transport:

  bookings_multidrop:
    driver = appendfile
    file = /var/bookings
    return_path_add
    delivery_date_add
    user = bookings
    group = mail



I've tested this -- it puts everything addressed to bookings@???
or bookings-*@??? (where the sufix (-*) is a random number or
anything else) into the mail file for user bookings.

  /\---/\  Eric J Fox
 /  o o  \ Small Business Computer Support
 \.\   /./ in the Phoenix Metropolitan Area
    \@/    http://www.bsdsystems.com/
.



Brent Clark wrote:

> Hi all
>
> I have a router like so:
> (got it from
> http://www.exim.org/exim-html-4.50/doc/html/spec_46.html#SECT46.7)
>
> account_bookings:
> driver = redirect
> check_local_user
> file = $home/.forward
> local_part_suffix = -*
> local_part_suffix_optional
> allow_filter
>
> and a .forward like:
>
> mail:/home/bookings# cat .forward
> if $local_part_suffix contains -special then
> save /home/$local_part/special
> endif
>
> I would like to receive emails for an email like:
>
> booking-54423423@???
>
> the number after the hyphen will be a random number.
>
> Some one suggested I try the random number first, but I cant seem to
> pull that off either
>
> If anyone has any tips advice etc, it would be most appreciated.
>
> Kind Regards
> Brent Clark
>