Ubuntu – Mails are not receiving in Squirrelmail

sendmailsquirrelmailUbuntu

I have installed the sendmail in ubuntu along with Squirrelmail. Mails are not receiving in Squirrelmail, But I can access the received mail using mail utility. What should I do regarding this ?

Best Answer

Squirrelmail is essentially a web-based IMAP client.

Sendmail by itself does not understand IMAP. You will need an IMAP server, such as Dovecot, Courier or Cyrus-IMAP.

The instructions for configuring Dovecot on the Ubuntu wiki is here:

https://help.ubuntu.com/community/Dovecot

I don't believe Ubuntu has Sendmail-specific instructions in their wiki; you can look elsewhere for that. They do have Postfix instructions, and Postfix may be a better choice for you, depending on your requirements and comfort levels. If you are going to use Sendmail, then you will need to configure Sendmail to deliver the received email to Dovecot.

In terms of mail architecture, Sendmail is the Mail Transfer Agent (MTA). Dovecot is the Mail Delivery Agent (MDA). Squirrelmail is the Mail User Agent (MUA). The chart will look a little like this:

mail from Internet -> MTA -> MDA -> MUA

There might be extra parts depending on how, say, antispam and antivirus processing works, but that is the basic. In this Question, you are missing the MDA component; Sendmail as the MTA is just delivering into local mail spools (which are accessible on the machine using legacy mail and mailx commands), with no way for the end-user program, Squirrelmail, to view it. You need Dovecot as the MDA to allow IMAP (and POP3) access to the mail by the end-user program. You don't necessarily have to allow Internet-wide access to the IMAP server; you can have IMAP listen only on localhost, and have Squirrelmail connect to localhost:143.