Mysterious repeating process

This is a different way of looking at the problem I am chasing under previous post

ine the linked post I stated some of my conclusions but they are my conclusions not far


Sep 15 09:13:03 triggerfish postfix/sendmail[62113]: fatal: usage: sendmail [options]
Sep 15 09:18:03 triggerfish postfix/sendmail[62195]: fatal: usage: sendmail [options]
Sep 15 09:23:02 triggerfish postfix/sendmail[62541]: fatal: usage: sendmail [options]
Sep 15 09:26:18 triggerfish postfix/sendmail[62616]: fatal: chdir /var/spool/postfix: Permission denied
Sep 15 09:28:02 triggerfish postfix/sendmail[62662]: fatal: usage: sendmail [options]

this SEEMS to point at

CRON

postfix/sendmail[62113]: fatal: usage: sendmail [options]

repeats every five minutes. BUT my

crontab

is this

Code:
# /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.
# Rotate log files every hour, if necessary.
# Perform daily/weekly/monthly maintenance.
# Adjust the time zone if the CMOS clock keeps local time, as opposed to
# UTC time.  See adjkerntz(8) for details.


the
cron.d

is empty except for the

AT


whose content is

Code:
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
# See crontab(5) for field format.

the following error repeats every 10 minutes
postfix/sendmail[62616]: fatal: chdir /var/spool/postfix: Permission denied

permission to the

postfix
postfix/sendmail[62616]: fatal: chdir /var/spool/postfix: Permission denied

are obscenely open even for me



drwxrwxrwx 17 root wheel 512 May 13 22:24 postfix



when I list ocurances of that error I get

Code:
Sep 15 00:00:44 triggerfish postfix/sendmail[53441]: fatal: chdir /var/spool/postfix: Permission denied
Sep 15 00:06:15 triggerfish postfix/sendmail[53562]: fatal: chdir /var/spool/postfix: Permission denied
Sep 15 00:16:15 triggerfish postfix/sendmail[53728]: fatal: chdir /var/spool/postfix: Permission denied
Sep 15 00:36:15 triggerfish postfix/sendmail[54047]: fatal: chdir /var/spool/postfix: Permission denied
Sep 15 00:41:15 triggerfish postfix/sendmail[54123]: fatal: chdir /var/spool/postfix: Permission denied
Sep 15 01:16:15 triggerfish postfix/sendmail[54672]: fatal: chdir /var/spool/postfix: Permission denied
Sep 15 02:26:16 triggerfish postfix/sendmail[55756]: fatal: chdir /var/spool/postfix: Permission denied
Sep 15 03:36:16 triggerfish postfix/sendmail[56741]: fatal: chdir /var/spool/postfix: Permission denied
Sep 15 04:46:16 triggerfish postfix/sendmail[57683]: fatal: chdir /var/spool/postfix: Permission denied
Sep 15 05:56:17 triggerfish postfix/sendmail[58668]: fatal: chdir /var/spool/postfix: Permission denied
Sep 15 07:06:17 triggerfish postfix/sendmail[60204]: fatal: chdir /var/spool/postfix: Permission denied
Sep 15 08:16:18 triggerfish postfix/sendmail[61191]: fatal: chdir /var/spool/postfix: Permission denied
Sep 15 09:26:18 triggerfish postfix/sendmail[62616]: fatal: chdir /var/spool/postfix: Permission denied
Sep 15 10:36:37 triggerfish postfix/sendmail[63857]: fatal: chdir /var/spool/postfix: Permission denied
Sep 15 11:16:43 triggerfish postfix/sendmail[64595]: fatal: chdir /var/spool/postfix: Permission denied
Sep 15 11:46:37 triggerfish postfix/sendmail[65120]: fatal: chdir /var/spool/postfix: Permission denied







That leaves the recurring

postfix/sendmail[62113]: fatal: usage: sendmail [options]


my

mailer.conf


remains

Code:
sendmail /usr/local/sbin/sendmail
mailq /usr/local/sbin/sendmail
newaliases /usr/local/sbin/sendmail




which after reading this. https://forums.freebsd.org/threads/newaliases-1-not-doing-anything.90230/

this suggest that the correct
mailer.conf.

is suppose to be

Code:
Code:
# cat /etc/mail/mailer.conf
#
# mailer.conf for use with dma(8)
#
# 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

Could this be my "root" cause ?
 
tried some more. Tweaking permissions now have this


Code:
drwxrwxrwx   2 dma  postfix  512 Nov  1  2019 dma

which I believe is pretty much wide open

I still get the same error

Code:
dma[dma][69517]: can not create temp file in `/var/spool/dma': Permission denied


Mail ia work so is my best approach to get sleeping dogs lie ??
 
Thank for the response I had pretty much given up. I did as you said


Code:
drwxrwx---   2 root mail     512 Nov  1  2019 dma

unfortunately I still have the same error

Code:
Sep 30 21:13:03   dma[dma][20314]: can not create temp file in `/var/spool/dma': Permission denied



Like I said mail seems to be working just fine. so I am not losing sleep

again thanks !!
 
also check the permissions on /usr/libexec/dma — it should be mode 2555, owner root, group mail:
Code:
# ls -al /usr/libexec/dma
-r-xr-sr-x  1 root  mail  67808 Aug 27  2023 /usr/libexec/dma
this is known as "setgid mail"
 
My MTA is

POSTFIX



permissions on
Code:
/usr/libexec/dma


is

Code:
-r-xr-sr-x   1 root mail   68000 Dec 11  2024 dma
 
If your MTA is postfix then the default/etc/mail/mailer.conf is renamed to mailer.conf.bak and the new mailer.conf is placed in /usr/local/etc/mail/mailer.conf which point to the postfix sendmail

#
# 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

Then the default spool directory for postfix is

/var/spool/postfix
drwxr-xr-x 16 root wheel 512 Jul 31 09:43 postfix

And sub directories at /var/spool/postfix owned by postfix user
drwx------ 2 postfix wheel 512 Oct 1 11:16 active
drwx------ 2 postfix wheel 512 Oct 1 04:01 bounce
drwx------ 2 postfix wheel 512 Jul 31 09:43 corrupt
drwx------ 18 postfix wheel 512 Jan 21 2019 defer
drwx------ 18 postfix wheel 512 Jan 21 2019 deferred
drwx------ 2 postfix wheel 512 Jul 31 09:43 flush
drwx------ 2 postfix wheel 512 Jul 31 09:43 hold
drwx------ 2 postfix wheel 512 Oct 1 11:16 incoming
drwx-wx--- 2 postfix maildrop 512 Oct 1 05:30 maildrop
drwxr-xr-x 2 root postfix 512 Aug 31 2020 pid
drwx------ 2 postfix wheel 512 Aug 4 20:15 private
drwx--x--- 2 postfix maildrop 512 Aug 4 20:15 public
drwx------ 2 postfix wheel 512 Jul 31 09:43 saved
drwx------ 2 postfix wheel 512 Sep 30 15:01 trace

For your original question you have a cron job which is running on each 5 min and it's using sendmail with incorrect parameter.
 
this whole process and the different opinions I have gotten confused e completely. I the whole purpose of

DMA
. confuses me...

You have always been pretty consistent.. I know my mail system is a mess because I was using Maia Mailguard. whose death left me in a sinking row boat. which I keep bailed out . I had to send away my clients and now focus on myself.

One thing you said actually point to one of the root cause of my confusion other then my own stupidity

/usr/local/etc/mail/mailer.conf which point to the postfix sendmail

I had been operating under the belief that

POSTFIX r

replaced

SENDMAIL
 
If your MTA is postfix then the default/etc/mail/mailer.conf is renamed to mailer.conf.bak and the new mailer.conf is placed in /usr/local/etc/mail/mailer.conf which point to the postfix sendmail



Then the default spool directory for postfix is

/var/spool/postfix
drwxr-xr-x 16 root wheel 512 Jul 31 09:43 postfix

And sub directories at /var/spool/postfix owned by postfix user


For your original question you have a cron job which is running on each 5 min and it's using sendmail with incorrect parameter.
Ok the permission problem is solved. back to my other recurring error which appear to be CRON relatated even though I have no CRON running as documented in the beginning
grrr
 
/var/at/jobs

empty

/var/at/spool

empty

/var/cron/tabs/*

Code:
-rw-------  1 root wheel 153 Oct 23  2021 admin2
-rw-------  1 root wheel 153 Apr 17 09:07 jason
-rw-------  1 root wheel 196 Sep 15 09:45 root
-rw-------  1 root wheel 424 Nov 26  2024 vscan

/etc/cron.d/*

Code:
-rw-r--r--   1 root wheel   93 Sep 15 09:44 at

/etc/crontab

Code:
# /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.
# Rotate log files every hour, if necessary.
# Perform daily/weekly/monthly maintenance.
# Adjust the time zone if the CMOS clock keeps local time, as opposed to
# UTC time.  See adjkerntz(8) for details.
 
Ok, now take a look in each of those files and search which one is running on each 5 min
admin2
jason
root
vscan
at

If they run some script which invoke sendmail then take a look into the script. Also cron have ability to send mail (-m).

Code:
/etc/crontab          System crontab file
/etc/cron.d          Directory for optional/modularized system crontab files.
/etc/pam.d/cron          pam.conf(5) configuration file for cron
/usr/local/etc/cron.d  Directory for third-party  package  provided crontab files.
/var/cron/tabs          Directory for personal crontab files
 
first of all all the files start with

DO NOT EDIT THIS FILE - edit the master and reinstall.

but more to the what you asked all of these files have all of their lines are comments. (starting with #)
 
Back
Top