Cannot access email via IMAP on Ubuntu 18.04 mail server
I've set up an email server using Postfix 3.3.0 on Ubuntu 18.04, on an EC2 instance. Sending emails to and from my server and external email services (eg gmail) is working just fine.
The only issue I've run into now is accessing my email through a mail client not on my server. I installed courier-imap so I could access my email through IMAP but it keeps failing. I am trying to use Thunderbird in which I've entered (the equivalent of) the following settings: Incoming: IMAP Server hostname: mail.redd9.ca Port: 143 SSL: None Authentication: Normal password Outgoing: SMTP Server hostname: mail.redd9.ca Port: 25 SSL: None Authentication: Normal password Username: Incoming: redd Outgoing: redd This gives me 'Thunderbird failed to find the settings for your email account. I tried tweaking the ports, authentication, etc but still got the same error, even after opening up all the ports on the EC2 firewall. Output of postconf -n is below, would appreciate any advice. Code:
alias_database = hash:/etc/aliases Code:
ADDRESS=127.0.0.1 |
Is the IMAP server running and listening on port 143?
What does Code:
netstat -tnlp | grep 143 A guess: Looks like the IMAP server is configured to listen on localhost (ADDRESS=127.0.0.1). It needs to listen on the IP address of the mail server. Caveat: I use qmail and dovecot, not postfix and courier...but both qmail and dovecot are configured to use the public IP address of the mail server, not localhost. |
So that did return the localhost address.
I tried changing it to the public IP of the EC2 instance, and after restarting courier-imap, Code:
sudo netstat -tnlp | grep 143 |
If that netstat command returns nothing then the imap server is not running. Check the logs to find out why.
|
So I'm getting
Code:
Sep 17 06:22:16 mail imapd[1953]: bind: Cannot assign requested address EDIT: tried binding to private IP and the service is now active! netstat gave me this output: Code:
tcp 0 0 172.31.1.20:143 0.0.0.0:* LISTEN 2127/couriertcpd |
That sounds like the IP address you gave courier is not on the server, but it's hard to know from one log line.
Did you use the same IP address that postfix uses? |
All times are GMT -5. The time now is 03:03 AM. |