[Dovecot] [Urgent] Email Retrieval from remote servers doesn't use Dovecot

Shazia Javed shazia at ut.ee
Wed Jun 29 15:19:58 EEST 2011


------------------------
Dovecot Version:
------------------------
2.0.13

------------------------
Output of "dovecot -n":
------------------------
# 2.0.13: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 2.6.35-28-generic x86_64 Ubuntu 10.10 ext4
mail_location = maildir:/home/%u/Maildir
passdb {
  args = %s
  driver = pam
}
protocols = imap pop3
ssl = no
userdb {
  driver = passwd
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep
}
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}

---------------------------
Objective:
---------------------------
We need to download emails from remote server using Dovecot and
thunderbird. Our objective is to store emails in maildir or mbox format,
and process them as part of our research project.

---------------------------
Problem:
---------------------------
Dovecot works for localhost, but not for remote servers. How do I know?
Because thunderbird downloads emails in its default location (specified in
settings) and not in maildir or mbox folders. If I send mail to
<user>@<system_name> using mail command, dovecot works and thunderbird
shows the email stored in maildir folder. But for email from
<id>@yahoo.com goes to thunderbird's default folder and are browsed from
there.


---------------------------
Relevant Technical Details:
---------------------------

ps auxw|grep "dovecot\|imap\|pop3"

root      1033  0.0  0.0  52796  1916 ?        Ss   12:45   0:00
/usr/sbin/dovecot -F -c /etc/dovecot/dovecot.conf
root      1173  0.0  0.0  75096  3284 ?        S    12:45   0:00 dovecot-auth
root      1214  0.0  0.0  75188  3424 ?        S    12:45   0:00
dovecot-auth -w
dovecot   8356  0.0  0.0  50528  2692 ?        S    13:30   0:00 pop3-login
dovecot   8357  0.0  0.0  50528  2692 ?        S    13:30   0:00 pop3-login
dovecot   8358  0.0  0.0  50528  2688 ?        S    13:30   0:00 pop3-login
dovecot   8359  0.0  0.0  50528  2688 ?        S    13:30   0:00 pop3-login
dovecot   8360  0.0  0.0  50528  2688 ?        S    13:30   0:00 pop3-login
dovecot   8364  0.0  0.0  50540  2688 ?        S    13:30   0:00 imap-login
dovecot   8375  0.0  0.0  50540  2692 ?        S    13:30   0:00 imap-login
dovecot   8378  0.0  0.0  50540  2684 ?        S    13:30   0:00 imap-login
shaz      9048  0.0  0.0   8956   864 pts/0    S+   15:06   0:00 grep
--color=auto dovecot\|imap\|pop3



sudo netstat -lnptu

[sudo] password for shaz:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State 
     PID/Program name
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN
     1033/dovecot
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN
     1033/dovecot
tcp        0      0 0.0.0.0:64277           0.0.0.0:*               LISTEN
     2068/skype
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN
     1295/cupsd
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN
     1389/master
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN
     1033/dovecot
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN
     1033/dovecot
tcp6       0      0 ::1:631                 :::*                    LISTEN
     1295/cupsd
udp        0      0 127.0.0.1:45902         0.0.0.0:*                     
     2068/skype
udp        0      0 0.0.0.0:33754           0.0.0.0:*                     
     1065/avahi-daemon:
udp        0      0 0.0.0.0:5353            0.0.0.0:*                     
     1065/avahi-daemon:
udp        0      0 0.0.0.0:68              0.0.0.0:*                     
     2132/dhclient
udp        0      0 0.0.0.0:64277           0.0.0.0:*                     
     2068/skype
udp6       0      0 :::5353                 :::*                          
     1065/avahi-daemon:
udp6       0      0 :::50994                :::*                          
     1065/avahi-daemon:



sudo lsof -i | grep LISTEN

dovecot   1033    root    6u  IPv4   7578      0t0  TCP *:imap2 (LISTEN)
dovecot   1033    root    7u  IPv4   7579      0t0  TCP *:imaps (LISTEN)
dovecot   1033    root    9u  IPv4   7580      0t0  TCP *:pop3 (LISTEN)
dovecot   1033    root   10u  IPv4   7581      0t0  TCP *:pop3s (LISTEN)
cupsd     1295    root    5u  IPv6   7932      0t0  TCP Casper:ipp (LISTEN)
cupsd     1295    root    6u  IPv4   7933      0t0  TCP
localhost.localdomain:ipp (LISTEN)
master    1389    root   12u  IPv4   9284      0t0  TCP *:smtp (LISTEN)
skype     2068    shaz   67u  IPv4  18344      0t0  TCP *:64277 (LISTEN)
pop3-logi 8356 dovecot    4u  IPv4   7580      0t0  TCP *:pop3 (LISTEN)
pop3-logi 8356 dovecot    5u  IPv4   7581      0t0  TCP *:pop3s (LISTEN)
pop3-logi 8357 dovecot    4u  IPv4   7580      0t0  TCP *:pop3 (LISTEN)
pop3-logi 8357 dovecot    5u  IPv4   7581      0t0  TCP *:pop3s (LISTEN)
pop3-logi 8358 dovecot    4u  IPv4   7580      0t0  TCP *:pop3 (LISTEN)
pop3-logi 8358 dovecot    5u  IPv4   7581      0t0  TCP *:pop3s (LISTEN)
pop3-logi 8359 dovecot    4u  IPv4   7580      0t0  TCP *:pop3 (LISTEN)
pop3-logi 8359 dovecot    5u  IPv4   7581      0t0  TCP *:pop3s (LISTEN)
pop3-logi 8360 dovecot    4u  IPv4   7580      0t0  TCP *:pop3 (LISTEN)
pop3-logi 8360 dovecot    5u  IPv4   7581      0t0  TCP *:pop3s (LISTEN)
imap-logi 8364 dovecot    4u  IPv4   7578      0t0  TCP *:imap2 (LISTEN)
imap-logi 8364 dovecot    5u  IPv4   7579      0t0  TCP *:imaps (LISTEN)
imap-logi 8375 dovecot    4u  IPv4   7578      0t0  TCP *:imap2 (LISTEN)
imap-logi 8375 dovecot    5u  IPv4   7579      0t0  TCP *:imaps (LISTEN)
imap-logi 8378 dovecot    4u  IPv4   7578      0t0  TCP *:imap2 (LISTEN)
imap-logi 8378 dovecot    5u  IPv4   7579      0t0  TCP *:imaps (LISTEN)



telnet 127.0.0.1 110

Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
+OK Dovecot ready.



telnet 127.0.0.1 143

Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
STARTTLS AUTH=PLAIN] Dovecot ready.
1 logout
* BYE Logging out
1 OK Logout completed.
Connection closed by foreign host.



telnet mail.ut.ee 110

Trying 193.40.5.156...
Connected to mailhost.ut.ee.
Escape character is '^]'.
+OK POP3 ready
quit
+OK
Connection closed by foreign host.



telnet mail.ut.ee 143

Trying 193.40.5.156...
Connected to mailhost.ut.ee.
Escape character is '^]'.
* OK IMAP4 ready
1 logout
* BYE
1 OK completed
Connection closed by foreign host.


-----------------
Commentary:
-----------------

As is obvious from the commands and output listed above that dovecot is
running, listening on 110 and 143 - but only for localhost. When I try to
telnet mail.ut.ee 110/143 I get to see IMAP4/POP3 ready rather than
Dovecot ready.



-----------------
Queries
-----------------
Shouldn't I get "Dovecot ready" message for remote servers as well? It is
an MRA and we shouldn't be required to install it on remote servers,
right? What should I do to make dovecot work for remote servers?






More information about the dovecot mailing list