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:00000000: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:<i...@example.org> 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:<arch...@piler.example.org>#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 <CRLF>.<CRLF>#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
   <FCA6S8MJE9V4B4T9>#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]: connected from 1.2.3.4:51875
   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:00000000: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:<i...@example.org> SIZE=35370#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:<arch...@piler.example.org>#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 <CRLF>.<CRLF>#015
   Dec 14 15:09:01 piler piler-smtp[392]: received: ZLB0FQE659R2CFEO,
   from=i...@example.org, size=36175, client=1.2.3.4, fd=6, fsync=3385
   Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6: 250 OK
   <ZLB0FQE659R2CFEO>#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]: connected from 1.2.3.4:45283
   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:00000000: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:<i...@example.org> SIZE=35290#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:<arch...@piler.example.org>#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 <CRLF>.<CRLF>#015
   Dec 14 15:09:01 piler piler-smtp[392]: received: BFLXKN7V3XCDLEVT,
   from=i...@example.org, size=36095, client=1.2.3.4, fd=6, fsync=6141
   Dec 14 15:09:01 piler piler-smtp[392]: sent on fd=6: 250 OK
   <BFLXKN7V3XCDLEVT>#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)


Also double check that you want to start piler only once at boot time (ie.
not with systemd and with rc.local or similar).

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?



**

Reply via email to