Problem with Postfix-Courier-Maildir

Discussion in 'Installation/Configuration' started by nuclear_nets, Nov 7, 2005.

  1. nuclear_nets

    nuclear_nets New Member

    Password was rejested/Maildir: No Such file or directory

    I apologize now for the long post but I wanted to give as much information as possible.

    I followed the tutorial, and Outlook Express is giving me an error that I cannot login.

    There was a problem logging onto your mail server. Your Password was rejected. Account: 'i192.168.1.139', Server: '192.168.1.139', Protocol: POP3, Server Response: '-ERR Maildir: No such file or directory', Port: 110, Secure(SSL): No, Server Error: 0x800CCC90, Error Number: 0x800CCC92

    I've checked the directory /home/vmail and nothing is there.

    This is the tail of mail.log

    Nov 6 19:24:31 localhost courierpop3login: LOGIN: DEBUG: ip=[::ffff:192.168.1.2], command=USER
    Nov 6 19:24:31 localhost courierpop3login: LOGIN: DEBUG: ip=[::ffff:192.168.1.2], command=PASS
    Nov 6 19:24:31 localhost courierpop3login: LOGIN: DEBUG: ip=[::ffff:192.168.1.2], username=wayne@mail.mcknight.homelinux.net
    Nov 6 19:24:31 localhost courierpop3login: LOGIN: DEBUG: ip=[::ffff:192.168.1.2], password=******** (This is correct)
    Nov 6 19:24:31 localhost courierpop3login: authdaemon: starting client module
    Nov 6 19:24:31 localhost courierpop3login: authdaemon: ACCEPT, username wayne@mail.mcknight.homelinux.net


    I also got the same result using the <sales@example.com>

    This is the tail of mail.log when I send a message

    Nov 6 19:41:45 localhost postfix/local[16026]: D9CC51C80B3: to=<wayne@mail.mcknight.homelinux.net>, relay=local, delay=0, status=sent (delivered to maildir)
    Nov 6 19:41:45 localhost postfix/qmgr[15708]: D9CC51C80B3: removed

    Below is my main.cf file contents

    # See /usr/share/postfix/main.cf.dist for a commented, more complete version

    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    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

    myhostname = mail.mcknight.homelinux.net
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = localhost, localhost.localdomain
    relayhost =
    mynetworks = 127.0.0.0/8
    mailbox_command =
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    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/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    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_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /home/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_create_maildirsize = yes
    virtual_mailbox_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps

    Thanks for any help that anyone can provide to me.
     
    Last edited: Nov 7, 2005
  2. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Have you send an email to this account? Postfix will create the maildir when the first email arrives. I assuje the path to the maildir is in the database, is it correct and corresponds with the settings in the courier setup?
     
  3. nuclear_nets

    nuclear_nets New Member

    I have sent an email to the account, I have done so using telnet manually and also with outlook. The Path to the maildir isn't in the database. It appears that it is set by the CONCAT commands in the *.cf files.
     
  4. nuclear_nets

    nuclear_nets New Member

    contents of the mysql-virtual_mailboxes.cf:

    user = mail_admin
    password = ******* (this is correct)
    dbname = mail
    table = users
    select_field = CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
    where_field = email
    hosts = 127.0.0.1
     
  5. nuclear_nets

    nuclear_nets New Member

    Well I fixed it, the suggestion made me try again. I had forgotten earlier in the process I had an error about myhostname and mydestination containing same information. I had removed the "mail.mcknight.homelinux.net" after I had sent the email. The problem was it went to /home/wayne/Maildir/new. After removing the "mail.mcknight.homelinux.net" from mydestination the mail successfully went to "/home/vmail/mail.mcknight.homelinux.net/wayne/new"

    I also had a local user account called wayne, I am assuming that's why when the host name was in mydestination, it assumed the ACTUAL system user wayne was supposed to get the mail.

    myhostname = mail.mcknight.homelinux.net
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = mail.mcknight.homelinux.net, localhost, localhost.localdomain
     

Share This Page