Solved getting error postfix/sendmail: fatal: usage: sendmail [options]

I am running postfix 3.6. on FreeBSD 14.1. I had some issues during the upgrade from FreeBSD 13.2

After some tweaking I have my mail system running fine except. this error

Code:
 postfix/sendmail[57102]: fatal: usage: sendmail [options]
I have sendmail disable. I have no idea who or what is calling it. Thoughts and Prayers would be appreciated
 
sendmail_enable="NONE" # Run the sendmail inbound daemon (YES/NO/NONE).
# If NONE, don't start any sendmail processes.

sysrc sendmail_enable="NONE"
sysrc sendmail_submit_enable=NO
sysrc sendmail_outbound_enable=NO
sysrc sendmail_msp_queue_enable=NO

Create and edit /etc/periodic.conf file:

Add these lines to the file:

daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
 
Make sure you also copy postfix's mailer.conf to /etc/mail/mailer.conf.
 
On my old postfix server my /etc/mail/mailer.conf is rename with .old back in 2017 and i have no idea why :)
But i have/usr/local/etc/mail/mailer.conf with:
#
# Execute the Postfix sendmail program, named /usr/local/sbin/sendmail
#
sendmail /usr/local/sbin/sendmail
send-mail /usr/local/sbin/sendmail
mailq /usr/local/sbin/sendmail
newaliases /usr/local/sbin/sendmail

Also my main.cf is pointing to:
sendmail_path = /usr/local/sbin/sendmail
 
mailer.conf is important, because /usr/sbin/sendmail is earlier in your PATH, to fix that mailwrapper(8) is used, which uses the executables set in mailer.conf.
 
passing through my question with /etc. as compared to /usr/local/etc.

my

/etc/mail/mailer.conf

is
#
#sendmail /usr/libexec/sendmail/sendmail
#mailq /usr/libexec/sendmail/sendmail
#newaliases /usr/libexec/sendmail/sendmail
#hoststat /usr/libexec/sendmail/sendmail
#purgestat /usr/libexec/sendmail/sendmail
sendmail /usr/local/sbin/sendmail
send-mail /usr/local/sbin/sendmail
mailq /usr/local/sbin/sendmail
newaliases /usr/local/sbin/sendmail
# If sendmail is configured, an example of mailer.conf that uses sendmail
# instead can be found in /usr/share/examples/sendmail
sendmail /usr/libexec/dma
mailq /usr/libexec/dma
newaliases /usr/libexec/dma

my

/usr/local/etc/mail/mailer.conf

is

# Execute the Postfix sendmail program, named /usr/local/sbin/sendmail
#
sendmail /usr/local/sbin/sendmail
mailq /usr/local/sbin/sendmail
newaliases /usr/local/sbin/sendmail

The postfix seem to be behaving but I copied the

/etc

version to the

/usr/local/etc
 
When you want to generate new aliases.db file.
You have newaliases pointing to /usr/libexec/dma instead to the postfix sendmail version.

mailer.conf(5)

I already give you the example of the content of /usr/local/etc/mail/mailer.conf in my previous post.
 
ahhhhh OK way above me. got the error message stopped. postfix appears to to be pretty much working. Thanks for your help again
 
just for information. I copied from the port info


/etc/mail/mailer.conf now






sendmail %%PREFIX%%/sbin/sendmail
send-mail %%PREFIX%%/sbin/sendmail
mailq %%PREFIX%%/sbin/sendmail
newaliases %%PREFIX%%/sbin/sendmail



no errors so I guess REALLY solved
 
port prefix is replaced with /usr/local you can't use %%PREFIX%% in the file.

Set it like this:
#
# Execute the Postfix sendmail program, named /usr/local/sbin/sendmail
#
sendmail /usr/local/sbin/sendmail
send-mail /usr/local/sbin/sendmail
mailq /usr/local/sbin/sendmail
newaliases /usr/local/sbin/sendmail
 
Back
Top