Problem with Postfix/Dovecot simple server: no such file or directory

Discussion in 'Installation/Configuration' started by dmontpe, Jun 27, 2010.

  1. dmontpe

    dmontpe New Member

    After trying several ones, I've come down to the simplest of server configurations and still can't get it to work. It's just Postfix/Dovecot by the tutorial from centos.org.

    I can send mail using telnet fine but when I try to connect from home via Thunderbird I get 'Internal error occurred'. The log says directories don't exist. Now, I guess this should be created by dovecot so maybe it's a permissions issue? Please, help!

    Versions: Centos 5.5 / Postfix 2.3.3 / Dovecot 1.0.7

    /var/log/maillog:
    Code:
    Jun 27 19:12:47 mail dovecot: IMAP(admont): open(/home/admont/Maildir/temp./root.19207.839b277620b0522c) failed: No such file or directory
    Jun 27 19:12:47 mail dovecot: IMAP(admont): file_dotlock_open(/home/admont/Maildir/dovecot-uidlist) failed: No such file or directory
    Jun 27 19:13:49 mail dovecot: imap-login: Login: user=<admont>, method=PLAIN, rip=::ffff:88.23.112.146, lip=::ffff:173.203.80.152
    Jun 27 19:13:49 mail dovecot: IMAP(admont): open(/home/admont/Maildir/.temp./root.19212.d7d30d9638e5dad9) failed: No such file or directory
    Jun 27 19:13:49 mail dovecot: IMAP(admont): file_dotlock_open() failed with file /home/admont/Maildir/dovecot.index.log: No such file or directory
    Jun 27 19:13:49 mail dovecot: IMAP(admont): open(/home/admont/Maildir/temp./root.19212.f9c7a315ab83b6d0) failed: No such file or directory
    Jun 27 19:13:49 mail dovecot: IMAP(admont): file_dotlock_open(/home/admont/Maildir/dovecot-uidlist) failed: No such file or directory
    dovecot.conf
    Code:
    protocols = imap imaps pop3 pop3s
    login_process_size = 64
    mail_location = maildir:~/Maildir
    protocol imap {
    }
    protocol pop3 {
      pop3_uidl_format = %08Xu%08Xv
    }
    protocol lda {
      postmaster_address = [email protected]
    }
    auth default {
      mechanisms = plain
      passdb pam {
      }
      userdb passwd {
      }
      user = root
    }
    dict {
    }
    plugin {
    }
    
    /postfix/main.cf
    Code:
    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/libexec/postfix
    mail_owner = postfix
    myhostname = mail.estacionposibilidad.es
    mydomain = estacionposibilidad.es
    myorigin = $mydomain
    inet_interfaces = all
    inet_interfaces = localhost
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    unknown_local_recipient_reject_code = 550
    mynetworks = 127.0.0.0/8
    relay_domains =
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    home_mailbox = Maildir/
    debug_peer_level = 2
    debugger_command =
             PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
             xxgdb $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.3.3/samples
    readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
    smtpd_delay_reject = yes
    smtpd_helo_required = yes
    smtpd_helo_restrictions =
        permit_mynetworks,
        reject_non_fqdn_helo_hostname,
        reject_invalid_helo_hostname,
        permit
    smtpd_sender_restrictions =
        permit_mynetworks,
        reject_non_fqdn_sender,
        reject_unknown_sender_domain,
        permit
    smtpd_recipient_restrictions =
       reject_unauth_pipelining,
       reject_non_fqdn_recipient,
       reject_unknown_recipient_domain,
       permit_mynetworks,
       reject_unauth_destination,
       check_sender_access
             hash:/etc/postfix/sender_access,
       reject_rbl_client zen.spamhaus.org,
       reject_rbl_client bl.spamcop.net,
       check_policy_service unix:postgrey/socket,
       permit
    
     
  2. falko

    falko Super Moderator Howtoforge Staff

    You must send an email to a new account first - Maildir will then be created automatically.
     
  3. dmontpe

    dmontpe New Member

    I already did and my message didn't bounce back so I guess it was delivered.
     
  4. falko

    falko Super Moderator Howtoforge Staff

    What's in the mail log when you try to send an email to that account?
     
  5. dmontpe

    dmontpe New Member

    Thanks for taking the time, Falko.

    I tried again and got one line:

    Code:
    Jun 29 15:51:28 mail dovecot: imap-login: Disconnected: rip=::ffff:79.153.177.214, lip=::ffff:173.203.80.152
    Now, along with that I just saw this from earlier, which sounds important though I have no clue what it means:

    Code:
    Jun 29 15:40:34 mail postfix/qmgr[19069]: 7A68CA85B0: from=<[email protected]>, size=691, nrcpt=1 (queue active)
    Jun 29 15:40:34 mail postfix/local[17867]: warning: valid_hostname: invalid character 47(decimal): /root
    Jun 29 15:40:34 mail postfix/local[17867]: fatal: unable to use my own hostname
    Jun 29 15:40:35 mail postfix/qmgr[19069]: warning: premature end-of-input on private/local socket while reading input attribute name
    Jun 29 15:40:35 mail postfix/qmgr[19069]: warning: private/local socket: malformed response
    Jun 29 15:40:35 mail postfix/qmgr[19069]: warning: transport local failure -- see a previous warning/fatal/panic logfile record for the problem description
    Jun 29 15:40:35 mail postfix/master[19052]: warning: process /usr/libexec/postfix/local pid 17867 exit status 1
    Jun 29 15:40:35 mail postfix/master[19052]: warning: /usr/libexec/postfix/local: bad command startup -- throttling
    Jun 29 15:40:35 mail postfix/qmgr[19069]: 7A68CA85B0: to=<[email protected]>, orig_to=<root>, relay=none, delay=43833, delays=43832/1.1/0/0, dsn=4.3.0, status=deferred (unknown mail transport error)
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Can you post your /etc/postfix/main.cf?
    What's the output of
    Code:
    hostname
    and
    Code:
    hostname -f
    ? What's in /etc/hosts?
     
  7. dmontpe

    dmontpe New Member

    #hostname
    /root

    #hostname -f
    hostname: Unknown host

    /etc/hosts:
    127.0.0.1 localhost localhost.localdomain
    173.203.80.152 mail.estacionposibilidad.es

    And my /etc/postfix/main.cf is the same I posted in my first message. I haven't changed anything.
     
  8. falko

    falko Super Moderator Howtoforge Staff

    That's no valid hostname. Please run
    Code:
    system-config-network
    and correct it.
     
  9. dmontpe

    dmontpe New Member

    OK. Now that part was an easy fix. I found my hostname was correct in network config, so I figured a reboot might work. I would've tried that earlier had I realized something was wrong with hostname, so thanks for the tip. I still need to figure out the rest.

    Now, I don't understand one thing. When I first tried configuring Postfix, I did with Courier and MySQL, so I knew exactly what the usernames and passwords were because I added them myself to the db. But with this "simple" config, I don't know what I should use to connect and how to add new addresses. My first guess is I create new addresses by creating new server users and passwords. Is that right?

    Now, after reboot I tried sending an email and then checking my mail again and this is what I got in /var/log/maillog:

    Code:
    Jul  2 12:05:37 mail dovecot: imap-login: Aborted login: rip=::ffff:79.153.177.214, lip=::ffff:173.203.80.152
    Jul  2 12:06:43 mail dovecot: imap-login: Login: user=<admont>, method=PLAIN, rip=::ffff:79.153.177.214, lip=               ::ffff:173.203.80.152
    Jul  2 12:07:11 mail last message repeated 2 times
    Jul  2 12:19:49 mail dovecot: Time just moved backwards by 73 seconds. This might cause a lot of problems, so                I'll just kill myself now. http://wiki.dovecot.org/TimeMovedBackwards
    
    I will check the solutions for this in that web page but I'll go ahead and post this in case you have any suggestions.
     
  10. dmontpe

    dmontpe New Member

    Update on the 'time moved backwards' error:

    I checked and ntpd does start at boot before dovecot does, so the problem isn't there. I'll keep checking the other possible causes for this problem.
     
  11. falko

    falko Super Moderator Howtoforge Staff

    I don't know the exact configuration, but if you're using a MySQL database with this setup, then the username probably is the email address. Otherwise, you probably have to create system users for your email accounts. This link might help: http://www.howtoforge.com/forums/showthread.php?t=2
     

Share This Page