Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider supporting local sendmail rather than SMTP for email #5

Open
0xabu opened this issue Apr 3, 2024 · 2 comments · Fixed by #7
Open

Consider supporting local sendmail rather than SMTP for email #5

0xabu opened this issue Apr 3, 2024 · 2 comments · Fixed by #7
Assignees

Comments

@0xabu
Copy link

0xabu commented Apr 3, 2024

Thanks for taking on a modernisation of this tool!

I looked into using it, but I'm not too excited about duplicating my SMTP credentials in both the TrueNAS config and the YAML config for autobackup. It would probably not be a particularly big change to your code to take the formatted message and pipe it into a /usr/sbin/sendmail subprocess (somewhat like how the original version just pipes to mail). Have you considered that? Would you be open to a patch?

@ghan1t
Copy link
Owner

ghan1t commented Apr 3, 2024

Hi @0xabu
Thanks for the interest. I have tried to use the linux mail process from the original version but gave up trying to get it to work. I really don't know enough python or bash and ChatGPT was no help either ;-)
If you know how to, I would welcome a PR. Ideally it would support both options.

@ghan1t
Copy link
Owner

ghan1t commented Apr 3, 2024

I have looked in my notes and have found the reason why sendmail did not work. It was possible to use sendmail as root from within a python script, but it was not possible from inside a venv, from python or even from bash. If you activate the venv and execute (venv) # echo "script started" | mail -s "test" "root" it will return an error. If you know how to get it to work, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants