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
|

|
|

Le 18/12/2024 à 07:05, Michael Newman via macports-users a écrit :
If I should ask this elsewhere, please let me know:

I have logwatch running on a Raspberry Pi which works just fine. However, I'm having trouble getting logwatch on a Mac to send the results via email.

On both the Mac and the Pi I'm using MSMTP as an SMTP client. They are configured identically with gmail as the relay host.

On the Pi I use the following in the config file:

|mailer = "/usr/sbin/sendmail -t" |

If I use the same on the Mac, it appears to work with no error message, but the mail never gets delivered. There are no error messages in the msmtp log.

I know logwatch is working because if I use:

|Sellotape:conf mnewman$ sudo logwatch --output stdout |

I get:

|################### Logwatch 7.11 (07/22/24) #################### Processing Initiated: Wed Dec 18 12:43:29 2024 Date Range Processed: yesterday ( 2024-Dec-17 ) Period is day. Detail Level of Output: 5 Type of Output/Format: stdout / text Logfiles for Host: Sellotape.local ################################################################## <snip> |

Sending mail from the Mac on the command line works just fine:

|Sellotape:~ mnewman$ mail m...@mac.com Subject: hi mac done . EOT |
|Sellotape:~ mnewman$ cat .msmtp.log Dec 18 12:50:18 host=smtp.gmail.com tls=on auth=on user=me from=m...@gmail.com recipients=m...@mac.com mailsize=178 smtpstatus=250 smtpmsg='250 2.0.0 OK 1734501018 98e67ed59e1d1- 2f2ed644980sm487477a91.26 - gsmtp' exitcode=EX_OK |

What have I done wrong to keep logwatch from sending results via email?


Reply via email to