Want to file a "bug fix" for system "reserved" filenames as email accounts

LeviathanX

Member
Jan 21, 2013
10
0
1
cPanel Access Level
Root Administrator
Hi,

I ran into this problem:

Thread: use of "shadow" in email-address wont work anymore (fun fact: the thread is from 2007 and still this "problem" exists)

Since I just cannot encourage my user to give up his email (it's been in use for over 15 years by now!) I've just made out a quick hotfix.

The error is a "not a directory" message

--> 2013-01-21 18:34:30 1TxLGQ-0002EA-2M == [email protected] R=virtual_user_filter defer (-1): require_files: error for /home/<account>/etc/<domain.tld>/shadow/filter: Not a directory
Since the "shadow" is a system reserved file.

I tried applying this solution (Click), but it didn't work at all

Thence the easiest solution was to re-locate the filters into a different subdirectory.

So if the previous location was

/home/<user>/etc/<domain.tld>/<account>/filter

it will be located in

/home/<user>/etc/<domain.tld>/vfilter/<account>/filter

after applying this hotfix.


For that to happen open /etc/exim.conf and replace

Code:
    require_files = "+${extract{5}{::}{${lookup passwd{${lookup{$domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}/etc/$domain/$local_part/filter"
    file = "${extract{5}{:}{${lookup passwd{${lookup{$domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}/etc/$domain/$local_part/filter"
with

Code:
    require_files = "+${extract{5}{::}{${lookup passwd{${lookup{$domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}/etc/$domain/vfilter/$local_part/filter"
    file = "${extract{5}{:}{${lookup passwd{${lookup{$domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}/etc/$domain/vfilter/$local_part/filter"
Note:
I don't use filters in our system (deactivated the option in cpanel for the users) therefore I have the least problems with that hotfix.

-------

Since I cannot edit these lines in the WHM with root access (somehow it's read only) and since I don't know which system scripts would be affected I'd like to file this for an official solution.

So where could I file a possible official fix based on that?! (A link would be nice :) )

Kind regards,
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
23
143
Houston, TX
cPanel Access Level
Root Administrator
Re: Want to file a "bug fix" for system "reserved" filenames as email accou

Since I cannot edit these lines in the WHM with root access (somehow it's read only)
Check for the immutable attribute on /etc/exim.conf. It should not be applied. It would show up as a lowercase "i" in lsattr output:

Code:
# lsattr /etc/exim.conf
----i-------- /etc/exim.conf
If the i attribute is applied, remove it:

Code:
# chattr -i /etc/exim.conf
#
Also, make sure that the /etc/exim.conf file has 644 permissions:

Code:
# ls -alh /etc/exim.conf
-rw-r--r-- 1 root root 56K Jan 10 10:39 /etc/exim.conf
#
We now provide mechanisms that allow for customizing Exim without applying the immutable attribute, which breaks Exim and cPanel updates. You can read more on this subject here:

The Exim Advanced Editor

So where could I file a possible official fix based on that?! (A link would be nice )
You can submit a bug report here:

https://tickets.cpanel.net/submit/?reqtype=bugreport

That link is available as "Report a Defect" on the index page for this forum, just under "Submit a Ticket." What happens is, it goes into our ticket queue labeled as a bug report, and we try to reproduce it as a bug and investigate further from there.
 

LeviathanX

Member
Jan 21, 2013
10
0
1
cPanel Access Level
Root Administrator
Hi Jared,

I'M truly sorry for the late reply; life kept me busy. I checked the attributes, they might be fine

[/etc]# lsattr exim.conf
-------------e- exim.conf
Nevertheless, it's not editable, or it's not meant to be editable.
Please see the screenshot of the particular section which needs to be changed.
Today an automatic system service update seemed to have taken place and the one particular users email was not working once again. So I fixed it manually, but as you can see in the screenshot the content here is clearly not read from the local filesystem; at least not from /etc/exim.conf .

WHM:
/http://dark-matrix.net/images/not_editable.gif

Local file:
/http://dark-matrix.net/images/local_file.gif

So I'm bit confused... is there a template or is it hidden in the database (I really need this permanently stored...). I'll file an official bugtracker entry during the weekend.