0

I was studying about MTA and came through SMTP & IMAP, and read that SMTP is responsible for delivering email across the servers, and client uses IMAP/POP3 to read the emails from server.

So IMAP/SMTP these are just protocot, Postfix is known as SMTP Server, and DoveCot is known as IMAP Server ( there are many more).

So which program (PostFix/DoveCot) is responsible for storing emails in file-system?

vivex
  • 2,496
  • 1
  • 25
  • 30
  • Probably the IMAP server, no? But it could be storing the messages in some sort of database instead of directly to the filesystem. You'd have to look into its data directory to find out. – Pekka May 07 '15 at 07:52
  • does not matter that it is storing in database or filesystem, question is who is storing. – vivex May 07 '15 at 07:54
  • http://wiki2.dovecot.org/MailboxFormat/mbox – Pekka May 07 '15 at 07:58
  • Both: SMTP will place messages somewhere for the IMAP server to read. However, imap can also create messages with the append command. It also must store metadata for the operation of the imap server. – Max May 07 '15 at 12:52
  • OK, so in what case imap will create message? – vivex May 07 '15 at 12:57
  • When a client uses APPEND or COPY or MOVE command. – Max May 07 '15 at 17:26

1 Answers1

1

There is also a third protocol, LMTP, which is very very similar to SMTP but is slightly changed to better suit the hop from an SMTP server to the storage system. Dovecot implements LMTP as a server, so a message is quite likely written by Dovecot acting as either as an LMTP server or as an IMAP server.

But it doesn't have to be. An SMTP server can store the mail in any way it wants to, including by forking procmail, and Dovecot (and many other servers) are capable of accessing email stored by procmail.

This duality is because this happens on the boundaries of the internet. The IETF generally publishes standards for internet communication; how an SMTP server stores its mail locally is arguably off-limits for IETF standards.

arnt
  • 8,949
  • 5
  • 24
  • 32