Re: [exim] Exim 4.94 new config for routers (Tainted filenam…

Top Page
Delete this message
Reply to this message
Author: SysAdmin EM
Date:  
To: exim-users
Subject: Re: [exim] Exim 4.94 new config for routers (Tainted filename for search)
I try that way but I got this message:

[root@vps-1713830-x ~] # /opt/exim/bin/exim -bt no-reply@???
LOG: MAIN PANIC DIE
failed to open /opt/exim/valiases///opt/exim/valiases/dominioprueba1.tk
for linear search: No such file or directory

[root@vps-1713830-x /opt/exim] # cd /opt/exim/valiases/
[root@vps-1713830-x /opt/exim/valiases] # ll
total 8
-rw-r--r-- 1 root root 15 ene 26 07:55 dominioprueba1.tk
-rw-r--r-- 1 root root 15 may 3 10:51 dominioprueba2.tk
[root@vps-1713830-x /opt/exim/valiases] # cat dominioprueba1.tk
*: :blackhole:

As follows if it works but I get an error in a routine that previously
worked correctly.

virtual_aliases_nostar:
driver = redirect
allow_defer
allow_fail
data = $local_part_data
file_transport = address_file
group = exim
pipe_transport = virtual_address_pipe
retry_use_local_part
domains = dsearch,ret=full;//opt/exim/valiases
local_parts = lsearch;$domain_data
unseen

After that router, go to the next:

virtual_user:
driver = accept
condition = "${perl{check_deliver}{$domain}{$local_part}}"
headers_remove="x-spam-exim"
domains = lsearch;/opt/exim/userdomains
retry_use_local_part
transport = virtual_userdelivery

virtual_userdelivery:
driver = appendfile
delivery_date_add
envelope_to_add
directory = "${perl{getmaildir}{$local_part_data@$domain_data}}/Maildir"
maildir_format = true
group = exim
mode = 0660
quota = "${if exists\
<------><------>{${perl{getmaildir}{$local_part_data@
$domain_data}}/etc/${domain_data}/quota}\
<------><------>{${lookup{$local_part_data}lsearch*{${perl{getmaildir}{$local_part_data@
$domain_data}}/etc/${domain_data}/quota}{$value}}}\
<------><------>{}}"
return_path_add
user = "${lookup{$domain_data}lsearch*{/opt/exim/userdomains}{$value}}"

But, now i see a new error en the exim debug (/opt/exim/bin/exim -d -bd) i
see this

8677 == no-reply@??? R=virtual_user T=virtual_userdelivery
defer (-1): Expansion of "${if
exists{${perl{getmaildir}{$local_part_data@$domain_data}}/etc/${domain_data}/quota}
{${lookup{$local_part_data}lsearch*{${perl{getmaildir}{$local_part_data@$domain_data}}/etc/${domain_data}/quota}{$value}}}
{}}" in virtual_userdelivery transport failed: Perl subroutine "getmaildir"
returned undef to force failure

The subroutine "getmaildir" I use it to know where the home of the hosting
account is:

sub getmaildir {
    my ($email) = @_;
    ($mailuser,$domain) = split(/\@/,$email);
    my $primary_hostname = Exim::expand_string('$primary_hostname');
    if ($domain eq $primary_hostname) {
<------>$user = $mailuser;
    } else {
<------>$user = getdomainowner($domain);
    }
    return(gethomedir($user));
}


all local domains are stored in a file / opt / exim / localdomains:

[root@vps-1713830-x /opt/exim] # head localdomains
centos7-64-fz.dattaweb.com
dominioprueba1.tk
dominioprueba2.tk

With the new change I don't know how to read that content.

Thanks for the help.

Regards,