Results 1 to 9 of 9

Thread: Need help configuring dovecot as pop3 server

  1. #1

    Default Need help configuring dovecot as pop3 server

    Under 12.1 I used qpopper as the POP engine. Qpopper isn't available under 13.1. In its place I want to use dovecot. I am just flat lost in setting up the conf.

    The old setup used TB using APOP through an ssh tunnel to the server. The tunnel works with a dynamic IP/URL service (dyn.com's free service). Dovecot will start up.
    Code:
    samwise /etc/dovecot# systemctl status dovecot.service -l
    dovecot.service - Dovecot IMAP/POP3 email server
       Loaded: loaded (/usr/lib/systemd/system/dovecot.service; disabled)
       Active: active (running) since Wed 2014-01-29 20:35:55 EST; 9s ago
     Main PID: 4662 (dovecot)
       CGroup: /system.slice/dovecot.service
               ├─4662 /usr/sbin/dovecot -F
               ├─4664 dovecot/anvil
               ├─4665 dovecot/log
               └─4667 dovecot/config
    
    Jan 29 20:35:55 samwise.pinefields.com systemd[1]: Starting Dovecot IMAP/POP3 email server...
    Jan 29 20:35:55 samwise.pinefields.com systemd[1]: Started Dovecot IMAP/POP3 email server.
    Jan 29 20:35:55 samwise.pinefields.com dovecot[4662]: master: Dovecot v2.1.17 starting up (core dumps disabled)
    The problem is configuring dovecot to act as qpopper used to. I'm currently using the default POP ports 25 and 110 (that will change once the baseline service is running).
    Sometimes I sits and thinks, sometimes I just sits...

  2. #2
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Need help configuring dovecot as pop3 server

    On 2014-01-30 02:56, RBEmerson wrote:
    >
    > Under 12.1 I used qpopper as the POP engine. Qpopper isn't available
    > under 13.1. In its place I want to use dovecot. I am just flat lost in
    > setting up the conf.


    Well... the first thing is to decide where dovecot should store mail and
    in which format. The second issue is storing mail there, or if the
    storage is pre-existent, see that it can use it. Third is connecting
    locally (same computer) to see that dovecot works.


    > The old setup used TB using APOP through an ssh tunnel to the server.
    > The tunnel works with a dynamic IP/URL service (dyn.com's free service).


    That would be the last thing to do.

    > Dovecot will start up.
    >
    > Code:
    > --------------------
    > samwise /etc/dovecot# systemctl status dovecot.service -l
    > dovecot.service - Dovecot IMAP/POP3 email server
    > Loaded: loaded (/usr/lib/systemd/system/dovecot.service; disabled)
    > Active: active (running) since Wed 2014-01-29 20:35:55 EST; 9s ago
    > Main PID: 4662 (dovecot)
    > CGroup: /system.slice/dovecot.service
    > ├─4662 /usr/sbin/dovecot -F
    > ├─4664 dovecot/anvil
    > ├─4665 dovecot/log
    > └─4667 dovecot/config
    >
    > Jan 29 20:35:55 samwise.pinefields.com systemd[1]: Starting Dovecot IMAP/POP3 email server...
    > Jan 29 20:35:55 samwise.pinefields.com systemd[1]: Started Dovecot IMAP/POP3 email server.
    > Jan 29 20:35:55 samwise.pinefields.com dovecot[4662]: master: Dovecot v2.1.17 starting up (core dumps disabled)
    >
    > --------------------


    I see one issue, related or not: that host name "samwise.pinefields.com"
    does exist. I don't know if that is you and you simply forgot to munge
    it out, or if you are using some random name for your computer. In the
    second case, it is best use a name that really does not exist. For
    instance "myinventedname.lnet", as the lnet domain does not exist.


    > The problem is configuring dovecot to act as qpopper used to. I'm
    > currently using the default POP ports 25 and 110 (that will change once
    > the baseline service is running).


    Well, better restart dovecot and see what gets into "/var/log/mail/"


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  3. #3

    Default Re: Need help configuring dovecot as pop3 server

    Quote Originally Posted by robin_listas View Post
    On 2014-01-30 02:56, RBEmerson wrote:
    >
    > Under 12.1 I used qpopper as the POP engine. Qpopper isn't available
    > under 13.1. In its place I want to use dovecot. I am just flat lost in
    > setting up the conf.


    Well... the first thing is to decide where dovecot should store mail and
    in which format. The second issue is storing mail there, or if the
    storage is pre-existent, see that it can use it. Third is connecting
    locally (same computer) to see that dovecot works.
    There is mail sitting in /var/spool/mail (I had the wrong name earlier)
    Code:
    /home/system> gotmail
    total 92
    8799880 drwxrwxrwt  2 root   4096 Sep 27 16:24 .
    8677459 drwxr-xr-x 14 root   4096 Jan 26 21:19 ..
    8800712 -rw-rw----  1 users 30532 Jan 25 15:30 chris
    8800713 -rw-------  1 users 19298 Jan 15 20:16 gunter
    8800714 -rw-------  1 users 20826 Jan 25 18:11 pavilion
    8800715 -rw-------  1 users  4029 Jan 29 21:19 system
    8800716 -rw-------  1 users  4029 Apr 30  2013 wxsys
    It was brought in by fetchmail from my mail host. Here's a sample message:
    Code:
    samwise /etc/dovecot# cat /var/spool/mail/wxsys 
    From LISTSERV@LISTSERV.ILLINOIS.EDU  Tue Apr 30 07:03:37 2013
    Return-Path: <LISTSERV@LISTSERV.ILLINOIS.EDU>
    X-Original-To: wxsys@localhost.pinefields.com
    Delivered-To: wxsys@localhost.pinefields.com
    Received: from samwise.pinefields.com (localhost [IPv6:::1])
            by samwise.pinefields.com (Postfix) with ESMTP id 9C46254050E
            for <wxsys@localhost.pinefields.com>; Tue, 30 Apr 2013 07:03:37 -0400 (EDT)
    Received: from mail.pinefields.com.netsolmail.net [205.178.146.50]
            by samwise.pinefields.com with POP3 (fetchmail-6.3.21)
            for <wxsys@localhost.pinefields.com> (multi-drop); Tue, 30 Apr 2013 07:03:37 -0400 (EDT)
    Received: (qmail 24048 invoked by uid 78); 30 Apr 2013 11:00:49 -0000
    Delivered-To: wxsys@PINEFIELDS.COM
    Received: (qmail 24042 invoked by uid 0); 30 Apr 2013 11:00:49 -0000
    Received: from unknown (HELO atl4mhib47.myregisteredsite.com) (209)
      by 0 with SMTP; 30 Apr 2013 11:00:49 -0000
    Received: from vacuum.cso.uiuc.edu (vacuum.cso.uiuc.edu [128.174.5.113])
            by atl4mhib47.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id r3UB0jpp022592
            for <wxsys@PINEFIELDS.COM>; Tue, 30 Apr 2013 07:00:48 -0400
    Received: from vacuum.cso.uiuc.edu (vacuum.cso.uiuc.edu [128.174.5.113])
            by vacuum.cso.uiuc.edu (8.14.2/8.14.2) with ESMTP id r3TLCdmr027240
            for <wxsys@PINEFIELDS.COM>; Tue, 30 Apr 2013 06:00:45 -0500 (CDT)
    Date:         Tue, 30 Apr 2013 06:00:12 -0500
    From: "CITES LISTSERV Server \(14.5\)" <LISTSERV@LISTSERV.ILLINOIS.EDU>
    Subject: Subscription probe for WX-ATLAN - please ignore
    To: Weather Systems <wxsys@PINEFIELDS.COM>
    Message-ID:   <LISTSERV%201304300600122769.53D5@LISTSERV.ILLINOIS.EDU>
    X-LSV-ListID: WX-ATLAN
    X-SpamScore: 0
    X-MailHub-Apparently-To: wxsys@PINEFIELDS.COM
    
    Tue, 30 Apr 2013 06:00:12
    
    This message is a "probe" for your subscription to the WX-ATLAN list. You[/yada yada yada]

    > The old setup used TB using APOP through an ssh tunnel to the server.
    > The tunnel works with a dynamic IP/URL service (dyn.com's free service).

    That would be the last thing to do.
    Agreed. I want describe the endpoint for getting dovecot going.

    > Dovecot will start up.
    >
    > Code:
    > --------------------
    > samwise /etc/dovecot# systemctl status dovecot.service -l
    > dovecot.service - Dovecot IMAP/POP3 email server
    > Loaded: loaded (/usr/lib/systemd/system/dovecot.service; disabled)
    > Active: active (running) since Wed 2014-01-29 20:35:55 EST; 9s ago
    > Main PID: 4662 (dovecot)
    > CGroup: /system.slice/dovecot.service
    > ├─4662 /usr/sbin/dovecot -F
    > ├─4664 dovecot/anvil
    > ├─4665 dovecot/log
    > └─4667 dovecot/config
    >
    > Jan 29 20:35:55 samwise.pinefields.com systemd[1]: Starting Dovecot IMAP/POP3 email server...
    > Jan 29 20:35:55 samwise.pinefields.com systemd[1]: Started Dovecot IMAP/POP3 email server.
    > Jan 29 20:35:55 samwise.pinefields.com dovecot[4662]: master: Dovecot v2.1.17 starting up (core dumps disabled)
    >
    > --------------------

    I see one issue, related or not: that host name "samwise.pinefields.com"
    does exist. I don't know if that is you and you simply forgot to munge
    it out, or if you are using some random name for your computer. In the
    second case, it is best use a name that really does not exist. For
    instance "myinventedname.lnet", as the lnet domain does not exist.
    pinefields.com is very real and "samwise" is the server's name. The domain exists only as a mail domain, but it's out there in DNS-land.


    > The problem is configuring dovecot to act as qpopper used to. I'm
    > currently using the default POP ports 25 and 110 (that will change once
    > the baseline service is running).

    Well, better restart dovecot and see what gets into "/var/log/mail/"


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)
    There is stuff in /var/spool/mail (again, I had the wrong path earlier). The local instance of TB (on the machine that's running dovecot) is set up to use POP to collect pending mail from localhost:110. Doing "get mail" on TB doesn't get the mail. It does produce an error in /var/log/mail:
    Code:
    2014-01-29T21:48:22.008356-05:00 samwise dovecot: pop3-login: Disconnected: Auth process broken (disconnected before greeting, waited 1 secs): user=<>, rip=::1, lip=::1, secured, session=<8ucxFyfxMQAAAAAAAAAAAAAAAAAAAAAB>
    Kinda looks like there's an authentication problem, eh.
    Sometimes I sits and thinks, sometimes I just sits...

  4. #4

    Default Re: Need help configuring dovecot as pop3 server

    I changed the TB client to use a plain, unencrypted password long enough to see dovecot do anything. The authentication issue went away of course. But TB says it was told there's no mail for it. Which is wrong, because there is a message waiting.

    BTW, in the conf file, option location = mbox:/var/spool/mail, I tried mbox and maildir. Neither helped the "no mail waiting" issue.
    Sometimes I sits and thinks, sometimes I just sits...

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Need help configuring dovecot as pop3 server

    On 2014-01-30 04:36, RBEmerson wrote:
    >
    > I changed the TB client to use a plain, unencrypted password long enough
    > to see dovecot do anything. The authentication issue went away of
    > course. But TB says it was told there's no mail for it. Which is wrong,
    > because there is a message waiting.


    I find it easier checking with fetchmail.

    > BTW, in the conf file, option -location = mbox:/var/spool/mai-l, I
    > tried mbox and maildir. Neither helped the "no mail waiting" issue.


    I use:

    Code:
    mail_location = mbox:~/Mail:INBOX=/var/mail/%u
    which covers both "/var/mail/user" in mbox (the default) and "~/Mail"
    directories on users homes.


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  6. #6

    Default Re: Need help configuring dovecot as pop3 server

    Quote Originally Posted by robin_listas View Post
    On 2014-01-30 04:36, RBEmerson wrote:
    >
    > I changed the TB client to use a plain, unencrypted password long enough
    > to see dovecot do anything. The authentication issue went away of
    > course. But TB says it was told there's no mail for it. Which is wrong,
    > because there is a message waiting.


    I find it easier checking with fetchmail.
    Fetchmail brings in the mail waiting in my mail host, and deposits it in /var/spool/mail with each user having a file with pending mail in it.

    > BTW, in the conf file, option -location = mbox:/var/spool/mai-l, I
    > tried mbox and maildir. Neither helped the "no mail waiting" issue.

    I use:

    Code:
    mail_location = mbox:~/Mail:INBOX=/var/mail/%u
    which covers both "/var/mail/user" in mbox (the default) and "~/Mail"
    directories on users homes.


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)
    Does dovecot's mail_location = mbox:~/Mail:INBOX=/var/mail/%u resolve to looking for a directory or a file?

    Here's the current set of mail queues in /var/spool/mail:
    Code:
    samwise /home/system> gotmail
    total 244
    8799880 drwxrwxrwt  3 root    4096 Jan 29 22:59 .
    8677459 drwxr-xr-x 14 root    4096 Jan 26 21:19 ..
    8800712 -rw-rw----  1 users 163727 Jan 30 13:40 chris
    8800713 -rw-------  1 users  19298 Jan 15 20:16 gunter
    9064422 drwxrwxrwx  3 users   4096 Jan 29 22:59 .imap
    8800830 -rw-------  1 users      0 Jan 29 22:59 inbox
    8800714 -rw-------  1 users  30860 Jan 30 13:43 pavilion
    8800715 -rw-------  1 users   9505 Jan 30 13:43 system
    8800716 -rw-------  1 users   5869 Jan 30 13:39 wxsys
    (.imap and inbox were added by dovecot)
    Sometimes I sits and thinks, sometimes I just sits...

  7. #7
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Need help configuring dovecot as pop3 server

    On 2014-01-30 20:16, RBEmerson wrote:
    >
    > robin_listas;2620609 Wrote:



    >> I find it easier checking with fetchmail.

    > Fetchmail brings in the mail waiting in my mail host, and deposits it in
    > /var/spool/mail with each user having a _file_ with pending mail in it.


    Forget that, it does not matter. You use fetchmail to pull in mail from
    outside, but you can also use another fetchmail instance to pull email
    from inside. I would create a new user on that server machine (I'll call
    the machine with dovecot "server"), and try fetching email using that
    user. With the option "keep" in fetchmail you can run multiple tests.
    And with "fetchlimit" you also make those runs short, no need to
    download the entire queue.

    So yes, you would have the same configuration as now with the "system"
    fetchmail placing mail on "/var/spool/mail with each user having a
    _file_ with pending mail in it", as you say.

    Another fetchmail, running for a different, local user, could do
    something else, for testing. (It would actually put email on
    /var/spool/mail/newuser).


    >>> BTW, in the conf file, option -location = mbox:/var/spool/mai-l, I
    >>> tried mbox and maildir. Neither helped the "no mail waiting" issue.>

    >>
    >> I use:
    >>
    >>>

    > Code:
    > --------------------
    > > >

    > > mail_location = mbox:~/Mail:INBOX=/var/mail/%u
    > >

    > --------------------
    >>>

    >>
    >> which covers both "/var/mail/user" in mbox (the default) and "~/Mail"
    >> directories on users homes.


    > Does dovecot's -mail_location = mbox:~/Mail:INBOX=/var/mail/%u- resolve
    > to looking for a directory or a file?


    A file. The mbox file. Actually, the file would be "/var/mail/username".
    But also all files under the directory "/home/username/Mail/".

    Typically, you have on "/var/mail/username" the INBOX folder. Linux mail
    client programs (MUA) pick the email from there and put it on
    "/home/username/Mail/". That's a typical configuration.

    For example, I run procmail filters that automatically
    distribute emails from the inbox into different folders
    on home. Dovecot is configured to see both places.

    In your case, I think that the second place would be empty; but
    connecting via IMAP while testing things, the imap folders would be
    created there.

    Imap can be disabled. Or, you can simply block it on the
    firewall, so that internally you can test dovecot configuration
    with it enabled.

    That's one of the possible configurations. On a server, the main storage
    (not the inbox) could be placed on a different directory than "homes".
    It is mainly irrelevant where it is.

    >
    > Here's the current set of mail queues in /var/spool/mail:
    >
    > Code:
    > --------------------
    >
    > samwise /home/system> gotmail
    > total 244
    > 8799880 drwxrwxrwt 3 root 4096 Jan 29 22:59 .
    > 8677459 drwxr-xr-x 14 root 4096 Jan 26 21:19 ..
    > 8800712 -rw-rw---- 1 users 163727 Jan 30 13:40 chris
    > 8800713 -rw------- 1 users 19298 Jan 15 20:16 gunter
    > 9064422 drwxrwxrwx 3 users 4096 Jan 29 22:59 .imap
    > 8800830 -rw------- 1 users 0 Jan 29 22:59 inbox
    > 8800714 -rw------- 1 users 30860 Jan 30 13:43 pavilion
    > 8800715 -rw------- 1 users 9505 Jan 30 13:43 system
    > 8800716 -rw------- 1 users 5869 Jan 30 13:39 wxsys
    >
    > --------------------
    > (.imap and inbox were added by dovecot)


    Notice that "/var/spool/mail" is by default a symlink to "/var/mail".

    The ".inbox" and ".imap" files have probably appeared because you did
    not define a location for imap folders. With my suggested config it does
    not happen.


    I'll answer here parts from the other thread.

    On 2014-01-30 20:06, RBEmerson wrote:


    > Went there did that, except /var/spool/mail/%u to match what exists
    > already, from qpopper and fetchmail.


    Both locations are the same, there is a symlink. Or there should be.



    >> /etc/dovecot/conf.d/10-auth.conf
    >>
    >>>

    > Code:
    > --------------------
    > > >

    > > #CER
    > > # I used "disable_plaintext_auth = no" initially for use with imapsync.
    > > # later I used --ssl1 on imapsync and opening imaps on firewall
    > >

    > --------------------
    >
    > Er, no imap here - is this needed?


    No. It is just a comment on my config files, a note to myself.
    The relevant point for you is that plain text auth is disabled by
    default, which means that if the ssl certificates do not work, you can
    not connect. So the "no" above temporarily disables this, so that you
    can work out the storages first.


    > Summarizing, no change to signing in (passwords in the plain work, not
    > thing else does), no change to finding mail. I used fetchmail -k to
    > bring down the current mail queue, including mail sent from outside, to
    > system@pinefields.com. The mail is in system's queue, but TB doesn't
    > find it, which it did with qpopper.
    >
    > How does dovecot tie to port 110? I don't see it with xinetd - which
    > still shows pop, pop2, and pop3 with links to the old qpopper-based
    > programs.


    You have to disable the xinetd parts for qpopper, it could confuse
    things. Dovecot is a daemon running full time, it does not show on xinetd.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  8. #8

    Default Re: Need help configuring dovecot as pop3 server

    I'm very sorry but I'll have to take a break. Revising the mail architecture needs more time than I have or will have for quite a while.

    I appreciate all the effort you've put into this project. I hope it's of use to others, too. :-)
    Sometimes I sits and thinks, sometimes I just sits...

  9. #9
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Need help configuring dovecot as pop3 server

    On 2014-01-31 01:36, RBEmerson wrote:
    >
    > I'm very sorry but I'll have to take a break. Revising the mail
    > architecture needs more time than I have or will have for quite a while.


    Understood :-)

    > I appreciate all the effort you've put into this project. I hope it's of
    > use to others, too. :-)


    Yes, other people might read this in the future.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •