无法打开 /etc/userdomains 进行线性搜索:权限被拒绝(euid=1000 egid=1001)

无法打开 /etc/userdomains 进行线性搜索:权限被拒绝(euid=1000 egid=1001)

这里我的 centos 中的自动回复器无法工作,有人可以帮我吗?

2022-07-20 09:50:10 1oE6LK-00A004-0j ** [email protected] R=userautoreply T=userautoreply: Expansion of "${if def:h_Subject: {${if exists{/etc/exim/users/${lookup{$domain}lsearch{/etc/userdomains}{$value}}/${perl{untaint}{$domain}}/autorespond/${local_part}/${local_part}@${domain}.subj}{${readfile{/etc/exim/users/${lookup{$domain}lsearch{/etc/userdomains}{$value}}/${perl{untaint}{$domain}}/autorespond/${local_part}/${local_part}@${domain}.subj}{}}}{Autoreply}}: ${quote:${escape:${length_60:$h_Subject:}}}}{Autoreply Message}}" failed in userautoreply transport: failed to open /etc/userdomains for linear search: Permission denied (euid=1000 egid=1001)

这是我得到的问题

我的路由器

userautoreply:
  driver = accept
  domains = lsearch;/etc/userdomains
    router_home_directory = ${extract \
        {5} \
        {::} \
        {${lookup passwd \
            {${lookup \
                {$domain} \
                lsearch{/etc/userdomains} \
                {$value} \
            }} \
            {$value} \
        }} \
    }
    user = "${lookup \
        {$domain} \
        lsearch{/etc/userdomains} \
        {$value} \
    }"
  #local_parts = ${lookup{$local_part} dsearch,ret=full{${extract{5}{::}{${lookup passwd{${lookup{$domain}lsearch{/etc/userdomains}{$value}}}{$value}}}}/etc/${domain}/autorespond/}}
  condition = ${if exists{/etc/exim/users/${lookup{$domain}lsearch{/etc/userdomains}{$value}}/${perl{untaint}{$domain}}/autorespond/${local_part}/${local_part}@${perl{untaint}{$domain}}.msg}{yes}{no}}
  condition = ${if match{$h_X-Spam-Status:}{\N^Yes\N}{no}{yes}}
  require_files = /etc/exim/users/${lookup{$domain}lsearch{/etc/userdomains}{$value}}/${perl{untaint}{$domain}}/autorespond/${local_part}/${local_part}@${perl{untaint}{$domain}}.msg
  condition = ${if exists{/etc/exim/users/${lookup{$domain}lsearch{/etc/userdomains}{$value}}/${perl{untaint}{$domain}}/passwd}}
  
  # do not reply to errors and bounces or lists
  senders = " ! ^.*-request@.*:\
              ! ^owner-.*@.*:\
              ! ^postmaster@.*:\
              ! ^listmaster@.*:\
              ! ^mailer-daemon@.*\
              ! ^root@.*"
  transport = userautoreply
  unseen

我的交通

userautoreply:
    driver = autoreply
    file = /etc/exim/users/${lookup{$domain}lsearch{/etc/userdomains}{$value}}/${perl{untaint}{$domain}}/autorespond/${local_part}/${local_part}@${perl{untaint}{$domain}}.msg
    from = "${local_part}@${domain}"
    no_return_message
    subject = ${if def:h_Subject: {\
                  ${if exists{/etc/exim/users/${lookup{$domain}lsearch{/etc/userdomains}{$value}}/${perl{untaint}{$domain}}/autorespond/${local_part}/${local_part}@${domain}.subj}\
                      {${readfile{/etc/exim/users/${lookup{$domain}lsearch{/etc/userdomains}{$value}}/${perl{untaint}{$domain}}/autorespond/${local_part}/${local_part}@${domain}.subj}{}}}\
                      {Autoreply}\
                  }: ${quote:${escape:${length_60:$h_Subject:}}}}\
                  {Autoreply Message}}
    to = "${reply_address}"

答案1

所以这里我要做的就是像这样为域名命名

userautoreply:
    driver = autoreply
    file = /etc/exim/users/${lookup{$domain}lsearch{/etc/userdomains}{$value}}/${perl{untaint}{$domain}}/autorespond/${perl{untaint}{$local_part}}/${perl{untaint}{$local_part}}@${perl{untaint}{$domain}}.msg
    from = "${local_part}@${domain}"
    no_return_message
    subject = ${if def:h_Subject: {\
                  ${if exists{/etc/exim/users/${lookup{$domain_data}lsearch{/etc/userdomains}{$value}}/${domain_data}/autorespond/${local_part_data}/${local_part_data}@${domain_data}.subj}\
                      {${readfile{/etc/exim/users/${lookup{$domain_data}lsearch{/etc/userdomains}{$value}}/${domain_data}/autorespond/${local_part_data}/${local_part_data}@${domain_data}.subj}{}}}\
                      {Autoreply}\
                  }: ${quote:${escape:${length_60:$h_Subject:}}}}\
                  {Autoreply Message}}
    to = "${reply_address}"

相关内容