Score:0

Getting Debian to send email to a real address

gi flag

I'm running Debian on an old computer on my home network to do stuff like netatalk, dlna,...

I have a number of programmes I've written myself that can send e-mail using the credentials for my regular e-mail.

I've set up /etc/aliases so that all mail goes to root, but it would be better if it could go to my real e-mail address -- like my programmes do?

Is this possible?

I suppose I could write a programme to check root's mail, forward it, and delete it. But that seems like a bit of a crap workaround.

I see that something called exim is installed, but this seems to be for computers that have a domain name and are going to be SMTP servers themselves.

Score:1
za flag

Yes, you can bravely configure exim or postfix or even sendmail to do this. But there are several so called "simple" MTA: msmtp, ssmtp and probably there are others, which are designed exactly for this purpose: to allow server to send mails as all software would expect, yet without blowing out the complete general purpose MTA.

Also you need a real mail server and an account there, for example, Gmail will do the work. Configure the simple MTA (according to manuals) and voila.

Score:0
um flag

I personally use a script/tool for sending mail from the command line. something like this: https://github.com/mogaal/sendemail

with a tool like that you can use an external smtp server (like those from your ISP) to send out mail.

mforsetti avatar
tz flag
I don't think [mogaal/sendemail](https://github.com/mogaal/sendemail) project is still active/updated, I'd advise against using that and move to something else, e.g. [msmtp](https://marlam.de/msmtp/download/).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.