[Exim] Problem with data line....

Etusivu
Poista viesti
Vastaa
Lähettäjä: krelvinaz
Päiväys:  
Vastaanottaja: exim-users
Aihe: [Exim] Problem with data line....
I am really stuck on this... I thought I had it figured out but in final testing of the rules with all the different variations, I realized the rule I was using
for one of them is wrong.

I have the following

    data = "\"$local_part@$domain\"@remote.domain.name"


However, this is not exactly what I want....

Input is:

    $domain = attfax.domain.name


    $local_part = 999999


Result = "999999@???

What I want is....

Result = "999999@???

Note the lack of .domain.name in the local part section...

What can I do with

    data = "\"$local_part@$domain\"@remote.domain.name"


To achieve this...?? I'm assuming some sort of regex will work. It needs to exclude the

    .domain.name


from the $domain section so that it only has the attfax in it.

Note that the domain could include:

attfax.domain.name
atttelex.domain.name
somelongname.domain.name
short.domain.name

... and many more so I cant just to a substr{0}{5} of the $domain to get the answer

The actual rule looks like:

cometsredirect:
driver = redirect
domains = "partial-lsearch;special"
data = "\"$local_part@$domain\"@remote.domain.name"


special is a file that contains a list of all the special domains that need to be caught like:

attfax.domain.name
atttelex.domain.name
somelongname.domain.name
short.domain.name