Can't receive emails via POP3

Discussion in 'Installation/Configuration' started by ajw_doc, Jun 30, 2008.

  1. ajw_doc

    ajw_doc New Member

    Hi,

    Can't receive emails via POP3. I'm running Dovecot, Maildir is checked. IMAP accounts on the same domain are fine but pop3 isn't. Mail is delivered but can't be downloaded.

    Last log entry for pop3 connection:

    Code:
    Jun 30 11:06:34 server1 dovecot: pop3-login: Login: user=<name.domain.org>, method=PLAIN, rip=::ffff:xx.xx.xxx.xxx, lip=::ffff:xx.xx.xxx.xxx
    Jun 30 11:06:34 server1 dovecot: POP3(name.domain.org): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
    
    To be on safe side I delete user and recreated them but still no joy.

    Any ideas?

    Thanks

    AJ
     
  2. till

    till Super Moderator

    And the login with the exact same username with IMAP works?
     
  3. ajw_doc

    ajw_doc New Member

    Hi,

    IMAP is the same for this account. Can connect fine and with no errors in mail log but no email downloads. There are two in new at the moment so they are getting delivered.
     
  4. ajw_doc

    ajw_doc New Member

    I think I might have worked out the problem.

    For other domains everything is under /home/domain/user/userid/Maildir/

    but for this one it seems to create a new user thus: /home/domain/user/userid/user/userid/Maildir

    The email is being delivered to /home/domain/user/userid/Maildir/new as it should be but it's connecting to the above extra directory which has nothing in. I'm not sure why this is as the other two accounts on that domain are set up properly as are the accounts on other domains.

    [edit]
    I've tried adding a brand new user - this is set up correctly but still can't receive email via POP or IMAP :confused:
     
    Last edited: Jun 30, 2008
  5. till

    till Super Moderator

    Ok, I guess you dont use ISPConfig, as ISPConfig never uses these directories? I will move your post to a general forum.
     
  6. ajw_doc

    ajw_doc New Member

    Yes I do use ISpconfig hence posting in the ispconfig section so can you move it back please? The only thing that has been changed is the dovecot mail location as it was wrong. and the location of the domain directories as I have them on a second drive mounted to home.
     
    Last edited: Jun 30, 2008
  7. till

    till Super Moderator

    Ok. Please post the content of the main.cf file, comments stripped.
     
  8. ajw_doc

    ajw_doc New Member

    Will do. As an aside I've completely removed the domain, emptied recylce bin and re added everything. Same thing happens but only to the same account. It's very odd!
     
  9. ajw_doc

    ajw_doc New Member

    Code:
    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/libexec/postfix
    data_directory = /var/lib/postfix
    mail_owner = postfix
    inet_interfaces = all
    mydestination = $myhostname, localhost.$mydomain, localhost
    unknown_local_recipient_reject_code = 550
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    debug_peer_level = 2
    debugger_command =
    	 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    	 ddd $daemon_directory/$process_name $process_id & sleep 5
    
    sendmail_path = /usr/sbin/sendmail.postfix
    newaliases_path = /usr/bin/newaliases.postfix
    mailq_path = /usr/bin/mailq.postfix
    setgid_group = postdrop
    html_directory = no
    manpage_directory = /usr/share/man
    sample_directory = /usr/share/doc/postfix-2.5.1/samples
    readme_directory = /usr/share/doc/postfix-2.5.1/README_FILES
    inet_protocols = all
    smtpd_sasl_local_domain = 
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    mynetworks = 127.0.0.0/8
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtpd_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    myhostname = server1.domain.co.uk
    home_mailbox = Maildir/
    mailbox_command = 
    virtual_maps = hash:/etc/postfix/virtusertable
    mydestination = /etc/postfix/local-host-names
    
    I followed this setup http://howtoforge.com/perfect-server-fedora9
     
  10. ajw_doc

    ajw_doc New Member

    I've worked out what the problem is - but I don't know the solution to it :)

    It so happens that all other accounts on the server are admin accounts - these all work fine. I've just tried adding a normal account to another domain and get the same problem - it creates the Maildir in an extra user folder within the username folder.

    Is this because I have the mail location in dovecot.conf set as:
    Code:
    mail_location = maildir:~/user/%u/Maildir
    However, if this is the problem what is the correct path as that is the only thing that works for all my other (admin) email accounts?
     
  11. ajw_doc

    ajw_doc New Member

    It's definitely dovecot and the path to the mail_location.

    If I change it to:
    Code:
    mail_location = maildir:~/Maildir
    the normal user accounts work fine but the admin accounts don't work.

    Error with admin is "No such file or directory" when trying to create the cur under Maildir. The admin accounts have a Maildir directory under home but when I ssh in as an admin user I can't cd into it. I'll continue to work on trying to fathom that bit out but if anyone has any ideas let me know!

    Adam
     
  12. ajw_doc

    ajw_doc New Member

    Email accounts work if you untick the Administrator option under User & Email - so really not sure what is going on. Odd that when you make a user an administrator it goes wrong. I can cope with it like this for now but not for ever.

    AJ
     
  13. ajw_doc

    ajw_doc New Member

    This is actually causing me a really big problem now. I can't run sites as they run as the admin user not apache and if admin is on for a user I can't access email.

    Can anyone help with this as it seems to me to be something ISPconfig does when the administrator box is ticked.
     
  14. ajw_doc

    ajw_doc New Member

    Could it be a symlink permissions thing? This is where it seems to stumble. As a user it is already in the user home directory so goes straight to the proper Maildir. When an admin user it logs into the site root so the Maildir is a symlink - it is this bit it falls down on. As far as I can see permissions are ok though.
     
  15. till

    till Super Moderator

    Thats all fine. The admin user has always these symlinks. Please run the command "ls -la" in the website root directory and post the output.
     
  16. ajw_doc

    ajw_doc New Member

    Hi Till,

    I managed to get it working (at least temporarily) by deleting the symlink and then re creating it. Why that has worked I can't tell you, but the two user's I tested it on had previously been deleted off the system and recreated and still didn't work.



    Current output of ls-al is:

    Code:
    lrwxrwxrwx  1 root                 root       33 2008-06-30 23:02 Maildir -> user/name.domain.com/Maildir
    So I checked another domain where I haven't recreated the symlink and here's the problem. The ISPconfig generated symlink is

    Code:
    lrwxrwxrwx  1 root                   root   46 2008-06-30 16:23 Maildir -> /home/web7/user/user.domain.com/Maildir
    Obviously the admin user has issues accessing the domain like that so can I edit any of the ISPconfig files to change how it creates a symlink? Or is there something else that I can do?

    Thanks,

    AJ
     
    Last edited: Jul 1, 2008
  17. ajw_doc

    ajw_doc New Member

    BUMP... anyone?
     
  18. ajw_doc

    ajw_doc New Member

    Sorry for the bumb but the symlink gets overwritten with a non working one everytime I make a change in ISPconfig. Can someone confirm either that it's or bug or which file to edit within ISPconfig to change the way it writes it? Please!
     
  19. falko

    falko Super Moderator

    It's not a bug.
    You'd have to modify /root/ispconfig/scripts/lib/config.lib.php.
     
  20. ajw_doc

    ajw_doc New Member

    Cool I'll take a look.

    If it isn't a bug what could the problem be? Permissions on the home directory?
     

Share This Page