getting error postfix/sendmail: fatal: usage: sendmail [options]. Its BACCCK

Ok I haver had two posts on this matter. Why is sendmail sending me messages. (which is solved ) and getting error postfix/sendmail: fatal: usage: sendmail [options].
ethic has re-emerged even though
Postfix . works fine except for throwing this error every 5 minutes.

My

mailer.conf


(in both locations) is

sendmail /usr/local/sbin/sendmail
send-mail /usr/local/sbin/sendmail
mailq /usr/local/sbin/sendmail
newaliases /usr/local/sbin/sendmail

and when I run

newaliases


I get no errors
Checked our Cron schedule and I have nothing .

As far as I can tell my mail system is working fine. Do I just grin and bear?
 
Ok. Ifor info have addressed this in several threads



As to te log


pr 16 12:12:00 triggerfish dovecot[27628]: imap-login: Login: user=<admin@theoceanwindow.com>, method=PLAIN, rip=69.142.122.175, lip=209.160.65.133, mpid=76453, TLS, session=<EJKOi+cyP+tFjnqv>
Apr 16 12:12:00 triggerfish dovecot[27628]: imap-login: Login: user=<jason@kasdivi.com>, method=PLAIN, rip=69.142.122.175, lip=209.160.65.133, mpid=76455, TLS, session=<wLCRi+cyQOtFjnqv>
Apr 16 12:12:36 triggerfish sshd[76456]: Invalid user from 64.62.156.34 port 32267
Apr 16 12:12:40 triggerfish sshd[76456]: Connection closed by invalid user 64.62.156.34 port 32267 [preauth]
Apr 16 12:12:56 triggerfish dovecot[27628]: imap-login: Login: user=<jason@theoceanwindow.com>, method=PLAIN, rip=69.142.122.175, lip=209.160.65.133, mpid=76460, TLS, session=<M/7fjucyRetFjnqv>
Apr 16 12:12:56 triggerfish dovecot[27628]: imap-login: Login: user=<admin@theoceanwindow.com>, method=PLAIN, rip=69.142.122.175, lip=209.160.65.133, mpid=76461, TLS, session=<Zf3fjucyRutFjnqv>
Apr 16 12:13:02 triggerfish postfix/sendmail[76506]: fatal: usage: sendmail [options]
Apr 16 12:14:11 triggerfish dovecot[27628]: imap-login: Login: user=<jason@theoceanwindow.com>, method=PLAIN, rip=69.142.122.175, lip=209.160.65.133, mpid=76525, TLS, session=<4FNdk+cye/9Fjnqv>
Apr 16 12:14:11 triggerfish dovecot[27628]: imap-login: Login: user=<admin@theoceanwindow.com>, method=PLAIN, rip=69.142.122.175, lip=209.160.65.133, mpid=76526, TLS, session=<41Ndk+cyef9Fjnqv>
Apr 16 12:14:11 triggerfish dovecot[27628]: imap-login: Login: user=<jason@kasdivi.com>, method=PLAIN, rip=69.142.122.175, lip=209.160.65.133, mpid=76527, TLS, session=<NJ1dk+cyev9Fjnqv>
Apr 16 12:14:11 triggerfish dovecot[27628]: imap(jason@theoceanwindow.com)<76525><4FNdk+cye/9Fjnqv>: Disconnected: Logged out in=36 out=556 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Apr 16 12:14:11 triggerfish dovecot[27628]: imap(admin@theoceanwindow.com)<76526><41Ndk+cyef9Fjnqv>: Disconnected: Logged out in=36 out=556 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Apr 16 12:14:11 triggerfish dovecot[27628]: imap(jason@kasdivi.com)<76527><NJ1dk+cyev9Fjnqv>: Disconnected: Logged out in=36 out=556 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Apr 16 12:14:12 triggerfish dovecot[27628]: imap-login: Disconnected: Connection closed (no auth attempts in 0 secs): user=<>, rip=64.62.156.188, lip=209.160.65.133, session=<GoFyk+cygR1APpy8>
Apr 16 12:14:25 triggerfish dovecot[27628]: imap-login: Disconnected: Connection closed (no auth attempts in 0 secs): user=<>, rip=64.62.156.188, lip=209.160.65.133, TLS: Connection closed, session=<GKM2lOcy4V9APpy8>
Apr 16 12:14:58 triggerfish sshguard[2494]: 60.243.188.78: unblocking after 436 secs
Apr 16 12:14:58 triggerfish sshguard[2494]: 220.246.46.166: unblocking after 423 secs
Apr 16 12:15:13 triggerfish dovecot[27628]: imap-login: Disconnected: Too many invalid commands (no auth attempts in 0 secs): user=<>, rip=64.62.156.185, lip=209.160.65.133, session=<eAUMl+cyk8JAPpy5>
Apr 16 12:18:02 triggerfish postfix/sendmail[76568]: fatal: usage: sendmail [options]
 
a lot of stuff

/usr/local/etc/postfix/aliases:# updated with "newaliases" or with "sendmail -bi".
/usr/local/etc/postfix/aliases.sample:# updated with "newaliases" or with "sendmail -bi".
/usr/local/etc/postfix/bounce.cf.default:# The verify template is used for address verification (sendmail -bv
/usr/local/etc/postfix/bounce.cf.default:# address...) or for verbose mail delivery (sendmail -v address...).
/usr/local/etc/postfix/main,055bad:# are built with "newaliases" or "sendmail -bi". This is a separate
/usr/local/etc/postfix/main,055bad:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main,055bad:# sendmail_path: The full pathname of the Postfix sendmail command
/usr/local/etc/postfix/main,055bad:sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.0224:# are built with "newaliases" or "sendmail -bi". This is a separate
/usr/local/etc/postfix/main.0224:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.0224:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.0224:sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.03262025:# are built with "newaliases" or "asendmail -bi". This is a separate
/usr/local/etc/postfix/main.03262025:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.03262025:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.03262025:#sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.0415:# are built with "newaliases" or "sendmail -bi". This is a separate
/usr/local/etc/postfix/main.0415:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.0415:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.0415:sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.0512am:# are built with "newaliases" or "sendmail -bi". This is a separate
/usr/local/etc/postfix/main.0512am:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.0512am:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.0512am:sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.0516:# are built with "newaliases" or "sendmail -bi". This is a separate
/usr/local/etc/postfix/main.0516:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.0516:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.0516:sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.112724:# are built with "newaliases" or "asendmail -bi". This is a separate
/usr/local/etc/postfix/main.112724:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.112724:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.112724:#sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.120524:# are built with "newaliases" or "asendmail -bi". This is a separate
/usr/local/etc/postfix/main.120524:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.120524:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.120524:#sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.2172025:# are built with "newaliases" or "asendmail -bi". This is a separate
/usr/local/etc/postfix/main.2172025:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.2172025:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.2172025:#sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.555:# are built with "newaliases" or "sendmail -bi". This is a separate
/usr/local/etc/postfix/main.555:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.555:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.555:sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.614:# are built with "newaliases" or "sendmail -bi". This is a separate
/usr/local/etc/postfix/main.614:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.614:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.614:sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.Nokas:# are built with "newaliases" or "sendmail -bi". This is a separate
/usr/local/etc/postfix/main.Nokas:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.Nokas:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.Nokas:sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.bad7:# are built with "newaliases" or "sendmail -bi". This is a separate
/usr/local/etc/postfix/main.bad7:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.bad7:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.bad7:sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.cf:# are built with "newaliases" or "asendmail -bi". This is a separate
/usr/local/etc/postfix/main.cf:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.cf:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.cf:#sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.cf.default:sendmail_fix_line_endings = always
/usr/local/etc/postfix/main.cf.default:sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.cf.default:smtputf8_autodetect_classes = sendmail, verify
/usr/local/etc/postfix/main.cf.old:# are built with "newaliases" or "sendmail -bi". This is a separate
/usr/local/etc/postfix/main.cf.old:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.cf.old:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.cf.old:sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.cf.sample:# are built with "newaliases" or "sendmail -bi". This is a separate
/usr/local/etc/postfix/main.cf.sample:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.cf.sample:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.cf.sample:sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.cf0510:# are built with "newaliases" or "sendmail -bi". This is a separate
/usr/local/etc/postfix/main.cf0510:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.cf0510:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.cf0510:sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.cfx:# are built with "newaliases" or "sendmail -bi". This is a separate
/usr/local/etc/postfix/main.cfx:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.cfx:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.cfx:sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.dec24:# are built with "newaliases" or "asendmail -bi". This is a separate
/usr/local/etc/postfix/main.dec24:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.dec24:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.dec24:#sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.good:# are built with "newaliases" or "sendmail -bi". This is a separate
/usr/local/etc/postfix/main.good:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.good:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.good:sendmail_path = /usr/local/sbin/sendmail
/usr/local/etc/postfix/main.spam:# are built with "newaliases" or "sendmail -bi". This is a separate
/usr/local/etc/postfix/main.spam:# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
/usr/local/etc/postfix/main.spam:# sendmail_path: The full pathname of the Postfix sendmail command.
/usr/local/etc/postfix/main.spam:sendmail_path = /usr/local/sbin/sendmail
 
you have cron job running each 5 min.
Apr 16 12:13:02 triggerfish postfix/sendmail[76506]: fatal: usage: sendmail [options]
Apr 16 12:18:02 triggerfish postfix/sendmail[76568]: fatal: usage: sendmail [options]

Checked our Cron schedule and I have nothing .
Check again or show us the cron tabs including "at" jobs so we can check instead of you.
 
I will admit note being the sharpest stick in the lot I babe been using webmin as a crutch. But checking it and the actual /etc/crontan. I still get

# /etc/crontab - root's crontab for FreeBSD
#
#
SHELL=/bin/tcsh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
#
#minute hour mday month wday who command
#
# Save some entropy so that /dev/random can re-seed on boot.
# */11 * * * * operator /usr/libexec/save-entropy
#
# Rotate log files every hour, if necessary.
0 * * * * root newsyslog
#
# Perform daily/weekly/monthly maintenance.
1 3 * * * root periodic daily
15 4 * * 6 root periodic weekly
30 5 1 * * root periodic monthly
#
# Adjust the time zone if the CMOS clock keeps local time, as opposed to
# UTC time. See adjkerntz(8) for details.
1,31 0-5 * * * root adjkerntz -a
I don't see anything running at 5 minute intervals.
 
Code:
@daily /usr/libexec/locate.updatedb #locate
# @monthly /usr/local/bin/certbot renew
@daily /usr/local/bin/sa-update && /usr/local/sbin/service sa-spamd restart
# 4 15 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null
 
What you have in /etc/cron.d directory and in your user cron tabs. Also check the at(1) jobs folder

/etc/crontab System crontab file
/etc/cron.d Directory for optional/modularized system crontab files.
/var/cron/tabs Directory for personal crontab files

/var/at/jobs directory containing job files
/var/at/spool directory containing output spool files
 
Ok this may be a backward. approach but ..I have seen similar errors when I had the system have cron trying to execute. a command that didn't work (this time before was cron send an error message to mailbox that was full)
I checked the commands executed by crontab and
Code:
usr/local/sbin/service sa-spamd restart
errors. So I disabled that task in

Cron
. but the error still occurs

I tried to what you said but kind of bombed out on the first

the system crontab file is

Code:
====line 1 col 0 lines from top 1 ============================================
# /etc/crontab - root's crontab for FreeBSD
#
#
SHELL=/bin/tcsh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
#
#minute hour    mday    month   wday    who     command
#
# Save some entropy so that /dev/random can re-seed on boot.
# */11 * * * * operator /usr/libexec/save-entropy
#
# Rotate log files every hour, if necessary.
0       *       *       *       *       root    newsyslog
#
# Perform daily/weekly/monthly maintenance.
1       3       *       *       *       root    periodic daily
15      4       *       *       6       root    periodic weekly
30      5       1       *       *       root    periodic monthly
#
# Adjust the time zone if the CMOS clock keeps local time, as opposed to
# UTC time.  See adjkerntz(8) for details.
1,31    0-5     *       *       *       root    adjkerntz -a

As far as I can understand I donthace anything running
 
rename sendmail sendmail.bin
put this script (make it mod 0755) in place of sendmail
watch /var/tmp/catch.log and will show you who runs sendmail and with what args
sh:
#!/bin/sh
PPID=$(ps -o ppid -p $$ |tail -1)
CMD=$(ps -p $PPID -o args |tail -1)
D=$(date '+%Y-%m-%d %H:%M:%S')
echo "$D $CMD launched sendmail with args ($@)" >>/var/tmp/catch.log
exec /usr/local/sbin/sendmail.bin "$@"
LE: changed /var/log to /var/tmp as maybe sendmail is not run as root
 
Ok followed your approach. I think I got it step by step but that new log (/var/tmp/catch.log)remains empty even though the recurring error appears again
 
Back
Top