Mailing List Archive

Problem with exim 4.94 and transport using $local_part_suffix
(Sorry for having to resubscribe — my normal subscription has a suffix in my email address local part and I am currently broken and cannot get the email from the exim users list to my normal recipient email due to the problem I need advice and help with)

I recently upgraded my exim from an earlier version to 4.94, and had to upgrade the $local_part to $local_part_data in my transports for certain deliveries to work (like alias file lookup based on domain name).

My problem is that I have a transport that copies an email into a maildir subfolder for the user when the local part contains a suffix. I was using:

driver

ldaplocal_suffix:
driver = accept
condition = ${if eq {}{${lookup ldap {user=\”—— user info -----\" pass=XXXXXXX ldap://my.ldap.host:389/accountName=$local_part,domain=$domain,dc=XXXX,dc=YYY}}}{no}{yes}}
local_part_suffix = +*
retry_use_local_part
transport = ldap_virtual_appendfile_suffix



transport:

ldap_virtual_appendfile_suffix:
driver = appendfile
directory = ${lookup ldap {user="—— user info -----" pass=XXXXXXX ldap://my.ldap.host:389/accountName=${local_part},domain=${domain},dc=XXXX,dc=YYY?mailboxLoc?base?}{$value}fail}/.${substr_1_1000:${local_part_suffix}}
group = mailgroup
maildir_format
user = mailuser



The version of this above that does not look for local parts suffixes and just delivers to the local part (without the “/.${substr_1_1000:${local_part_suffix}}” at the end works fine.


With the need for $local_part to be done with $local_part_data, I am not sure how to pick up whatever local part suffix was picked up by the router… I’ve been reading through the exim documentation but don’t see how to do this.
--
## 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/
Re: Problem with exim 4.94 and transport using $local_part_suffix [ In reply to ]
> On Aug 27, 2021, at 12:10 PM, Chad Leigh Shire.Net LLC via Exim-users <exim-users@exim.org> wrote:
>
> I recently upgraded my exim from an earlier version to 4.94, and had to upgrade the $local_part to $local_part_data in my transports for certain deliveries to work (like alias file lookup based on domain name).
>
> My problem is that I have a transport that copies an email into a maildir subfolder for the user when the local part contains a suffix. I was using:
>
> driver
>
> ldaplocal_suffix:
> driver = accept
> condition = ${if eq {}{${lookup ldap {user=\”—— user info -----\" pass=XXXXXXX ldap://my.ldap.host:389/accountName=$local_part,domain=$domain,dc=XXXX,dc=YYY}}}{no}{yes}}
> local_part_suffix = +*
> retry_use_local_part
> transport = ldap_virtual_appendfile_suffix
>
>
>
> transport:
>
> ldap_virtual_appendfile_suffix:
> driver = appendfile
> directory = ${lookup ldap {user="—— user info -----" pass=XXXXXXX ldap://my.ldap.host:389/accountName=${local_part},domain=${domain},dc=XXXX,dc=YYY?mailboxLoc?base?}{$value}fail}/.${substr_1_1000:${local_part_suffix}}
> group = mailgroup
> maildir_format
> user = mailuser
>
>
>
> The version of this above that does not look for local parts suffixes and just delivers to the local part (without the “/.${substr_1_1000:${local_part_suffix}}” at the end works fine.


I was able to find a post in the list archives that set me on the right road to get a solution. Thanks!!!

ldap_virtual_appendfile_suffix:
driver = appendfile
directory = ${lookup ldap {user="—— user info -----" pass=XXXXXXX ldap://my.ldap.host:389/accountName=${local_part},domain=${domain},dc=XXXX?mailboxLoc?base?}{$value}fail}/.${substr_1_1000:${lookup {/${local_part_suffix_v}} nwildlsearch,ret=key {/opt/local/etc/exim/local_part_suffix.pcre} {$value} {}}}
group = mailgroup
maildir_format
user = mailuser


--
## 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/
Re: Problem with exim 4.94 and transport using $local_part_suffix [ In reply to ]
On 27/08/2021 19:10, Chad Leigh Shire.Net LLC via Exim-users wrote:
> With the need for $local_part to be done with $local_part_data, I am not sure how to pick up whatever local part suffix was picked up by the router

Does $local_part_suffix_v do what you need?

--
Cheers,
Jeremy

--
## 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/
Re: Problem with exim 4.94 and transport using $local_part_suffix [ In reply to ]
> On Aug 31, 2021, at 11:43 AM, Jeremy Harris via Exim-users <exim-users@exim.org> wrote:
>
> On 27/08/2021 19:10, Chad Leigh Shire.Net LLC via Exim-users wrote:
>> With the need for $local_part to be done with $local_part_data, I am not sure how to pick up whatever local part suffix was picked up by the router
>
> Does $local_part_suffix_v do what you need?
>

It seems to. Things are functioning once again…



--
## 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/