Courier POP3 login refusal

Discussion in 'Server Operation' started by bahadirtonguc, Apr 9, 2008.

  1. bahadirtonguc

    bahadirtonguc New Member

    hello,

    I just installed Postfix and Courier. Postfix can receive messages (I can monitor from Webmin GUI) but when I try login inside or outside the network, it asks username and password then -ERR login failed. I try logging in with real accounts. What can be wrong. SMTP working okay but POP3 wont let me in..

    I tried "telnet localhost pop3" or "telnet xx.xxx.xxx.xx 110" and both giving the same error.

    Thanks for helping
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Any errors in your mail log?
    How did you install Courier?
     
  3. bahadirtonguc

    bahadirtonguc New Member

    popa3d

    after a hard try, installing/removing courier 100 times, I installed popa3d and all was solved all of a sudden.. Why it is not told in forums and websites instead of writing millions of pages about courier..

    bahadir
     
  4. trallador

    trallador New Member

  5. falko

    falko Super Moderator Howtoforge Staff

    Any errors in your mail log?
     
  6. trallador

    trallador New Member

    Ok partially solutioned. Now pop auth correctly but imap its not okay
     
    Last edited: Apr 13, 2008
  7. falko

    falko Super Moderator Howtoforge Staff

    I need the error messages from your mail log (in /var/log), otherwise I can't help you.
     
  8. imitrik

    imitrik New Member

    Having the same issue with courier pop3

    Hi! I have the same issue with loging to pop3 on courier (have ispconfig installed, postfix and courier). I can see in webmin that mail is arriving in the Maildir in the specified account, but neather /mailuser, nor /webmail can log in. In both cases the same error:
    mail.log:
    Apr 17 19:17:11 SERVER courierpop3login: Connection, ip=[::ffff:X.Y.Z.D]
    Apr 17 19:17:11 SERVER courierpop3login: LOGIN FAILED, [email protected], ip=[::ffff:X.Y.Z.D]
    Apr 17 19:17:16 SERVER courierpop3login: Disconnected, ip=[::ffff:X.Y.Z.D],

    Can you help me?
    Have tried loging in with e-mail and username as username, but nothing done. :confused:
     
  9. falko

    falko Super Moderator Howtoforge Staff

    [email protected] is the wrong username. It must be something like web1_user. If it still doesn't work, please post the error messages again.
     
  10. imitrik

    imitrik New Member

    I was researching through couriers files and found that in authmysqlrc (located in /etc/courier/), the file is left intend from my last configuration(other then ispconfig), and think that this is what is wrong about loging error(i have tried also with web1_USER, but no effect):
    MYSQL_SERVER localhost
    MYSQL_USERNAME mail_admin
    MYSQL_PASSWORD mail_pass
    MYSQL_PORT 3306
    MYSQL_DATABASE mail
    MYSQL_USER_TABLE users
    MYSQL_CRYPT_PWFIELD password
    #MYSQL_CLEAR_PWFIELD password
    MYSQL_UID_FIELD 5000
    MYSQL_GID_FIELD 5000
    MYSQL_LOGIN_FIELD email
    MYSQL_HOME_FIELD "/home/vmail"
    MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
    #MYSQL_NAME_FIELD
    MYSQL_QUOTA_FIELD quota

    This file tells courier to use other database (virtualmin created, before I removed it, but courier conf. unfortunately left untouched after ispconfig installation)
    Can you help me, what should be the content of this file for ispconfig?

    Thanks a lot!

    This is my postfix conf. file:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version


    # Debian specific: Specifying a file name will cause the first
    # line of that file to be used as the name. The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname

    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no

    # appending .domain is the MUA's job.
    append_dot_mydomain = no

    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h

    readme_directory = /usr/share/doc/postfix

    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.

    myhostname = www.example.net
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination = example1.com, example2.com, localhost
    relayhost =
    mynetworks = 127.0.0.0/8
    mailbox_command =
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    inet_protocols = all
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    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
    home_mailbox = Maildir/

    virtual_maps = hash:/etc/postfix/virtusertable

    mydestination = /etc/postfix/local-host-names
    debug_peer_list = example.org
     
    Last edited: Apr 18, 2008
  11. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/courier/authdaemonrc?
     
  12. imitrik

    imitrik New Member

    Here it is:

    ##VERSION: $Id: authdaemonrc.in,v 1.13 2005/10/05 00:07:32 mrsam Exp $
    #
    # Copyright 2000-2005 Double Precision, Inc. See COPYING for
    # distribution information.
    #
    # authdaemonrc created from authdaemonrc.dist by sysconftool
    #
    # Do not alter lines that begin with ##, they are used when upgrading
    # this configuration.
    #
    # This file configures authdaemond, the resident authentication daemon.
    #
    # Comments in this file are ignored. Although this file is intended to
    # be sourced as a shell script, authdaemond parses it manually, so
    # the acceptable syntax is a bit limited. Multiline variable contents,
    # with the \ continuation character, are not allowed. Everything must
    # fit on one line. Do not use any additional whitespace for indentation,
    # or anything else.

    ##NAME: authmodulelist:2
    #
    # The authentication modules that are linked into authdaemond. The
    # default list is installed. You may selectively disable modules simply
    # by removing them from the following list. The available modules you
    # can use are: authuserdb authpam authpgsql authldap authmysql authcustom authpipe

    #authmodulelist="authpam"
    authmodulelist="authmysql"

    ##NAME: authmodulelistorig:3
    #
    # This setting is used by Courier's webadmin module, and should be left
    # alone

    authmodulelistorig="authuserdb authpam authpgsql authldap authmysql authcustom authpipe"

    ##NAME: daemons:0
    #
    # The number of daemon processes that are started. authdaemon is typically
    # installed where authentication modules are relatively expensive: such
    # as authldap, or authmysql, so it's better to have a number of them running.
    # PLEASE NOTE: Some platforms may experience a problem if there's more than
    # one daemon. Specifically, SystemV derived platforms that use TLI with
    # socket emulation. I'm suspicious of TLI's ability to handle multiple
    # processes accepting connections on the same filesystem domain socket.
    #
    # You may need to increase daemons if as your system load increases. Symptoms
    # include sporadic authentication failures. If you start getting
    # authentication failures, increase daemons. However, the default of 5
    # SHOULD be sufficient. Bumping up daemon count is only a short-term
    # solution. The permanent solution is to add more resources: RAM, faster
    # disks, faster CPUs...

    daemons=5

    ##NAME: authdaemonvar:2
    #
    # authdaemonvar is here, but is not used directly by authdaemond. It's
    # used by various configuration and build scripts, so don't touch it!

    authdaemonvar=/var/run/courier/authdaemon

    ##NAME: DEBUG_LOGIN:0
    #
    # Dump additional diagnostics to syslog
    #
    # DEBUG_LOGIN=0 - turn off debugging
    # DEBUG_LOGIN=1 - turn on debugging
    # DEBUG_LOGIN=2 - turn on debugging + log passwords too
    #
    # ** YES ** - DEBUG_LOGIN=2 places passwords into syslog.
    #
    # Note that most information is sent to syslog at level 'debug', so
    # you may need to modify your /etc/syslog.conf to be able to see it.

    DEBUG_LOGIN=0

    ##NAME: DEFAULTOPTIONS:0
    #
    # A comma-separated list of option=value pairs. Each option is applied
    # to an account if the account does not have its own specific value for
    # that option. So for example, you can set
    # DEFAULTOPTIONS="disablewebmail=1,disableimap=1"
    # and then enable webmail and/or imap on individual accounts by setting
    # disablewebmail=0 and/or disableimap=0 on the account.

    DEFAULTOPTIONS=""

    ##NAME: LOGGEROPTS:0
    #
    # courierlogger(1) options, e.g. to set syslog facility
    #

    LOGGEROPTS=""

    ##NAME: LDAP_TLS_OPTIONS:0
    #
    # Options documented in ldap.conf(5) can be set here, prefixed with 'LDAP'.
    # Examples:
    #
    #LDAPTLS_CACERT=/path/to/cacert.pem
    #LDAPTLS_REQCERT=demand
    #LDAPTLS_CERT=/path/to/clientcert.pem
    #LDAPTLS_KEY=/path/to/clientkey.pem
     
  13. falko

    falko Super Moderator Howtoforge Staff

    Change
    Code:
    authmodulelist="authmysql"
    to
    Code:
    authmodulelist="authpam"
    and restart Courier.
     
  14. imitrik

    imitrik New Member

    You are a genious!

    It works like a song! Thanks a lot man! :)
     

Share This Page