Need email server aid

Chan Chung Hang Christopher christopher.chan at bradbury.edu.hk
Thu Apr 22 13:23:12 UTC 2010


> 'Email client' being the simple code that sends the SMTP command packet 
> that is my email in my embedded system? There's nothing but opening a 
> socket and sending packets - no actual 'client' code at all.

I'd say that that is a client. I have had my share of writing a smtp 
client or two in C for nagios monitoring which would give custom error 
messages to indicate at what stage a delivery problem was encountered in 
the smtp session.


> 
> One thing I have been researching is a very small email client that I 
> can embed. So far, I have not found the solution. My embedded system is 
> fairly good on memory, but there are limits you don't have with a PC 
> running Ubuntu.
> 
> If there's a quick and dirty way of providing authentication from the 
> embedded box that you know of, please let me know. In the future it 
> would be nice to be able to receive email as well as send it. The 
> original code I started from had email receive capability, but nothing 
> for security. I can handle SSL and such if I have to.

postfix supports AUTH PLAIN so you can use that in your code to 
authenticate. You simply want to encode the string 
'username\0username\0password' in base64 and feed that to postfix after 
you by invoking AUTH PLAIN.

EHLO embeddedhostname
- check response for AUTH PLAIN support
AUTH PLAIN base64encodeduserpassstring
- check response
MAIL FROM: yada at yada.yada
{rest of smtp session}




More information about the ubuntu-users mailing list