Skip to contentSkip to conversation

Sending mail from embedded device

DISCUSSION Gary Thomas 6 participants 12 messages Aug 6, 2013 – Aug 8, 2013

lore
Share & tools
lore
#0 lore raw

My embedded device needs to send out email.

I've looked around a bit and I don't see any recipes for a mail sender, e.g. sendmail or postfix, for Yocto (OE-core).

Have I missed something? Does anyone have any suggestions?

Surely my application isn't the first that wants to send email...

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#1 lore raw
Quoted 9 lines · Gary Thomas

My embedded device needs to send out email.

I've looked around a bit and I don't see any recipes for a mail sender, e.g. sendmail or postfix, for Yocto (OE-core).

Have I missed something? Does anyone have any suggestions?

Surely my application isn't the first that wants to send email...

Would recipes-extended/msmtp do the job? Do you need to run the whole mail stack or is pushing out emails to an smtp server adequate?

Signature · 5 lines
  Jack Mitchell ([email protected])
  Embedded Systems Engineer
  Cambrideshire, UK
  http://www.embed.me.uk
--
#2 lore raw
Quoted 6 lines · Jack Mitchell
Quoted 5 lines · Gary Thomas

My embedded device needs to send out email.

I've looked around a bit and I don't see any recipes for a mail sender, e.g. sendmail or postfix, for Yocto (OE-core).

Quoted 8 lines
Quoted 4 lines

Have I missed something? Does anyone have any suggestions?

Surely my application isn't the first that wants to send email...

Would recipes-extended/msmtp do the job? Do you need to run the whole mail stack or is pushing out emails to an smtp server adequate?

msmtp is provided specifically to be able to send email out. It should produce a binary called "sendmail" that is capable of simply sending email (and conforming to LSB requirements.)

--Mark

#10 lore raw
In reply to Jack Mitchell
Quoted 6 lines · Jack Mitchell
Quoted 5 lines · Gary Thomas

My embedded device needs to send out email.

I've looked around a bit and I don't see any recipes for a mail sender, e.g. sendmail or postfix, for Yocto (OE-core).

Quoted 8 lines
Quoted 4 lines

Have I missed something? Does anyone have any suggestions?

Surely my application isn't the first that wants to send email...

Would recipes-extended/msmtp do the job? Do you need to run the whole mail stack or is pushing out emails to an smtp server adequate?

Duh, I got so hung up looking for "mail" things, I didn't think to look for SMTP...

I think this may be sufficient for my needs, thanks.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#3 lore raw
In reply to Mark Hatle
Quoted 16 lines · Mark Hatle
Quoted 6 lines · Jack Mitchell
Quoted 5 lines · Gary Thomas

My embedded device needs to send out email.

I've looked around a bit and I don't see any recipes for a mail sender, e.g. sendmail or postfix, for Yocto (OE-core).

Quoted 8 lines
Quoted 4 lines

Have I missed something? Does anyone have any suggestions?

Surely my application isn't the first that wants to send email...

Would recipes-extended/msmtp do the job? Do you need to run the whole mail stack or is pushing out emails to an smtp server adequate?

Quoted 5 lines

msmtp is provided specifically to be able to send email out. It should produce a binary called "sendmail" that is capable of simply sending email (and conforming to LSB requirements.)

--Mark

Colour me impressed, I didn't realise it was also a drop-in for sendmail.

Signature · 5 lines
  Jack Mitchell ([email protected])
  Embedded Systems Engineer
  Cambrideshire, UK
  http://www.embed.me.uk
--
#11 lore raw
In reply to Gary Thomas
Quoted 8 lines · On Tuesday 06 August 2013 08:31:01 Gary Thomas wrote:

My embedded device needs to send out email.

I've looked around a bit and I don't see any recipes for a mail sender, e.g. sendmail or postfix, for Yocto (OE-core).

Have I missed something? Does anyone have any suggestions?

Surely my application isn't the first that wants to send email...

Is msmtp of any use? It's not a full MTA, but it should be basically useful for sending and is in the core.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#4 lore raw
In reply to Jack Mitchell
Quoted 17 lines · Jack Mitchell
Quoted 16 lines · Mark Hatle
Quoted 14 lines · Jack Mitchell
Quoted 9 lines · Gary Thomas

My embedded device needs to send out email.

I've looked around a bit and I don't see any recipes for a mail sender, e.g. sendmail or postfix, for Yocto (OE-core).

Have I missed something? Does anyone have any suggestions?

Surely my application isn't the first that wants to send email...

Would recipes-extended/msmtp do the job? Do you need to run the whole mail stack or is pushing out emails to an smtp server adequate?

Quoted 7 lines
Quoted 5 lines

msmtp is provided specifically to be able to send email out. It should produce a binary called "sendmail" that is capable of simply sending email (and conforming to LSB requirements.)

--Mark

Colour me impressed, I didn't realise it was also a drop-in for sendmail.

Drop in replacement for the 'sendmail' command, but it's not a drop-in for 'sendmail' the software. (It only has sending capabilities from what I've been told, which is all that is required for the LSB certification.)

--Mark

#5 lore raw
Quoted 22 lines · Mark Hatle
Quoted 21 lines · Jack Mitchell
Quoted 20 lines · Mark Hatle
Quoted 6 lines · Jack Mitchell
Quoted 5 lines · Gary Thomas

My embedded device needs to send out email.

I've looked around a bit and I don't see any recipes for a mail sender, e.g. sendmail or postfix, for Yocto (OE-core).

Quoted 8 lines
Quoted 4 lines

Have I missed something? Does anyone have any suggestions?

Surely my application isn't the first that wants to send email...

Would recipes-extended/msmtp do the job? Do you need to run the whole mail stack or is pushing out emails to an smtp server adequate?

msmtp is provided specifically to be able to send email out. It should produce a binary called "sendmail" that is capable of simply sending email (and conforming to LSB requirements.)

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

--Mark

Colour me impressed, I didn't realise it was also a drop-in for sendmail.

Drop in replacement for the 'sendmail' command, but it's not a drop-in for 'sendmail' the software. (It only has sending capabilities from what I've been told, which is all that is required for the LSB certification.)

And almost enough for my needs. Amanda wants to use an MTA that works like the desktop 'mail', e.g.
mail -s "subject" TO <body
I wrote a simple wrapper to use msmtp/sendmail and it works fine.

Thanks

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#6 lore raw
Quoted 33 lines · Gary Thomas
Quoted 24 lines · Mark Hatle
Quoted 23 lines · Jack Mitchell
Quoted 21 lines · Mark Hatle
Quoted 6 lines · Jack Mitchell
Quoted 5 lines · Gary Thomas

My embedded device needs to send out email.

I've looked around a bit and I don't see any recipes for a mail sender, e.g. sendmail or postfix, for Yocto (OE-core).

Quoted 8 lines
Quoted 4 lines

Have I missed something? Does anyone have any suggestions?

Surely my application isn't the first that wants to send email...

Would recipes-extended/msmtp do the job? Do you need to run the whole mail stack or is pushing out emails to an smtp server adequate?

msmtp is provided specifically to be able to send email out. It should produce a binary called "sendmail" that is capable of simply sending email (and conforming to LSB requirements.)

--Mark

Quoted 7 lines
Quoted 2 lines

Colour me impressed, I didn't realise it was also a drop-in for sendmail.

Drop in replacement for the 'sendmail' command, but it's not a drop-in for 'sendmail' the software. (It only has sending capabilities from what I've been told, which is all that
is required for the LSB certification.)

Quoted 4 lines

And almost enough for my needs. Amanda wants to use an MTA that works like the desktop 'mail', e.g.
mail -s "subject" TO <body
I wrote a simple wrapper to use msmtp/sendmail and it works fine.

I can confirm mstp works very well, and with all the necessary bells and whistles like TLS. If you need more complex messages (e.g., attachments), then libgmime makes composing the email messages to pipe into mstmtp quite easy.

Tomas

Signature · 1 line
http://sleepfive.com
#7 lore raw
Quoted 39 lines · Tomas Frydrych
Quoted 33 lines · Gary Thomas
Quoted 24 lines · Mark Hatle
Quoted 23 lines · Jack Mitchell
Quoted 21 lines · Mark Hatle
Quoted 6 lines · Jack Mitchell
Quoted 5 lines · Gary Thomas

My embedded device needs to send out email.

I've looked around a bit and I don't see any recipes for a mail sender, e.g. sendmail or postfix, for Yocto (OE-core).

Quoted 8 lines
Quoted 4 lines

Have I missed something? Does anyone have any suggestions?

Surely my application isn't the first that wants to send email...

Would recipes-extended/msmtp do the job? Do you need to run the whole mail stack or is pushing out emails to an smtp server adequate?

msmtp is provided specifically to be able to send email out. It should produce a binary called "sendmail" that is capable of simply sending email (and conforming to LSB requirements.)

--Mark

Quoted 7 lines
Quoted 2 lines

Colour me impressed, I didn't realise it was also a drop-in for sendmail.

Drop in replacement for the 'sendmail' command, but it's not a drop-in for 'sendmail' the software. (It only has sending capabilities from what I've been told, which is all that
is required for the LSB certification.)

Quoted 4 lines

And almost enough for my needs. Amanda wants to use an MTA that works like the desktop 'mail', e.g.
mail -s "subject" TO <body
I wrote a simple wrapper to use msmtp/sendmail and it works fine.

Quoted 7 lines

I can confirm mstp works very well, and with all the necessary bells and whistles like TLS. If you need more complex messages (e.g., attachments), then libgmime makes composing the email messages to pipe into mstmtp quite easy.

Tomas

Am I being very obtuse if I think that an embedded device should not be able to send email as it's embedded, which means disconnected from the rest of the world? Or have we reached the stage where the overlap between yocto and a mainstream distro is vanishingly small?

Tim

#8 lore raw
Quoted 42 lines · Tim Coote
Quoted 39 lines · Tomas Frydrych
Quoted 37 lines · Gary Thomas
Quoted 24 lines · Mark Hatle
Quoted 23 lines · Jack Mitchell
Quoted 21 lines · Mark Hatle
Quoted 6 lines · Jack Mitchell
Quoted 5 lines · Gary Thomas

My embedded device needs to send out email.

I've looked around a bit and I don't see any recipes for a mail sender, e.g. sendmail or postfix, for Yocto (OE-core).

Quoted 8 lines
Quoted 4 lines

Have I missed something? Does anyone have any suggestions?

Surely my application isn't the first that wants to send email...

Would recipes-extended/msmtp do the job? Do you need to run the whole mail stack or is pushing out emails to an smtp server adequate?

msmtp is provided specifically to be able to send email out. It should produce a binary called "sendmail" that is capable of simply sending email (and conforming to LSB requirements.)

--Mark

Quoted 7 lines
Quoted 2 lines

Colour me impressed, I didn't realise it was also a drop-in for sendmail.

Drop in replacement for the 'sendmail' command, but it's not a drop-in for 'sendmail' the software. (It only has sending capabilities from what I've been told, which is all that
is required for the LSB certification.)

And almost enough for my needs. Amanda wants to use an MTA that works like the desktop 'mail', e.g.
mail -s "subject" TO <body
I wrote a simple wrapper to use msmtp/sendmail and it works fine.

Quoted 8 lines
Quoted 7 lines

I can confirm mstp works very well, and with all the necessary bells and whistles like TLS. If you need more complex messages (e.g., attachments), then libgmime makes composing the email messages to pipe into mstmtp quite easy.

Tomas

Am I being very obtuse if I think that an embedded device should not be able to send email as it's embedded, which means disconnected from the rest of the world? Or have we reached the stage where the overlap between yocto and a mainstream distro is vanishingly small?

It's a bit narrow to think that an embedded device is not connected to anything else! The term "embedded" is normally taken to mean dedicated to some [set of] purposes. There is nothing to say that the embedded device does not or need not communicate with other systems and sending an email seems quite reasonable to me. See
http://en.wikipedia.org/wiki/Embedded_computer_system

Here's an example: I have a complex solar electric system on my house. Part of this system is the system-wide controller which monitors the power line and also communicates with the power inverters (that actually create the A/C electricity for the system). The system controller periodically sends a report upstream so that I (and others) know it's status, how much power has been produced, etc. This report is sent via ethernet - it uses HTTP, but could just as easily be built using email messages since it's one-way only. This is very much an embedded system. It does only one thing (a small collection of tasks), i.e. monitor the solar generating system at my house and being connected and communicating to other entities, possibly even sending email, is very much a part of how it works.

My reason for asking this question in the first place (how to send email from my Yocto based device) is just as straight forward. I have a specialized NASD device which I'm using as a system-wide backup. This is a powerful machine - P1022 PowerPC with many TB of high speed RAID disks, etc - but it's also "embedded" in that I don't expect it to do anything other than manage those disks and let me communicate with it. I'm running Amanda which is a powerful automated backup system on the box. It runs automatically/autonomously and sends reports of what happened to me at my desk, via email.

Examples are everywhere; connected systems are the future (and the now)! Some circles even want your fridge and washing machine to be networked and I can't see calling them anything other than embedded...

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#9 lore raw
Quoted 82 lines · Gary Thomas
Quoted 42 lines · Tim Coote
Quoted 39 lines · Tomas Frydrych
Quoted 37 lines · Gary Thomas
Quoted 24 lines · Mark Hatle
Quoted 23 lines · Jack Mitchell
Quoted 21 lines · Mark Hatle
Quoted 6 lines · Jack Mitchell
Quoted 5 lines · Gary Thomas

My embedded device needs to send out email.

I've looked around a bit and I don't see any recipes for a mail sender, e.g. sendmail or postfix, for Yocto (OE-core).

Quoted 8 lines
Quoted 4 lines

Have I missed something? Does anyone have any suggestions?

Surely my application isn't the first that wants to send email...

Would recipes-extended/msmtp do the job? Do you need to run the whole mail stack or is pushing out emails to an smtp server adequate?

msmtp is provided specifically to be able to send email out. It should produce a binary called "sendmail" that is capable of simply sending email (and conforming to LSB requirements.)

--Mark

Quoted 7 lines
Quoted 2 lines

Colour me impressed, I didn't realise it was also a drop-in for sendmail.

Drop in replacement for the 'sendmail' command, but it's not a drop-in for 'sendmail' the software. (It only has sending capabilities from what I've been told, which is all that
is required for the LSB certification.)

And almost enough for my needs. Amanda wants to use an MTA that works like the desktop 'mail', e.g.
mail -s "subject" TO <body
I wrote a simple wrapper to use msmtp/sendmail and it works fine.

Quoted 8 lines
Quoted 7 lines

I can confirm mstp works very well, and with all the necessary bells and whistles like TLS. If you need more complex messages (e.g., attachments), then libgmime makes composing the email messages to pipe into mstmtp quite easy.

Tomas

Am I being very obtuse if I think that an embedded device should not be able to send email as it's embedded, which means disconnected from the rest of the world? Or have we reached the stage where the overlap between yocto and a mainstream distro is vanishingly small?

It's a bit narrow to think that an embedded device is not connected to anything else! The term "embedded" is normally taken to mean dedicated to some [set of] purposes. There is nothing to say that the embedded device does not or need not communicate with other systems and sending an email seems quite reasonable to me. See
http://en.wikipedia.org/wiki/Embedded_computer_system

Here's an example: I have a complex solar electric system on my house. Part of this system is the system-wide controller which monitors the power line and also communicates with the power inverters (that actually create the A/C electricity for the system). The system controller periodically sends a report upstream so that I (and others) know it's status, how much power has been produced, etc. This report is sent via ethernet - it uses HTTP, but could just as easily be built using email messages since it's one-way only. This is very much an embedded system. It does only one thing (a small collection of tasks), i.e. monitor the solar generating system at my house and being connected and communicating to other entities, possibly even sending email, is very much a part of how it works.

My reason for asking this question in the first place (how to send email from my Yocto based device) is just as straight forward. I have a specialized NASD device which I'm using as a system-wide backup. This is a powerful machine - P1022 PowerPC with many TB of high speed RAID disks, etc - but it's also "embedded" in that I don't expect it to do anything other than manage those disks and let me communicate with it. I'm running Amanda which is a powerful automated backup system on the box. It runs automatically/autonomously and sends reports of what happened to me at my desk, via email.

Quoted 4 lines

Examples are everywhere; connected systems are the future (and the now)! Some circles even want your fridge and washing machine to be networked and I can't see calling them anything other than embedded...

I can fully appreciate why yocto can be a suitable tool for this scenario - especially if it's a familiar tool. I was only positing that, maybe, some of the yocto projects seem to be pulling in the types of package that could reasonably be considered for a "a general-purpose computer" (to quote the wikipedia article). If an embedded computer is connected enough, maybe it would make sense to handle the package dependencies using the per-work done by a 'general purpose' distro, and the config management using the devops techniques (especially 'treat infrastructure as code') to decouple hardware failure from the build and configure process.

I'm interested to see how the approaches evolve.

Tim