[email protected] <[email protected]> (So 22 Nov 2015 
13:30:13 CET):
> Hi,
> 
>  i need to do a (sender-) rewrite like explained in FAQ 801
>  https://github.com/Exim/exim/wiki/Q0801
> 
>  *@*.your.domain  [email protected]
> 
>  This relies on a "hardcoded" domain name; what i'd like to have is
>  something like this:
> 
>  *@*.${domain_without_hostname} $1@${domain_without_hostname}
> 
>  So my question is: how to strip off the hostname from an address (in
>  this case the sender) using exims build-in stuff.

How does a domain look like *with* hostname? 


    address    host | domain
    [email protected]     a | b.c
                    | a.b.c
               a.b  | c     

If you want to stripp off the first part of the "domain"

    begin rewrite
    \N^(.*)@.*?\.(.*)\N  $1@$2

    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
-- 
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: F69376CE -
 ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ -

Attachment: signature.asc
Description: Digital signature

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to