Closed dilyanpalauzov closed 2 months ago
Apart from this, the system logs for customer.php:122 that Memcached:add() expects 3 parameters, but 4 are given.
You need the Memcached php plugin.
The issue is solved on the master branch.
I do not understand what you mean. At https://www.mailpiler.org/installation/ the text is not correct for version Piler 1.4.5.
I'll fix the text. Any other issue?
Fixed the docs.
My reading is that on the master branch Memcached::add() receives 3, not 4 parameters.
Any other issue?
Thanks for asking!
In Piler 1.4.5 when I do Advanced Search, enter as start 2024-07-10, as end 2024-07-13 (tomorrow) and click on OK, the system logs
Jul 12 19:08:04 934bd4e1d8e9 piler-webui[26860]: sphinx query: 'SELECT id FROM piler1 WHERE sent >= 1720562400 AND sent <= 1720907999 AND MATCH(' ( (@sender ) | (@rcpt ) ) ') ORDER BY `sent` DESC LIMIT 0,20 OPTION max_matches=5000' in 0.04 s, 0 hits, 0 total found
thus 0 hits. But the table is not empty:
$ echo "select * from piler1;" | mysql --host 127.0.0.1 -P 9306 piler
id arrived sent size direction folder attachments
1 1720793059 1720793058 375 0 0 0
How can I fix the query to return the only archived item?
It seems that the gui doesn't assign any email address for you. What do you see on the user settings page?
Thanks for the hint with the own email address under settings! After adjusting the LDAP configuration, under Settings, I see my own email address, and that I am member of no group. In the previous Piler installation, define('BUILD', '2014-01-29 858‘);
, the own email address is also not shown, but searches do work. Why is it significant for Piler to see the email address of the current user? All users should see in my use case all emails.
controller/login.php:15 contains header("Location: search.php“);
. Why is this not "Location: " . SITE_URL . "search.php"
, as on line 83? The problem is, that I login at https://localhost:8443 and immediately after that POST login.php returns the header Location: search.php
, which Firefox and Safari interpret as Location: http://localhost/search.php
. As my webserver does not rewrite the latter, the login process leads to nowhere. Likewise at
# grep Location: -rn|grep -v SITE_URL
controller/folder/edit.php:24: Header("Location: folders.php");
controller/folder/list.php:24: Header("Location: folders.php");
controller/folder/list.php:32: Header("Location: folders.php");
controller/health/health.php:34: header("Location: " . HEALTH_URL);
controller/login/google.php:49: header('Location: ' . GOOGLE_REDIRECT_URL);
controller/login/foureyes.php:15: header("Location: search.php");
controller/message/view.php:75: header("Location: " . $_SERVER['HTTP_REFERER']);
google-api/auth/apiOAuth.php:192: header("Location: $authorizeRedirect");
google-api/auth/apiOAuth2.php:110: header('Location: ' . $authUrl);
config.php.in contains $config['RT‘] = 1
, the text at https://www.mailpiler.org/manticore-search/ does not say, when disabling Real-Time search, whether to keep or change $config['RT‘] = 1
.
in the systemd directory calling make install
puts the .service files under $(DESTDIR)$(libexecdir)/piler/
. However systemd does not look there for service files. The searched directories are at the top of https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html . The files should go under $(DESTDIR)$(libdir)/systemd/system/
or under $(DESTDIR)/$(pkg-config --variable=systemdsystemunitdir systemd )
(or whatever is used to execute something in a makefile, instead of $(executable) - I do not recall now how it works). In addition the paths in the .service files do not consider the paths set by ./configure .
Lots of bugs to fix.
Why is it significant for Piler to see the email address of the current user? All users should see in my use case all emails.
Piler shows only the user's own emails, and to do that it needs to know the email addresses of the user. IN your case, however, you may grant all users to be auditors, so everyone can see any emails. Btw. I wonder, what use case would require that?
The redirects
They are fine on the master branch
The RT settings
I thought, it was obvious to keep the RT settings in sync with manticore config, piler.conf and config-site.php.
Systemd install path
It's your call and the install script's call to put these systemd files to the appropriate location.
Piler shows only the user's own emails, and to do that it needs to know the email addresses of the user. IN your case, however, you may grant all users to be auditors, so everyone can see any emails. Btw. I wonder, what use case would require that?
Some servers send emails to the customers, and copies of the emails are stored in Piler. Customer support needs access to all emails and no body else needs access there. So all users should be able to find all emails.
The redirects
They are fine on the master branch
The first three matches below from the master branch do not look fine for me:
% git grep "Location:"|grep -v SITE_URL master
webui/controller/folder/edit.php: Header("Location: folders.php");
webui/controller/folder/list.php: Header("Location: folders.php");
webui/controller/folder/list.php: Header("Location: folders.php");
webui/controller/health/health.php: header("Location: " . HEALTH_URL);
webui/controller/login/google.php: header('Location: ' . GOOGLE_REDIRECT_URL);
webui/controller/message/view.php: header("Location: " . $_SERVER['HTTP_REFERER']);
webui/google-api/auth/apiOAuth.php: header("Location: $authorizeRedirect");
webui/google-api/auth/apiOAuth2.php: header('Location: ' . $authUrl);
The RT settings
I thought, it was obvious to keep the RT settings in sync with manticore config, piler.conf and config-site.php.
Yes, it is kind of implicit. But the current default configuration is neither fer RT, nor fer non-RT, as it has $config['RT‘] = 1
but misses define('RT', 1);
. I think best would be to change $config['RT'] = 0
in the provided template, and update the documentation for RT to set there $config['RT']=1
.
Systemd install path
It's your call and the install script's call to put these systemd files to the appropriate location.
Why isn't the install target just removed, or set to do nothing? The current install-behaviour definitely has no added value compared to not doing anything.
I've just done a PR to fix the missing redirects: https://github.com/jsuto/piler/pull/88
The RT settings are consistent on the master branch
Also, I'd rather keep the install target for the systemd stuff. Not everyone installs from the source, I also ship some packages, and the systemd files wouldn't be available otherwise.
The systemd .service
files will be available for the users not installing from source, depending on how that files are shipped over intermediary to the users. I do not see how installing .service files to a place not read by systemd, ensures that these files are delivered to users, not installing from source.
For LDAP login, does setting ENABLE_AUDIT=0 and RESTRICTED_AUDITOR=0 permit all users to read all emails?
Commit 1ebd49956a8aeb787f6832d4a43d21d40ab442d2 removes the variable ENABLE_REMOTE_IMAGES from webui/model/search/message.php. Can this variable be removed also from config.php.in, as I do not see any place, where it is used?
Why are $config['SMTP_DOMAIN‘], $config['FROM_DOMAIN'], $config['ADMIN_EMAIL‘], $config['SITE_URL‘] and $config['DB_PASSWORD‘] = 'MYSQL_PASSWORD‘ present both in config.php.in and config-site.php.in? Honestly, I do not understand which file is for what and why a single file is not sufficient.
Is the $config['SMARTHOST] smart host resolved by looking the MX record, or the A record? I mean, if I have two servers for redundancy and I want to enter one host name as smart host, do I have to create subdomain sh.example.org with two MX records, resolving to each host, or do I have to create that subdomain with just two A records?
Let's skip the systemd stuff, I keep it as it is for the moment.
For LDAP login, does setting ENABLE_AUDIT=0 and RESTRICTED_AUDITOR=0 permit all users to read all emails?
No
Can this variable be removed also from config.php.in
Done
I do not understand which file is for what and why a single file is not sufficient.
/var/piler/www/config.php ships the default values. You should not change this file, because an upgrade would overwrite your changes. Instead put your site specific settings to config-site.php.
Is the $config['SMARTHOST] smart host resolved by looking the MX record, or the A record?
The A record. If you have 2 hosts, then either use Round-Robin or you may deploy an MTA to the archive running on a high port, eg. 127.0.0.1:2525, and specify it as the smarthost. Then configure the MTA to use whatever smarthosts you have.
Btw. since these stuff has nothing to do with the original issue, please create a new one for further topics.
The RT settings are consistent on the master branch
build/piler.conf contaiins rtindex=0
, while the default for missing rtindex is =1.
Right, I've fixed it in fe6a0b9f
As git grep -n memcached_enable
returns only build/piler.conf:14:memcached_enable=0
, that is: it is not mentioned anywhere else, does memcached_enable do anything?
Ahm, does use_antivrus
do anything?
git grep -n use_antivirus
build/piler.conf:35:use_antivirus=0
src/cfg.c:109: { "use_antivirus", "integer", (void*) int_parser, offsetof(struct config, use_antivirus), "1", sizeof(int)},
src/cfg.h:35: int use_antivirus;
d505fd10c2bbc71a5d824 has partially removed use_antivirus
:
#ifdef HAVE_ANTIVIRUS
if(sctx->cfg->use_antivirus == 1){
sctx->sdata->rav = do_av_check(sctx->sdata, &virusinfo[0], sctx->data, sctx->cfg);
}
#endif
Removed both unused variable.
At https://www.mailpiler.org/installation/ is said that these are needed:
PHP has two bindings to memcache. One is called Memcache, the other is called Memcached - with d at the end. And here really is meant that package with d at the end