I have a database (proprietary software wrapping postgres) running on a Ubuntu 20.04 VM, which comes with a python API to read and write into the database. For technical reasons, it's better to use the python API for read/write, and not direct SQL statements. Say there's only 1 table consisting of people and their birthdays:
id,name,birthday
1,sarah,21-10-2000
2,john,31-7-1998
3,elizabeth,18-3-2001
...
I'm able to use the python API + a cronjob that runs everyday to see whose birthday is upcoming in, say, 7 days. Here's the rub: the VM sits within a private corporate network, and I have the name of the mail server which is able to send but not receive, but no user or password associated with this VM (e.g. such as how devices like printers can be setup to send emails, but the printer will have no email address itself to send the email from).
I can easily find smtp
setups like the one from here which work fine when tested with throwaway gmail accounts, but seem to require non-empty AuthUser
and AuthPass
fields. I get dead.letter
appearing in the /home/<USER>
when I try to do ssmtp my_email_address@company.domain.com < test_email.txt
.
Fairly new to this, so I might not be using the correct vocabulary, but hopefully I've adequately described the desired behaviour.
I'm not married to ssmtp
either; any other lightweight MTA will do just fine.
msmtp
replacedssmtp
but either should work for you. You will need authentication to use Gmail as a relay to an external-to-Gmail address. Please don't take this as rudeness by saying "Just Google", but this search will help you identify some possible solutions for your situation – Chris Davies Feb 17 '21 at 09:31man msmtp
it looks like it's simply a case of not enabling authentication, and omitting the user/pass parameters. – Chris Davies Feb 17 '21 at 22:50msmtp
was a great idea, but after some tests unfortunately also insists on a valid email address to send from. omitting theuser
field results in aserver message: 501 5.1.7 Invalid address
error, even withauth
switched off (could be thatauth
just disables the need for a password?) – AndreyIto Feb 18 '21 at 00:43