Sorry - Another Logwatch Question
Michael Newman
mgnewman at mac.com
Fri Dec 20 02:15:50 UTC 2024
Thanks to Fabien for the detailed analysis of mail.
I thought I had everything sorted because I was able to run logwatch from the command line and have it send the report via email. So, I know email is working.
However, I did not receive the expected email this morning. So, something is still amiss.
On the Rasperry Pi the installation of logwatch automatically creates a cron job that runs every morning. (Why they use cron rather than systemd is beyond me.)
After looking at the logwatch port file it appears that it creates a startup item in LaunchDaemons.
However, I can find nothing for logwatch in either /library/launchdaemons or /system/library/launchdaemons
I have run "sudo port load logwatch" several times in the past but that didn’t seem to do the trick.
I have struggled my way through this part of the port file:
# startup item
file mkdir ${destroot}${prefix}/etc/LaunchDaemons/${name}
file copy ${filespath}/org.macports.${name}.plist ${destroot}${prefix}/etc/LaunchDaemons/${name}/org.macports.${name}.plist
reinplace s|@PREFIX@|${prefix}|g ${destroot}${prefix}/etc/LaunchDaemons/${name}/org.macports.${name}.plist
}
However, I don’t really understand this code and can’t find where things like destroot, prefix and filespath are defined. (I did manage to find out that name is “logwatch”.)
So, I’m still stuck and wondering whether or not this is worth the trouble. (It was so easy on the Pi.) The report produced by the Mac version of Logwatch is nowhere near as detailed or useful as the Raspberry Pi version. I suppose that’s because the log files on the Mac tend to be all over the place.
Mike
> On Dec 19, 2024, at 19:00,fabien.aurejac at gmail.com <mailto:fabien.aurejac at gmail.com> wrote:
> Hello, sendmail is an interface to postfix, which appears to be on macOS
> under /usr/sbin/postfix
> the postfix configuration on macOS is under /etc/postfix
>
> according to this post
> (https://serverfault.com/questions/1032682/how-to-configure-postfix-to-relay-everything-on-macos),
> you may try to change sendmail path to
>
> |/path/of/msmtp -t -i ||with the path replaced by the one obtained with the command: which
> msmtp |||
>
> |The needed input may be different between sendmail and mail command.
> But it seems it's not the case between msmtp and sendmail. And I think
> your |MSMTP configuration may not be linked to postfix.
>
> |You may also try to take a look at this post
> https://stackoverflow.com/questions/56937988/how-to-get-usr-bin-mail-to-send-mail-via-gmail-on-mac-10-14|
>
> |Also when it comes to google mail with two factors auth, there are
> sometimes problems, but I think you disabled 2FA since you are able to
> send from the mail command.|
>
> |Good luck
> |
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20241220/b67fe91e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1370 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20241220/b67fe91e/attachment.bin>
More information about the macports-users
mailing list