有人能帮我解决这个问题吗,我试图找出问题的根源,但没有成功,我试图重新安装 postfix 和 mailutils,但仍然有这个问题,如果有人能帮助我,请回复,我已经被这个问题困扰了超过 2.5 个小时!
carl@carlium:~$ sudo echo "This email confirms that Postfix is working" | mail -s "Testing Posfix" <mymail>@outlook.com
mail: Unknown command: account
mail: Unknown command: }
mail: Sending data to /usr/bin/msmtp failed: Cannot execute
mail: cannot send message: Cannot execute
答案1
尝试修复 ~/.mailrc 如下
set smtp-use-starttls
set ssl-verify=ignore
set smtp=smtp://smtp.gmail.com:587
set smtp-auth=login
set smtp-auth-user=$FROM_EMAIL_ADDRESS
set smtp-auth-password=$EMAIL_ACCOUNT_PASSWORD
set from="$FROM_EMAIL_ADDRESS($FRIENDLY_NAME)"