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

2011-06-30 Thread William Blunn

On 30/06/2011 14:08, Shazia Javed wrote:

Thank you for the reply. Now I have relatively better understanding of Dovecot 
and email service components (MUA, MTA, MRA, etc). However, I am still 
struggling with the relevant conceptual understanding, and need your help:

I have installed 'getmail' as I read that it offers ease-of-use and is 
relatively more secure. So far I have managed to download emails from Inbox and 
Sent folder. All the downloaded emails go to single folder 'new' from 'Maildir' 
directory. Please tell me if there is a way (configuration) to download emails 
in respective folders.


getmail appears to support delivery to an arbitrary Maildir folder. 
See getmail documentation.


You might want to read up about Maildir to see how it works. In 
particular you need to know that mail is delivered to a directory new 
(the delivery process involves the directory tmp, but the message 
isn't considered delivered until it reaches the directory new), but 
gets moved to a folder cur when the Maildir is looked at. So mail 
could be in either directory new or cur.


(The design of Maildir attempts to address various problems, and only 
partially succeeds, and in other cases makes things worse than they 
would have been otherwise. But despite its flaws, it still has some 
strengths, such as reliability, (relative) simplicity, wide support, and 
the ease by which a message store can be queried/interrogated.)



Also, is there any need for Dovecot now? As I see it, I have managed to 
download emails from remote servers in maildir format using getmail. How and 
why would Dovecot fit in? Will Dovecot (via deliver and sieve) assist in 
segregated email storage (i.e. INBOX in 'new', DRAFTS in '.draft/new' etc).


It might be handy to have Dovecot installed as it would mean you could 
see into the mail folders using an IMAP client such as Thunderbird. 
This will probably make it easier to get a handle on which messages are 
in which folders than trying to look in the Maildir directories directly.


IMAP has a special folder called INBOX which appears as the Inbox in 
most IMAP clients.


Under Maildir, in the default location, INBOX can be found at 
~/Maildir/{new,cur,tmp}


Other folders are mapped into directories, for example
the mail folder Sent will appear at ~/Maildir/.Sent/{new,cur,tmp}

Nested mail folders are flattened into a single directory level in the 
filesystem, with the folder levels separated by dots, so
the mail folder Projects/PJ1 will appear at 
~/Maildir/.Projects.PJ1/{new,cur,tmp}


(The above is the default way for Maildir to work. However, Dovecot can 
be configured to map IMAP folders into Maildir directories in other ways.)


Bill


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

2011-06-29 Thread Kerem Erciyes
Hi,

What makes you think that e-mail retrieval from remote servers should
be over Dovecot?
Is  193.40.5.156 running Dovecot that it should say Dovecot ready. ?

I think what you need fetchmail or getmail. Dovecot is a MTA, not a MRA.

Best,
Kerem


On Wed, Jun 29, 2011 at 3:19 PM, Shazia Javed sha...@ut.ee wrote:
 
 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    

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

2011-06-29 Thread Stan Hoeppner
On 6/29/2011 7:19 AM, Shazia Javed wrote:

 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.

It seems obvious that mail.ut.ee/193.40.5.156 do not address the Dovecot
host in question, but another host.  Otherwise you would see Dovecot
ready across the board.  Please show:

~$ ifconfig|grep inet

-- 
Stan




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

2011-06-29 Thread William Blunn

On 29/06/2011 13:19, Shazia Javed wrote:

---
Objective:
---
We need to download emails from remote server using Dovecot and thunderbird.


Dovecot doesn't download e-mail from other servers.


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.


It looks like you want to get e-mail from someone else's mail server and 
store it in maildir or mbox format on your server.


You could do this by pulling the mail from someone else's mailserver 
using Thunderbird, then using Thunderbird to move it across to an 
account configured to access your server by IMAP.


Alternatively you could do it by retrieving the mail using fetchmail 
on your server and have it delivered to an address on your server. This 
would have the benefit of being more reliable and more scriptable.




-
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.


That is the expected behaviour. You installed Dovecot on your server, 
ergo it is only on your server. Installing Dovecot on your server 
doesn't magically install and configure it on other people's servers.



-
Queries
-
Shouldn't I get Dovecot ready message for remote servers as well?


No; you only installed it on your server.


It is an MRA and we shouldn't be required to install it on remote servers, 
right?


If, by MRA, you mean Mail Retrieval Agent, then no, Dovecot is not 
an MRA.



What should I do to make dovecot work for remote servers?


Dovecot, in and of itself, won't work for remote servers.

You may be able to do what I think you want to do by pulling the mail 
from the remote server on to your server.


You may want to look into fetchmail.

Bill


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

2011-06-29 Thread Joseph Tam

Shazia Javed writes:


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.
...

telnet mail.ut.ee 143

Trying 193.40.5.156...
Connected to mailhost.ut.ee.
Escape character is '^]'.
* OK IMAP4 ready


That is weird.  Maybe you got NAT forwarding going on where a firewall
or other network appliance (like a load balancer) is translating ip1/143
- ip2/143?  Or you're not on the host you think you're on.

You can check the dovecot logs to verify that in fact your client is
connecting.

Joseph Tam jtam.h...@gmail.com