shiva-spampot / shiva

Spam Honeypot with Intelligent Virtual Analyzer
MIT License
131 stars 36 forks source link

Failed to start LSB: exim Mail Transport Agent #29

Open kont45 opened 6 years ago

kont45 commented 6 years ago

Following an instruction we get error when command is started

sudo ./setup_exim4.sh

systemctl status exim4.service
● exim4.service - LSB: exim Mail Transport Agent
   Loaded: loaded (/etc/init.d/exim4; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-04-11 12:47:05 CEST; 8s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 18598 ExecStop=/etc/init.d/exim4 stop (code=exited, status=0/SUCCESS)
  Process: 18889 ExecStart=/etc/init.d/exim4 start (code=exited, status=1/FAILURE)
sudo journalctl -xe
-- Unit exim4.service has finished shutting down.
Apr 11 12:47:05 SHIVAhoneypot systemd[1]: Starting LSB: exim Mail Transport Agent...
-- Subject: Unit exim4.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit exim4.service has begun starting up.
Apr 11 12:47:05 SHIVAhoneypot exim4[18889]:  * Starting MTA
Apr 11 12:47:05 SHIVAhoneypot exim4[18889]: 2018-04-11 12:47:05 Exim configuration error in line 30 of /var/lib/exim4/config.autogenerated.tmp:
Apr 11 12:47:05 SHIVAhoneypot exim4[18889]:   "daemon_smtp_ports" option set for the second time
Apr 11 12:47:05 SHIVAhoneypot exim4[18889]: Invalid new configfile /var/lib/exim4/config.autogenerated.tmp, not installing
Apr 11 12:47:05 SHIVAhoneypot exim4[18889]: /var/lib/exim4/config.autogenerated.tmp to /var/lib/exim4/config.autogenerated
Apr 11 12:47:05 SHIVAhoneypot systemd[1]: exim4.service: Control process exited, code=exited status=1
Apr 11 12:47:05 SHIVAhoneypot sudo[18880]: pam_unix(sudo:session): session closed for user root
Apr 11 12:47:05 SHIVAhoneypot systemd[1]: Failed to start LSB: exim Mail Transport Agent.
-- Subject: Unit exim4.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit exim4.service has failed.
--
-- The result is failed.
Apr 11 12:47:05 SHIVAhoneypot systemd[1]: exim4.service: Unit entered failed state.
Apr 11 12:47:05 SHIVAhoneypot systemd[1]: exim4.service: Failed with result 'exit-code'.
Apr 11 12:47:41 SHIVAhoneypot sudo[19139]:     test : TTY=pts/0 ; PWD=/home/test/shiva-installer/shiva ; USER=root ; COMMAND=/bin/journalctl -xe
Apr 11 12:47:41 SHIVAhoneypot sudo[19139]: pam_unix(sudo:session): session opened for user root by root(uid=0)

And some logs from "Exim configuration error in line 30 of /var/lib/exim4/config.autogenerated.tmp"

exim_path = /usr/sbin/exim4

.ifndef CONFDIR
CONFDIR = /etc/exim4
.endif

daemon_smtp_ports=2500
daemon_smtp_ports=2500
daemon_smtp_ports=2500
daemon_smtp_ports=2500
daemon_smtp_ports=2500
daemon_smtp_ports=2500
daemon_smtp_ports=2500
UPEX4CmacrosUPEX4C = 1
##############################################

Tested on Ubuntu 16 LTS.

kont45 commented 6 years ago

Ok, I have a solution for other person. The ESIM4 should be installed before command "sudo sh setup_exim.sh" has been executed.

Tutorial: https://help.ubuntu.com/lts/serverguide/exim4.html

systemctl status exim4.service
● exim4.service - LSB: exim Mail Transport Agent
   Loaded: loaded (/etc/init.d/exim4; bad; vendor preset: enabled)
   Active: active (running) since Wed 2018-04-11 17:25:15 CEST; 23s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 7048 ExecStop=/etc/init.d/exim4 stop (code=exited, status=0/SUCCESS)
  Process: 7064 ExecStart=/etc/init.d/exim4 start (code=exited, status=0/SUCCESS)
    Tasks: 1
   Memory: 696.0K
      CPU: 140ms
   CGroup: /system.slice/exim4.service
           └─7316 /usr/sbin/exim4 -bd -q30m
b0nd commented 6 years ago

Yes, that is what the installation script suggests in the very beginning - https://github.com/shiva-spampot/shiva/blob/master/install.sh#L42 (exim4-daemon-light)

kont45 commented 6 years ago

@b0nd I didn't expect that. I'm using fresh Ubunt 16 LTS and when I executed this command (sudo ./setup_exim4.sh), the terminal doesn't show any error or message, that MTA is starting. Just nothing. Maybe it's a bug in code or something is missing.