LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   smtp basics (https://www.linuxquestions.org/questions/linux-server-73/smtp-basics-660274/)

91change 08-04-2008 03:05 AM

smtp basics
 
would like to setup a mail server behind a NAT . User should be able to connect to the mail server from anywhere.

I am new to these but learning hard . I want security to all email communications .

i need clarification on following .....please

1) All email clients and servers run on smtp protocol ? { i think it is wrong for eg : pop3 )

2) POP3 and IMAP are email servers as well as clients .

3) For my implementation ,i can use any emil server based on smtp ...lile sendmail ,qmail ,postfix ,IMAP etc .......

4) For my implementation i can use any emil client .

5) mutt is an email client based on smtp

6) exim ,putmail ,fetchmail are also email client .

7) mutt ,exim ,pop3 are email clients .

All clients also use smtp protocol

9) I am very confused about POP3 and IMAP ...where they belong ? in server ,client or email retrieval tool .


Any help or clue is really appreciated ,

Thanks,

Mr. C. 08-04-2008 03:19 AM

SMTP is a protocol - a langauge agreement between mail servers and mail clients.

IMAP is a protocol for managing mail messages on a server. It is a protocol to provide mesages to an MUA (mail user agent).

POP is a protocol for downloading messages to an MUA.

Exim, Sendmail, Qmail, and Postfix are all MTA - mail trasnfer agents. They speak SMTP.

Mutt is an MUA.

There are MTAs that are not SMTP-centric, although the may have SMTP plugins (Exchange, Lotus Notes).


Here's some reading to get you started:
http://en.wikipedia.org/wiki/Mail_transfer_agent

billymayday 08-04-2008 03:31 AM

1. You are correct - this is wrong. servers talk to each other over smtp.
2. Not really. these are both ptrotocols, but the servers that use these protocols are interfaces between mail files and email client (MUAs)
3. I don't know - what's your implementation
4. See 3
5. I don't use mutt a lot, but I think it's an MUA. Most MUAs deliver to mail servers via smtp (Outlook, etc do too)
6. I thought exim was a server (I haven't used it). Don't know what putmail is. Fetchmail is a quasi client I guess, but is specialised in that it collects mail via pop or imap and delivers it to your server via smtp
7. You're repeating yourself
8. Probably - they typically collect mail through imap or pop and deliver it to a server via smtp
9. So I'd gathered.


Think about it this way - smtp is like a postbox on the steeet - when you want your MUA (client) to deliver mail, you post the letter in the postbox (smtp). Your post office that collects the mail delivers it to the post office near the destination communicates via smtp. The postman at the other end delivers it to your letterbox via smtp. When you go out your door to collect your mail, you use pop ot imap.

If you had a postbox at your local post office, and you sent your wife/husband up to collect it, she/he would be fetchamil (sort of).

typically with imap. messages are left on the server. Typically with pop they are downloaded and not left on the server. There are a lot of other differences as well. For your MUA to communicate with raw mailfiles, it talks to a pop or imap server. If you choose to download the messages to a local follder, then the MUA manages them itself.


I hope that makes a bit of sense.

Edit - I need to type faster!

91change 08-04-2008 04:07 AM

You both replied excellent ..... I am very much clear about the stuff . But still need some help .

billymayday ,
My setup is - > I am configuring a mail server behind a NAT . ( ip for server is 10.232.18.19 ) .I have a Gateway well configured . Any mail client from outside the network should be able to access Netwrok

I know that the information ,i Provided , is incomplete . I am in beginning stage . So you can well explain thing in a way i can understand .

Thanks for all your great help .

91change 08-04-2008 04:20 AM

Mr C ,

Can you mention a little bit about STMP servers also ?
What i understood is sendmail is a mail server . ?

Thanks.

billymayday 08-04-2008 05:41 AM

If your gateway/router/whatever can do the necessary port forwarding for inbound traffic you'll be fine

And yes, sendmail is an MTA (server).

Mr. C. 08-04-2008 12:58 PM

With respect to mail as we think of it commonly, in today's Internet

Mail server == MTA == Mail Transport Agent ==> all using SMTP

http://en.wikipedia.org/wiki/Simple_...nsfer_Protocol

If you are interested in setting up a mail server, and want an outstanding book (for Postfix), I highly recommend The Book of Postfix (http://www.postfix-book.com/)

91change 08-04-2008 10:13 PM

i installed sendmail in my linux machine ... there are two users in this machine ,say abc and xyz .

i used following commands ,

mail xyx

and typed some text and used dot to send the mail.


mail

to extract the mail that i got .



Here ,we are using mail as a command . This is a MUA or MTA ..?. I got confused becos my server and client are on same machine .
??

billymayday 08-04-2008 10:20 PM

It's an MUA - it effectively takes the role that Outlook or Thunderbird fill on a desktop. The mail command then talks to sendmail via smtp to send.

anadarwheels 08-04-2008 11:33 PM

What you havent mentioned in your configurations is the router for your LAN. You must forward ports 25 and 110 for MTA and MUA to work from anywhere. You also must have your domain dns pointing to the routable IP address of your LAN

91change 08-05-2008 01:12 AM

Thanks a ton .

I studied a lot and reached in a conclusion . I am looking for a stable and secure relay server on my embeded platform . The device will be on a lan in a well configured gateway .

Now , i had a great choice for servers .....But i am confused about which one should i use ?
Which is the best relay server ?

Mr. C. 08-05-2008 01:33 AM

Best is the one you understand the most. Your needs sound minimal, so go with what feels most comfortable. Look at each MTAs documentation. Pick the one that feels best to you.

91change 08-05-2008 01:40 AM

K.....
I need only relay server .

To start with , Can you name two or three , so that i can go through in detail . I am a slow learner , it would take days to read all those documents . So please drive me to some two or three that will suit for embeded linux ,and relay server

Mr. C. 08-05-2008 02:09 AM

It sounds like you need the mail server to manage a mail queue. This eliminates some of the simple mail senders.

Standard choices are then Exim, Postfix, Qmail, Sendmail, Courier, etc.

http://en.wikipedia.org/wiki/Comparison_of_mail_servers

You don't have to read all of the documentation. Just a page or two from each to see if the general style meets your needs.

Mail servers are complex. The Sendmail reference is 1200 pages. The Book of Postfix is almost 500 pages. This should give you an idea of what you need to be prepared for.

You say you want users to connect remotely. This means you probably want TLS and SMTP AUTH. This means also picking an authentication package (cyrus, dovecot).

91change 08-06-2008 03:01 AM

thanks ...


All times are GMT -5. The time now is 10:04 PM.