Postfix, maildir, not virtual..

Discussion in 'Installation/Configuration' started by TheRudy, May 22, 2008.

  1. TheRudy

    TheRudy ISPConfig Developer ISPConfig Developer

    Hey

    Requesting help :)

    I've set up a server that will host only 1 domain!! All other crap is set and now i want email also. I've installed postfix with courier (took procedure from Debian Etch perfect setup: http://www.howtoforge.com/perfect_setup_debian_etch_p5)

    I did everything on that page. I know that is for virtual set up so i hope i didn't fuck up..

    Now to the questions/problems

    1. I've set up an account "[email protected]" and i logged in with root password for server :S but it logs in just fine! The problem is:
    Code:
    May 21 18:34:03 tmqserver courierpop3login: chdir Maildir: No such file or directory
    
    Right, so i've read that maildir should be created when 1st email gets in but no matter how many emails i send, the error message is always the one above!

    2. How do i remove root email and set up other email for 1 domain name?

    Again, i do not want to use virtual setup since i'm hosting only 1 domain name that will be in use only by me..

    This is my main.cf
    Code:
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no
    append_dot_mydomain = no
    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
    myhostname = tmqserver.DOMAIN.TLD
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = tmqserver.DOMAIN.TLD, localhost.DOMAIN.TLD, localhost.localdomain, 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/
    
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Usually root's emails are forwarded to postmaster. What's in /etc/aliases?

    This link might help you: http://www.howtoforge.com/forums/showthread.php?t=2
     
  3. TheRudy

    TheRudy ISPConfig Developer ISPConfig Developer

    /etc/aliases
    Code:
    # See man 5 aliases for format
    postmaster:    root
    
    As for second, i think that link explains it all. Will give it a go..
     
  4. TheRudy

    TheRudy ISPConfig Developer ISPConfig Developer

    Could it be that Courier has wrong permissions?

    Code:
    May 22 09:08:33 tmqserver courierpop3login: info: chdir(/home/info) failed!!
    May 22 09:08:33 tmqserver courierpop3login: error: No such file or directory
    
    /home/info DOES exist!

    Since
    Code:
    useradd -d /home/sample_user -g users sample_user
    doesn't create folder, i made it with mkdir and set chown info:users

    Think this could be a problem?
     
  5. TheRudy

    TheRudy ISPConfig Developer ISPConfig Developer

    Right, so now that i created Maildir folders with maildir something command, i get this error when i log in with email client:

    Code:
     courierpop3login: chdir Maildir: Permission denied
    So, what permissions should there be set for Maildir and subdirs? I have chmod 700 set, but group and user?
     
  6. TheRudy

    TheRudy ISPConfig Developer ISPConfig Developer

    Right, owner is set to account and group to "users"

    Login now works without any errors! Hurray for me..

    Still tho, sending email to this email account has no result. Nothing in the logs also... What could be a problem? Where to look?
     
  7. TheRudy

    TheRudy ISPConfig Developer ISPConfig Developer

    Problem solved :)

    Reason for mail not coming in was smtp not set in firewall :S

    All works now.

    Thanks falko ;)
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Use
    Code:
    useradd -d /home/sample_user [COLOR="Red"]-m[/COLOR] -g users sample_user
    instead; the -m switch creates the homedir. :)
     
  9. TheRudy

    TheRudy ISPConfig Developer ISPConfig Developer

    Yeah, found the -m option after everything was working :S
     

Share This Page