[exim] Re: Difficulty getting Exim Address rewriting working…

Góra strony
Delete this message
Reply to this message
Autor: Daniel Müller
Data:  
Dla: 'Michael Lueck'
CC: exim-users
Temat: [exim] Re: Difficulty getting Exim Address rewriting working on Ubuntu Linux
So what I do with rewriting:
I have to files containing the users inside and the users outside. Working form e fine.


begin rewrite
##out Emails
*@yourinside.domain "${extract{remote} {${lookup{$0}lsearch{/etc/exim4/data/lokal_remote}{$value}fail}}{$value} fail}" rsfF

##coming in Emails
^[a-z-0-9\.\-]+@(youroutside.domain)\.de "${extract{lokal} {${lookup{$0}lsearch{/etc/exim4/data/remote_lokal}{$value}fail}}{$value} fail}" ST

Examaple file: lokal_remote:
abcd@???: remote=abcd@???

Examaple file: remote_lokal:
abcd@???: lokal=abcd@???

Greetings
Daniel

-----Ursprüngliche Nachricht-----
Von: Michael Lueck via Exim-users [mailto:exim-users@lists.exim.org]
Gesendet: Donnerstag, 28. Dezember 2023 15:38
An: exim-users@???
Betreff: [exim] Re: Difficulty getting Exim Address rewriting working on Ubuntu Linux

Greetings again,

Michael Lueck wrote:
> Michael Lueck wrote:
>>
>> So I changed my rules on the test VM system to:
>>
>>
>> begin rewrite
>> root@*                                             
>> realemailaddress@???   Eh
>> *@hostname*                                        
>> realemailaddress@???   Eh
>> *@*subdomain*                                      
>> realemailaddress@???   Eh
>>
>>
>>
>> And these rewrite rules worked with the command line test, and then sending real test emails.
> 
> 
> Actually, upon further testing.... seems that just the root@* rule finally works. The rest do not.
> 
> I switched out root@ for another valid account on the server, and then 
> had the full @hostname.subdomain.realdomain.com and neither of the hostname nor subdomain rules would fire. I tested them in the VM having only one rewrite rule active at a time, then used the command line tester interface of Exim.
> 
> Perhaps did I still misunderstand about Exim address rewriting rule syntax?


I have read through the Exim Address Rewriting documentation now several times.
https://www.exim.org/exim-html-current/doc/html/spec_html/ch-address_rewriting.html

Right here is a similar example rewrite rule:

7. Rewriting examples
Here is an example of the two common rewriting paradigms:

*@*.hitch.fict.example


That has a wild card as the address side and a wild card in the host side of the address. It looks very similar to the rules I am attempting.

I do not understand what I am doing incorrectly that Exim will not rewrite the host side of the email addresses. Please kindly explain.

I have tried the above, and also tweaked slightly to this syntax:

begin rewrite
root@*                                             realemailaddress@???   Eh
*@hostname.*                                       realemailaddress@???   Eh
*@*.subdomain.*                                    realemailaddress@???   Eh


The host side rewrite rules fail to rewrite. Why?

I am thankful,

--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

--
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   exim-users-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/