Re: Piler is not saving the incoming emails

2020-12-14 Thread jb






On 2020-12-14 15:37, jb wrote:


I only send you the lines from /var/log/mail.log. Do you wanted other 
ones to?


No. However, when the system boots and starts piler, then you usually 
have such

lines, eg.

Dec 13 16:59:17 cust1 piler-smtp[203]: reloaded config: 
/etc/piler/piler.conf

Dec 13 16:59:17 cust1 piler-smtp[203]: running as user 'piler'
Dec 13 16:59:17 cust1 piler-smtp[203]: created directory: 
*/var/piler/store/00*
Dec 13 16:59:17 cust1 piler-smtp[203]: created directory: 
*/var/piler/tmp/0*
Dec 13 16:59:17 cust1 piler-smtp[203]: created directory: 
*/var/piler/tmp/1*

Dec 13 16:59:17 cust1 piler-smtp[203]: piler-smtp 1.5.0-47e2e50 starting
Dec 13 16:59:17 cust1 piler[205]: reloaded config: /etc/piler/piler.conf
Dec 13 16:59:17 cust1 piler[205]: piler 1.5.0-47e2e50 starting

Anyway, if the systemd fix has solved it, it's ok for me.


Ok, thank you again!



Re: Piler is not saving the incoming emails

2020-12-14 Thread sj




On 2020-12-14 15:37, jb wrote:


I only send you the lines from /var/log/mail.log. Do you wanted other 
ones to?


No. However, when the system boots and starts piler, then you usually 
have such

lines, eg.

Dec 13 16:59:17 cust1 piler-smtp[203]: reloaded config: 
/etc/piler/piler.conf

Dec 13 16:59:17 cust1 piler-smtp[203]: running as user 'piler'
Dec 13 16:59:17 cust1 piler-smtp[203]: created directory: 
*/var/piler/store/00*
Dec 13 16:59:17 cust1 piler-smtp[203]: created directory: 
*/var/piler/tmp/0*
Dec 13 16:59:17 cust1 piler-smtp[203]: created directory: 
*/var/piler/tmp/1*

Dec 13 16:59:17 cust1 piler-smtp[203]: piler-smtp 1.5.0-47e2e50 starting
Dec 13 16:59:17 cust1 piler[205]: reloaded config: /etc/piler/piler.conf
Dec 13 16:59:17 cust1 piler[205]: piler 1.5.0-47e2e50 starting

Anyway, if the systemd fix has solved it, it's ok for me.

Janos



Re: Piler is not saving the incoming emails

2020-12-14 Thread jb





Am 14.12.20 um 15:25 schrieb s...@acts.hu:



On 2020-12-14 15:13, jb wrote:



piler.service:
[Unit]
Description=Piler daemon
After=network.target mariadb.service


...

The systemd files look fine.



Dec 14 15:09:01 piler piler-smtp[392]: connected from 1.2.3.4:38359
on fd=6 (active connections: 1)
Dec 14 15:09:01 piler piler-smtp[392]: got on fd=6: *EHLO
www.example.org#015#012* [1]
Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6:

250-piler.example.org#015#012250-PIPELINING#015#012250-STARTTLS#015#012250-SIZE#015#012250 


8BITMIME#015
Dec 14 15:09:01 piler piler-smtp[392]: got on fd=6:
*STARTTLS#015#012*
Dec 14 15:09:01 piler piler-smtp[392]: starttls request from client
Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6: 220 Ready to
start TLS#015
Dec 14 15:09:01 piler piler-smtp[392]: waiting for ssl handshake
Dec 14 15:09:01 piler piler-smtp[392]: SSL_accept() result, rc=-1,
errorcode: 2, error text: error::lib(0):func(0):reason(0)
Dec 14 15:09:01 piler piler-smtp[392]: got on fd=6: *EHLO
www.example.org#015#012* [1]
Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6:


250-piler.example.org#015#012250-PIPELINING#015#012250-SIZE#015#012250

8BITMIME#015
Dec 14 15:09:01 piler piler-smtp[392]: got on fd=6: *MAIL
FROM: SIZE=246722#015#012*
Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6: 250 Ok#015


this is only a redacted stuff for piler-smtp, and not even complete 
for piler-smtp.
Anyway, the above entries look fine, you have received several emails 
via smtp.


I assume that later log entries show that piler daemon child processes 
have

processed these emails.



I think I found a fix when I change this line After=network.target
auditd.service piler.service in piler-smtp service it works. Can this
be true?


I don't think so. The piler daemon processes and piler-smtp run 
independently
from each other. It seems that piler-smtp runs fine, but piler has 
some issues.


That's why I asked all piler related mail logs (the first 2-300 lines 
at max)

since the last reboot. You clearly didn't give me that.

I only send you the lines from /var/log/mail.log. Do you wanted other 
ones to?





Re: Piler is not saving the incoming emails

2020-12-14 Thread sj




On 2020-12-14 15:13, jb wrote:



piler.service:
[Unit]
Description=Piler daemon
After=network.target mariadb.service


...

The systemd files look fine.



Dec 14 15:09:01 piler piler-smtp[392]: connected from 1.2.3.4:38359
on fd=6 (active connections: 1)
Dec 14 15:09:01 piler piler-smtp[392]: got on fd=6: *EHLO
www.example.org#015#012* [1]
Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6:


250-piler.example.org#015#012250-PIPELINING#015#012250-STARTTLS#015#012250-SIZE#015#012250

8BITMIME#015
Dec 14 15:09:01 piler piler-smtp[392]: got on fd=6:
*STARTTLS#015#012*
Dec 14 15:09:01 piler piler-smtp[392]: starttls request from client
Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6: 220 Ready to
start TLS#015
Dec 14 15:09:01 piler piler-smtp[392]: waiting for ssl handshake
Dec 14 15:09:01 piler piler-smtp[392]: SSL_accept() result, rc=-1,
errorcode: 2, error text: error::lib(0):func(0):reason(0)
Dec 14 15:09:01 piler piler-smtp[392]: got on fd=6: *EHLO
www.example.org#015#012* [1]
Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6:


250-piler.example.org#015#012250-PIPELINING#015#012250-SIZE#015#012250

8BITMIME#015
Dec 14 15:09:01 piler piler-smtp[392]: got on fd=6: *MAIL
FROM: SIZE=246722#015#012*
Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6: 250 Ok#015


this is only a redacted stuff for piler-smtp, and not even complete for 
piler-smtp.
Anyway, the above entries look fine, you have received several emails 
via smtp.


I assume that later log entries show that piler daemon child processes 
have

processed these emails.



I think I found a fix when I change this line After=network.target
auditd.service piler.service in piler-smtp service it works. Can this
be true?


I don't think so. The piler daemon processes and piler-smtp run 
independently
from each other. It seems that piler-smtp runs fine, but piler has some 
issues.


That's why I asked all piler related mail logs (the first 2-300 lines at 
max)

since the last reboot. You clearly didn't give me that.

Anyway, if your systemd modifications prove to work, then I'm happy with 
that.

Keep it.


Janos



Re: Piler is not saving the incoming emails

2020-12-14 Thread jb

Thank your, for your fast response!

Am 14.12.20 um 14:21 schrieb s...@acts.hu:



Hello Jonathan,

On 2020-12-14 13:48, jb wrote:


I run here the latest piler version, on debian 10 and I have the
problem, that after a restart piler is not saving anymore the emails.
I had this now multiple times, and I think it have to do with the
piler.pid file.

I saw now many time in systemctl status piler:


...

Dez 14 12:37:47 piler piler[530]: reloaded config:
/usr/local/etc/piler/piler.conf
Dez 14 12:37:47 piler piler[530]: piler 1.3.9, build 998 starting
Dez 14 12:37:47 piler systemd[1]: piler.service: Can't open PID file
/run/piler/piler.pid (yet?) after start: No such file or directory
Dez 14 12:37:47 piler systemd[1]: Started Piler daemon.


I try to change the path from pid file in piler.conf and in the
service file, and when I restart the service it can happen, that this
error disappear. But after next reboot it comes again.

On default path to /var/run/piler/piler.pid, the file would also
exists, so why the service is not finding the pid file, I don't know.

When emails are coming in, piler-smtp will notice it.

Have you any suggestions?


Yes. Show me your piler related systemd files. Then stop piler and 
piler-smtp,


Ok here:

   piler.service:
    [Unit]
    Description=Piler daemon
    After=network.target mariadb.service

    [Service]
    ExecStart=/usr/local/sbin/piler -d
    PIDFile=/var/run/piler/piler.pid
    KillMode=process
    Restart=on-failure
    RestartPreventExitStatus=255
    Type=forking
    User=root

    [Install]
    WantedBy=multi-user.target
    Alias=piler.service


   piler-smtp.service:
    [Unit]
    Description=Piler SMTP server
    After=network.target auditd.service

    [Service]
    ExecStart=/usr/local/sbin/piler-smtp -d
    KillMode=process
    Restart=on-failure
    RestartPreventExitStatus=255
    Type=forking
    User=root

    [Install]
    WantedBy=multi-user.target
    Alias=piler-smtp.service


   pilersearch.service:
    [Unit]
    Description=Searchd for piler daemon
    After=network.target mariadb.service

    [Service]
    ExecStart=/usr/bin/searchd --config
   /usr/local/etc/piler/sphinx.conf
    ExecStartPre=/bin/bash -c "if [[ ! -d /var/run/piler ]]; then
   mkdir -p /var/run/piler; chown piler:piler /var/run/piler; fi"
    PIDFile=/run/piler/searchd.pid
    KillMode=process
    Restart=on-failure
    RestartPreventExitStatus=255
    Type=forking
    User=piler

    [Install]
    WantedBy=multi-user.target
    Alias=pilersearch.service



and verify the pid files are removed, and using ps output that no 
piler daemon


checked


process is running. Then set verbosity=5 in piler.conf, and reboot 
your host.
Finally, send a test email to the archive, and show me the mail log 
entries

since the reboot.


   Dec 14 15:09:01 piler piler-smtp[392]: connected from 1.2.3.4:38359
   on fd=6 (active connections: 1)
   Dec 14 15:09:01 piler piler-smtp[392]: got on fd=6: *EHLO
   www.example.org#015#012*
   Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6:
   
250-piler.example.org#015#012250-PIPELINING#015#012250-STARTTLS#015#012250-SIZE#015#012250
   8BITMIME#015
   Dec 14 15:09:01 piler piler-smtp[392]: got on fd=6: *STARTTLS#015#012*
   Dec 14 15:09:01 piler piler-smtp[392]: starttls request from client
   Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6: 220 Ready to
   start TLS#015
   Dec 14 15:09:01 piler piler-smtp[392]: waiting for ssl handshake
   Dec 14 15:09:01 piler piler-smtp[392]: SSL_accept() result, rc=-1,
   errorcode: 2, error text: error::lib(0):func(0):reason(0)
   Dec 14 15:09:01 piler piler-smtp[392]: got on fd=6: *EHLO
   www.example.org#015#012*
   Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6:
   250-piler.example.org#015#012250-PIPELINING#015#012250-SIZE#015#012250
   8BITMIME#015
   Dec 14 15:09:01 piler piler-smtp[392]: got on fd=6: *MAIL
   FROM: SIZE=246722#015#012*
   Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6: 250 Ok#015
   Dec 14 15:09:01 piler piler-smtp[392]: got on fd=6: *RCPT
   TO:#015#012*
   Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6: 250 Ok#015
   Dec 14 15:09:01 piler piler-smtp[392]: got on fd=6: *DATA#015#012*
   Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6: 354 Send mail
   data; end it with .#015
   Dec 14 15:09:01 piler piler-smtp[392]: received: FCA6S8MJE9V4B4T9,
   from=i...@example.org, size=247527, client=1.2.3.4, fd=6, fsync=9685
   Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6: 250 OK
   #015
   Dec 14 15:09:01 piler piler-smtp[392]: got on fd=6: *QUIT#015#012*
   Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6: 221
   piler.example.org Goodbye#015
   Dec 14 15:09:01 piler piler-smtp[392]: disconnected from 1.2.3.4 on
   fd=6 (0 active connections)
   Dec 14 15:09:01 piler piler-smtp[392]: con

Re: Piler is not saving the incoming emails

2020-12-14 Thread sj




Hello Jonathan,

On 2020-12-14 13:48, jb wrote:


I run here the latest piler version, on debian 10 and I have the
problem, that after a restart piler is not saving anymore the emails.
I had this now multiple times, and I think it have to do with the
piler.pid file.

I saw now many time in systemctl status piler:


...

Dez 14 12:37:47 piler piler[530]: reloaded config:
/usr/local/etc/piler/piler.conf
Dez 14 12:37:47 piler piler[530]: piler 1.3.9, build 998 starting
Dez 14 12:37:47 piler systemd[1]: piler.service: Can't open PID file
/run/piler/piler.pid (yet?) after start: No such file or directory
Dez 14 12:37:47 piler systemd[1]: Started Piler daemon.


I try to change the path from pid file in piler.conf and in the
service file, and when I restart the service it can happen, that this
error disappear. But after next reboot it comes again.

On default path to /var/run/piler/piler.pid, the file would also
exists, so why the service is not finding the pid file, I don't know.

When emails are coming in, piler-smtp will notice it.

Have you any suggestions?


Yes. Show me your piler related systemd files. Then stop piler and 
piler-smtp,
and verify the pid files are removed, and using ps output that no piler 
daemon
process is running. Then set verbosity=5 in piler.conf, and reboot your 
host.
Finally, send a test email to the archive, and show me the mail log 
entries

since the reboot.

Also double check that you want to start piler only once at boot time 
(ie.

not with systemd and with rc.local or similar).

Janos



Piler is not saving the incoming emails

2020-12-14 Thread jb

Hello,

I run here the latest piler version, on debian 10 and I have the 
problem, that after a restart piler is not saving anymore the emails. I 
had this now multiple times, and I think it have to do with the 
*piler.pid* file.


I saw now many time in *systemctl status piler*:

   ...

   Dez 14 12:37:47 piler piler[530]: reloaded config:
   /usr/local/etc/piler/piler.conf
   Dez 14 12:37:47 piler piler[530]: piler 1.3.9, build 998 starting
   Dez 14 12:37:47 piler systemd[1]: piler.service: Can't open PID file
   /run/piler/piler.pid (yet?) after start: No such file or directory
   Dez 14 12:37:47 piler systemd[1]: Started Piler daemon.

I try to change the path from pid file in piler.conf and in the service 
file, and when I restart the service it can happen, that this error 
disappear. But after next reboot it comes again.


On default path to /var/run/piler/piler.pid, the file would also exists, 
so why the service is not finding the pid file, I don't know.


When emails are coming in, piler-smtp will notice it.

Have you any suggestions?


Best regards

Jonathan