Bitdefender milter causing Sendmail restart failure

I needed to change the smart host setting for a Sendmail email server, so I edited /etc/mail/sendmail.mc and rebuilt /etc/mail/sendmail.cf with the m4 command. I then attempted to restart Sendmail, but it did not restart.

# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
# service sendmail restart
Redirecting to /bin/systemctl restart  sendmail.service
Job for sendmail.service failed because the control process exited with error code. See "systemctl status sendmail.service" and "journalctl -xe" for details.

When I issued a systemctl status sendmail.service command for further information, I saw the following:

# systemctl status sendmail.service
● sendmail.service - Sendmail Mail Transport Agent
   Loaded: loaded (/usr/lib/systemd/system/sendmail.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2016-08-18 15:40:49 EDT; 11s ago
  Process: 25578 ExecStart=/usr/sbin/sendmail -bd $SENDMAIL_OPTS $SENDMAIL_OPTARG (code=exited, status=78)
  Process: 25573 ExecStartPre=/etc/mail/make aliases (code=exited, status=0/SUCCESS)
  Process: 25570 ExecStartPre=/etc/mail/make (code=exited, status=0/SUCCESS)
 Main PID: 3394 (code=exited, status=0/SUCCESS)

Aug 18 15:40:49 moonpoint.com systemd[1]: Starting Sendmail Mail Transport A....
Aug 18 15:40:49 moonpoint.com sendmail[25578]: 554 5.0.0 /etc/mail/sendmail....d
Aug 18 15:40:49 moonpoint.com sendmail[25578]: NOQUEUE: SYSERR(root): /etc/m...d
Aug 18 15:40:49 moonpoint.com sendmail[25578]: NOQUEUE: SYSERR(root): InputF...y
Aug 18 15:40:49 moonpoint.com sendmail[25578]: 451 4.0.0 InputFilter BitDefe...y
Aug 18 15:40:49 moonpoint.com systemd[1]: sendmail.service: control process ...8
Aug 18 15:40:49 moonpoint.com systemd[1]: Failed to start Sendmail Mail Tran....
Aug 18 15:40:49 moonpoint.com systemd[1]: Unit sendmail.service entered fail....
Aug 18 15:40:49 moonpoint.com systemd[1]: sendmail.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

When I undid the changes I had made to sendmail.mc, the issue remained. When I used the journalctl command to check on the problem, I saw the following:

# journalctl -xe
-- 
-- Unit sendmail.service has failed.
-- 
-- The result is failed.
Aug 18 15:43:25 moonpoint.com systemd[1]: Dependency failed for Sendmail Mail Tr
-- Subject: Unit sm-client.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit sm-client.service has failed.
-- 
-- The result is dependency.
Aug 18 15:43:25 moonpoint.com systemd[1]: Job sm-client.service/start failed wit
Aug 18 15:43:25 moonpoint.com systemd[1]: Unit sendmail.service entered failed s
Aug 18 15:43:25 moonpoint.com systemd[1]: sendmail.service failed.
Aug 18 15:43:25 moonpoint.com polkitd[771]: Unregistered Authentication Agent fo
Aug 18 15:43:53 moonpoint.com sshd[25845]: Address 168.176.56.13 maps to wimax13
Aug 18 15:43:53 moonpoint.com sshd[25845]: Invalid user log from 168.176.56.13
Aug 18 15:43:53 moonpoint.com sshd[25845]: input_userauth_request: invalid user 
Aug 18 15:43:53 moonpoint.com sshd[25845]: pam_unix(sshd:auth): check pass; user
Aug 18 15:43:53 moonpoint.com sshd[25845]: pam_unix(sshd:auth): authentication f
Aug 18 15:43:55 moonpoint.com sshd[25845]: Failed password for invalid user log 
Aug 18 15:43:56 moonpoint.com sshd[25845]: Connection closed by 168.176.56.13 [p
lines 1490-1512/1512 (END)

When I tried checking the Sendmail queue with the mailq and sendmail -bp commands, I saw the following:

# mailq
/etc/mail/sendmail.cf: line 1747: XBitDefender: `=' expected
# sendmail -bp
/etc/mail/sendmail.cf: line 1747: XBitDefender: `=' expected
#

I tried a couple of smart host servers thinking at first that the attempted switch to another smart host server was causing the problem. But when I would recreate the sendmail.cf file from sendmail.mc and attempt to restart Sendmail, it would always fail.

# service sendmail restart
Redirecting to /bin/systemctl restart  sendmail.service
Job for sendmail.service failed because the control process exited with error code. See "systemctl status sendmail.service" and "journalctl -xe" for details.
# journalctl -xe
Aug 18 15:49:02 moonpoint.com sendmail[26157]: 451 4.0.0 InputFilter BitDefender
Aug 18 15:49:02 moonpoint.com sendmail[26157]: NOQUEUE: SYSERR(root): InputFilte
Aug 18 15:49:02 moonpoint.com systemd[1]: sendmail.service: control process exit
Aug 18 15:49:02 moonpoint.com systemd[1]: Failed to start Sendmail Mail Transpor
-- Subject: Unit sendmail.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit sendmail.service has failed.
-- 
-- The result is failed.
Aug 18 15:49:02 moonpoint.com systemd[1]: Dependency failed for Sendmail Mail Tr
-- Subject: Unit sm-client.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit sm-client.service has failed.
-- 
-- The result is dependency.
Aug 18 15:49:02 moonpoint.com systemd[1]: Job sm-client.service/start failed wit
Aug 18 15:49:02 moonpoint.com systemd[1]: Unit sendmail.service entered failed s
Aug 18 15:49:02 moonpoint.com systemd[1]: sendmail.service failed.
Aug 18 15:49:02 moonpoint.com polkitd[771]: Unregistered Authentication Agent fo
lines 1375-1397/1397 (END)

I found an Explanation of polkitd Unregistered Authentication Agent posting that indicated that the "Unregistered Authentication Agent" message wasn't likely the source of the problem. And after another attempt to restart Sendmail with what I believed was a reversion to the immediately prior version of sendmail.mc I didn't see that message when I issued the journalctl -xe command afterwards.

# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
# service sendmail restart
Redirecting to /bin/systemctl restart  sendmail.service
Job for sendmail.service failed because the control process exited with error code. See "systemctl status sendmail.service" and "journalctl -xe" for details.
# journalctl -xe
Aug 18 16:11:09 moonpoint.com sendmail[28537]: NOQUEUE: SYSERR(root): InputFilte
Aug 18 16:11:09 moonpoint.com systemd[1]: sendmail.service: control process exit
Aug 18 16:11:09 moonpoint.com systemd[1]: Failed to start Sendmail Mail Transpor
-- Subject: Unit sendmail.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit sendmail.service has failed.
-- 
-- The result is failed.
Aug 18 16:11:09 moonpoint.com systemd[1]: Dependency failed for Sendmail Mail Tr
-- Subject: Unit sm-client.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit sm-client.service has failed.
-- 
-- The result is dependency.
Aug 18 16:11:09 moonpoint.com systemd[1]: Job sm-client.service/start failed wit
Aug 18 16:11:09 moonpoint.com systemd[1]: Unit sendmail.service entered failed s
Aug 18 16:11:09 moonpoint.com systemd[1]: sendmail.service failed.
Aug 18 16:11:09 moonpoint.com polkitd[771]: Unregistered Authentication Agent fo
Aug 18 16:11:14 moonpoint.com dbus-daemon[709]: 'list' object has no attribute '

When I looked in the /var/log/messages file for any references to "InputFilte", which I saw in the NOQUEUE: SYSERR(root): InputFilte line, I saw the following:

# grep InputFilte /var/log/messages
Aug 18 15:40:19 moonpoint sendmail: 451 4.0.0 InputFilter BitDefender not defined: No such file or directory
Aug 18 15:40:49 moonpoint sendmail: 451 4.0.0 InputFilter BitDefender not defined: No such file or directory
Aug 18 15:42:33 moonpoint sendmail: 451 4.0.0 InputFilter BitDefender not defined: No such file or directory
Aug 18 15:43:25 moonpoint sendmail: 451 4.0.0 InputFilter BitDefender not defined: No such file or directory
Aug 18 15:49:02 moonpoint sendmail: 451 4.0.0 InputFilter BitDefender not defined: No such file or directory
Aug 18 15:55:23 moonpoint sendmail: 451 4.0.0 InputFilter BitDefender not defined: No such file or directory
Aug 18 15:59:12 moonpoint sendmail: 554 5.0.0 /etc/mail/sendmail.cf: line 90: unknown configuration line "Aug 18 15:55:23 moonpoint.com sendmail[26883]: 451 4.0.0 InputFilter BitDefender"
Aug 18 15:59:12 moonpoint sendmail: 554 5.0.0 /etc/mail/sendmail.cf: line 91: unknown configuration line "Aug 18 15:55:23 moonpoint.com sendmail[26883]: NOQUEUE: SYSERR(root): InputFilte"
Aug 18 15:59:12 moonpoint sendmail: 451 4.0.0 InputFilter BitDefender not defined: No such file or directory
Aug 18 16:04:41 moonpoint sendmail: 451 4.0.0 InputFilter BitDefender not defined: No such file or directory
Aug 18 16:11:09 moonpoint sendmail: 451 4.0.0 InputFilter BitDefender not defined: No such file or directory
#

At the end of the /etc/mail/sendmail.mc file were the following lines, which were placed there on July 30 when I installed BitDefender Free Antispam for Mail Servers (FRAMS) for managing spam and malware sent to users of the system via email.

dnl # Added by BitDefender, do not remove!
define(`_FFR_MILTER', `true')
INPUT_MAIL_FILTER(`BitDefender', `BitDefender, S=unix:/opt/BitDefender/var/run/bdmilterd.sock, F=T, T=S:60s;R:60s;E:10m')
dnl # End of added lines

I checked the referenced file; it was present, but zero bytes in size.

# ls -l /opt/BitDefender/var/run/bdmilterd.sock
srwxr-xr-x. 1 bitdefender bitdefender 0 Aug  2 10:21 /opt/BitDefender/var/run/bdmilterd.sock

I commented out the BitDefender lines by putting "dnl #" in front of the two lines that weren't comments to make them comment lines and then was able to successfully restart Sendmail after recreating the sendmail.cf file again with the m4 command.

# service sendmail restart
Redirecting to /bin/systemctl restart  sendmail.service
#

I was unable to connect to the web management port for BitDefender on port 8139, so I checked to see if the system was listening on that port and found it was not:

# netstat -an | grep 8139
#

The only error I saw in the BitDefender error log was from yesterday:

# cat /opt/BitDefender/var/log/error.log
08/17/2016 05:34:36 BDMOND ERROR: Daemon bdmaild is malfunctioning (0x8000000b -
 The specified entity does not exist). Attempting to recover...
#

The bdmailid file is at /opt/BitDefender/bin/bdmaild .

# ls -l /opt/BitDefender/bin/bdmaild
-rwxr-xr-x. 1 bitdefender bitdefender 186552 Feb  3  2016 /opt/BitDefender/bin/bdmaild
#

I tried starting the BitDefender FRAMS software and it started without any error messages:

# /opt/BitDefender/bin/bd start
Starting BitDefender Registry: 
Starting BitDefender Logger: 
Starting BitDefender Scanning Engine: 
Starting BitDefender Mail Daemon: 
Starting BitDefender SNMP Daemon: 
Starting BitDefender Monitor: 
Starting BitDefender Live! Update: 
Starting BitDefender Milter agent:
#

However, when I uncommented the BitDefender lines in /etc/mail/sendmail.mc, rebuilt the sendmail.cf file and attempted to restart sendmail, I again saw an error message.

# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
# service sendmail restart
Redirecting to /bin/systemctl restart  sendmail.service
Job for sendmail.service failed because the control process exited with error code. See "systemctl status sendmail.service" and "journalctl -xe" for details.
#

When I issued the journalctl -xe command, I saw the following:

# journalctl -xe
                                            
                                            *****  Plugin catchall_boolean (89.3
                                            
                                            If you want to allow httpd to unifie
                                            Then you must tell SELinux about thi
                                            You can read 'None' man page for mor
                                            Do
                                            setsebool -P httpd_unified 1
                                            
                                            *****  Plugin catchall (11.6 confide
                                            
                                            If you believe that perl should be a
                                            Then you should report this as a bug
                                            You can generate a local policy modu
                                            Do
                                            allow this access for now by executi
                                            # grep blosxom /var/log/audit/audit.
                                            # semodule -i mypol.pp
                                            
Aug 18 17:07:02 moonpoint.com setroubleshoot[1553]: received signal=14
Aug 18 17:07:02 moonpoint.com setroubleshoot[1553]: KeyboardInterrupt in RunFaul
Aug 18 17:07:02 moonpoint.com setroubleshoot[1553]: writing database (/var/lib/s
Aug 18 17:07:03 moonpoint.com dbus-daemon[709]: 'list' object has no attribute '
lines 1656-1678/1678 (END)

I still didn't see FRAMS listening on the web management port, though when I checked the status, I didn't see any indication of a problem.

# netstat -an | grep 8139
# /opt/BitDefender/bin/bd status
BitDefender Registry (bdregd) (pid(s) 2246) running... for 16d 6h 50m 31s
BitDefender Logger (bdlogd) (pid(s) 1310) running... for 0d 0h 7m 1s
BitDefender Monitor (bdmond) (pid(s) 3283) running... for 16d 6h 49m 25s
BitDefender Scanning Engine (bdscand) (pid(s) 2607) running... for 16d 6h 50m 29s
BitDefender Live! Update (bdlived) (pid(s) 3294) running... for 16d 6h 49m 25s
BitDefender Mail Daemon (bdmaild) (pid(s) 1317) running... for 0d 0h 7m 0s
BitDefender SNMP Daemon (bdsnmpd) (pid(s) 3271) running... for 16d 6h 49m 26s
BitDefender Milter agent (bdmilterd) (pid(s) 3312) running... for 16d 6h 49m 25s
#

I changed the smart host server line in the sendmail.mc file and rebuilt the sendmail.cf file, then restarted sendmail without any error messages.

I uncommented the Bitdefender lines again, rebuilt sendmail.mc and attempted again to restart sendmail. Again, I encounted a problem and sendmail would not restart.

# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
# service sendmail restart
Redirecting to /bin/systemctl restart  sendmail.service
Job for sendmail.service failed because the control process exited with error code. See "systemctl status sendmail.service" and "journalctl -xe" for details.
# journalctl -xe
Aug 18 19:22:05 moonpoint.com sendmail[13705]: 451 4.0.0 InputFilter BitDefender
Aug 18 19:22:05 moonpoint.com sendmail[13705]: NOQUEUE: SYSERR(root): InputFilte
Aug 18 19:22:05 moonpoint.com systemd[1]: sendmail.service: control process exit
Aug 18 19:22:05 moonpoint.com systemd[1]: Failed to start Sendmail Mail Transpor
-- Subject: Unit sendmail.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit sendmail.service has failed.
-- 
-- The result is failed.
Aug 18 19:22:05 moonpoint.com systemd[1]: Dependency failed for Sendmail Mail Tr
-- Subject: Unit sm-client.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit sm-client.service has failed.
-- 
-- The result is dependency.
Aug 18 19:22:05 moonpoint.com systemd[1]: Job sm-client.service/start failed wit
Aug 18 19:22:05 moonpoint.com systemd[1]: Unit sendmail.service entered failed s
Aug 18 19:22:05 moonpoint.com systemd[1]: sendmail.service failed.
Aug 18 19:22:05 moonpoint.com polkitd[771]: Unregistered Authentication Agent fo
lines 1479-1501/1501 (END)

I removed all of the Bitdefender lines from the end of /etc/mail/sendmail.mc, rebuilt sendmail.mc and restarted it successfully. I then issued the bdsafe agent integrate milter command followed by bdsafe agent enable milter. I then restarted the FRAMS software with bd restart. After that I was able to successfully restart sendmail with service sendmail restart.

DJI Phantom 3 Drone
# /opt/BitDefender/bin/bdsafe agent integrate milter
Looking for installation in '/etc/mail' ...
Checking if the file '/etc/mail/sendmail.cf' exists...
It does.
Checking if the file '/etc/mail/sendmail.mc' exists...
It does.
Found installation at /etc/mail
Skipping backup of /etc/mail/sendmail.cf; /etc/mail/sendmail.cf.backup-BD exists already!
Ok, the file is now cleaned up
Skipping backup of /etc/mail/sendmail.mc; /etc/mail/sendmail.mc.backup-BD exists already!
Trying to send SIGHUP to any running sendmail instances
An attempt to send SIGHUP to sendmail was made, but in some cases is necessary to restart manually!
Now you must also restart BitDefender.
# /opt/BitDefender/bin/bdsafe agent enable milter
# /opt/BitDefender/bin/bd restart
Shutting down BitDefender Milter agent:                    [  OK  ]
Shutting down BitDefender Live! Update:                    [  OK  ]
Shutting down BitDefender Monitor:                         [  OK  ]
Shutting down BitDefender SNMP Daemon:                     [  OK  ]
Shutting down BitDefender Scanning Engine:                 [  OK  ]
Shutting down BitDefender Mail Daemon:                     [  OK  ]
Shutting down BitDefender Logger:                          [  OK  ]
Shutting down BitDefender Registry:                        [  OK  ]
Starting BitDefender Registry:                             [  OK  ]
Starting BitDefender Logger:                               [  OK  ]
Starting BitDefender Scanning Engine:                      [  OK  ]
Starting BitDefender Mail Daemon:                          [  OK  ]
Starting BitDefender SNMP Daemon:                          [  OK  ]
Starting BitDefender Monitor:                              [  OK  ]
Starting BitDefender Live! Update:                         [  OK  ]
Starting BitDefender Milter agent:                         [  OK  ]
# service sendmail start
Redirecting to /bin/systemctl start  sendmail.service
#

When I checked the /etc/mail/sendmail.mc afterwards, I found the following lines had been added to the end of the file:

dnl # Added by BitDefender, do not remove!
define(`_FFR_MILTER', `true')
INPUT_MAIL_FILTER(`BitDefender', `BitDefender, S=unix:/opt/BitDefender/var/run/bdmilterd.sock, F=T, T=S:60s;R:60s;E:10m')
dnl # End of added lines

The lines looked exactly the same as what had been there previously. And the bdmilterd.sock file was still zero bytes in size:

# ls -l /opt/BitDefender/var/run/bdmilterd.sock
srwxr-xr-x. 1 bitdefender bitdefender 0 Aug 18 19:35 /opt/BitDefender/var/run/bdmilterd.sock

So I'm not certain what changed that now allows sendmail to successfully start where it would not previously, but removing the lines it had added to sendmail.mc and then reintegratign the Bitdefender mail filter, aka milter with Sendmail allowed me to get beyond the problem.

 

TechRabbit ad 300x250 newegg.com

Justdeals Daily Electronics Deals1x1 px