imapd: chdir ... No such file or directory

Discussion in 'Server Operation' started by fzhan, Jan 31, 2010.

  1. fzhan

    fzhan New Member

    Dear all,

    I followed this tutorial http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-centos-5.3-x86_64 to setup my own mail server and meet some weird problem, I've used linux for a couple of years, but very new to email systems.

    here's my problem:

    I've complete the setup following the tutorial, and while I was using thunderbird for testing IMAP-SSL, I get an message saying :

    Code:
    Jan 31 01:46:27 example.com imapd: chdir example.com/virtualuser/: No such file or directory
    Jan 31 01:46:27 example.com imapd: [email protected]: No such file or directory
    
    as for my authmysqlrc I have:

    Code:
    MYSQL_LOGIN_FIELD email
    MYSQL_HOME_FIELD "/home/vmail"
    MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
    
    please help! many thanks! :)
     
  2. fzhan

    fzhan New Member

    I'm able to send through smtp using that virtualuser, and has send a email to this [email protected] email address following the instruction stated that courier will create a maildir automaticly when receive new email for virtual account.

    another question:
    I can telnet to this server on port 25 from another machine and send emails (to local, if rcpt to other email than this server will get a relay denied message) without authentication? How do I put on the authentication? Or is this even an spam/security issue?

    Thanks,
     
    Last edited: Jan 31, 2010
  3. fzhan

    fzhan New Member

    okay I think I figured it out halfway:

    I put my hostname in virtual domain table in MYsql, and used virtual users for postmaster etc. But postfix define the virtual users to real user because mydestination=virtual domain... Therefore mailsdir cannot be found, because it cannot receive email. Am I right?

    If yes,
    1. How do I setup virtual user for real domain/my hostname
    2. Why can't I use subdomain for virtual host? i have example.com for real user emails and mail.example.com for virtual domain/ virtual users. How do I do this?

    Tnx
     
  4. falko

    falko Super Moderator Howtoforge Staff

    You can use a domain/hostname either for system users or for virtual users, but not for both at the same time. If you want to use it for virtual users, the domain/hostname must be in the database, but not in mydestination, and vice versa.
     
  5. fzhan

    fzhan New Member

    Can you be little bit more specific please?
    I have example.com MX handled by google apps at the moment.
    So I setup news.example.com for newsletter purpose.

    I now have mydestination set to example.com, problem is I cannot receive email send from this server to [email protected] because 'User unknown in local recipient table'.
    I suppose set mydestination to 'news.example.com' I will not be able to have it as virtual domain?
    And the first problem was solved by setup a virtual domain 'news1.example.com' and mydestination to example.com. I was able to send/receive email using virtual user for 'news.example.com' and 'news1.example.com'.

    How do I do this right? And If I send newsletter, do I set sender as 'postmaster@mydestination' or '[email protected]' because I want the bounce message to all go to one email address.

    ~Fan
     
  6. j.smith19810808

    j.smith19810808 New Member

    I am having a very similar problem.

    What do I put my destination if I have put, in my dns as mail.jeremysmith.me.uk

    My hostnames fc10redhat.jeremysmith.me.uk

    I have in mydestination, fc10redhat.jeremysmith.me.uk

    I have as the domain for MySQL (in the db itself) in transport as domain: jeremysmith.me.uk and smtp:mail.jeremysmith.me.uk is this right?

    Can someone help me check this please?

    Sorry I dont mean to double post this problem.
     
  7. fzhan

    fzhan New Member

    In my case, I don't need to receive emails from outside the box, so what ever I have as hostname I put it in the mydestination.

    The rest are in virtual domain. So long just don't place mail.j*.me.uk in virtual domain would be fine.

    I've left this part blank, but I guess your user@j*.me.uk will be handled by postfix as long as your MX record is pointed to mail.j*.me.uk.
     
  8. lufka8

    lufka8 New Member

    Can't log to squirrelmail - ERROR: Connection dropped by IMAP server.

    ===================================================
    main.cf

    it-birmingham:/home/damian# postconf -n
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    content_filter = amavis:[127.0.0.1]:10024
    html_directory = /usr/share/doc/postfix/html
    inet_interfaces = all
    inet_protocols = all
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    message_size_limit = 30720000
    mydestination = localhost, localhost.localdomain
    myhostname = it-birmingham
    mynetworks = 127.0.0.0/8
    myorigin = /etc/mailname
    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
    readme_directory = /usr/share/doc/postfix
    receive_override_options = no_address_mappings
    recipient_delimiter = +
    relayhost =
    smtp_tls_note_starttls_offer = yes
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtp_use_tls = yes
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_sasl_local_domain =
    smtpd_sasl_security_options = noanonymous
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_auth_only = no
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtpd_tls_session_cache_timeout = 3600s
    smtpd_use_tls = yes
    tls_random_source = dev:/dev/urandom
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_alias_domains = it-birmingham.co.uk
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /home/vmail
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_maildir_extended = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    virtual_uid_maps = static:5000
    =======================================

    mail.log

    Jul 16 23:45:42 it-birmingham imapd: Connection, ip=[::ffff:127.0.0.1]
    Jul 16 23:45:42 it-birmingham imapd: chdir it-birmingham.co.uk/support/: No such file or directory
    =========================================

    What I'm doing wrong ? I tried many options......
    For any suggestions and help many thanks :)
     
  9. falko

    falko Super Moderator Howtoforge Staff

    Did you send a welcome mail to that account?
     
  10. lufka8

    lufka8 New Member

    Yes, I send email to user [email protected] and Maildir option in ispconfig is on.

    ==========================
    mail.log

    another email send and his log

    Jul 17 15:53:48 it-birmingham postfix/pickup[15860]: 5D2816E803A: uid=0 from=<root>
    Jul 17 15:53:48 it-birmingham postfix/cleanup[17021]: 5D2816E803A: message-id=<20100717145348.5D2816E803A@it-birmingham>
    Jul 17 15:53:48 it-birmingham postfix/qmgr[32138]: 5D2816E803A: from=<[email protected]>, size=349, nrcpt=1 (queue active)
    ==========================================

    Many thanks for any suggestions :)
     
  11. falko

    falko Super Moderator Howtoforge Staff

    Which ISPConfig version did you install?
     
  12. lufka8

    lufka8 New Member

    ispconfig 2

    thx for any help :)
     
  13. falko

    falko Super Moderator Howtoforge Staff

Share This Page