Where is Maildir

Discussion in 'Server Operation' started by satimis, Oct 29, 2007.

  1. satimis

    satimis New Member

    Hi folks,


    Ubuntu 7.04 server amd64
    Postfix 2.3.8


    This is a newly built server. I can't locate the Maildir after sending mail.


    Steps performed as follows;

    $ hostname
    Code:
    ubuntu
    
    $ hostname -f
    Code:
    ubuntu.mydomain.com
    
    $ cat /etc/postfix/main.cf | grep mailbox_command
    Code:
    mailbox_command = 
    
    $ cat /etc/postfix/main.cf | grep home_mailbox
    Code:
    home_mailbox = Maildir/
    
    $ cat /etc/postfix/main.cf | grep mydestination
    Code:
    mydestination = ubuntu.mydomain.com, localhost.mydomain.com, localhost.localdomain, localhost
    
    $ cat /etc/postfix/main.cf | grep inet_interfaces
    Code:
    inet_interfaces = all
    
    $ cat /etc/postfix/main.cf | grep inet_protocols
    Code:
    inet_protocols = all
    
    $ cat /etc/postfix/main.cf | grep mynetworks
    Code:
    mynetworks = 127.0.0.0/8, 192.168.1.0/24"
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    

    ping both ubuntu.mydomain.com/mydomain.com works.

    On browser type both ubuntu.mydomain.com/mydomain.com displaying Apache2 default page.


    $ telnet mail.mydomain.com 25
    Code:
    Trying 64.202.165.92...
    telnet: Unable to connect to remote host: Connection timed out
    

    $ telnet ubuntu.mydomain.com 25
    Code:
    Trying 127.0.1.1...
    Connected to ubuntu.mydomain.com.
    Escape character is '^]'.
    220 ubuntu.mydomain.com ESMTP Postfix (Ubuntu)
    ehlo mydomain.com
    250-ubuntu.mydomain.com
    250-PIPELINING
    250-SIZE 10240000
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-AUTH LOGIN PLAIN
    250-AUTH=LOGIN PLAIN
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    mail from: [email protected]
    250 2.1.0 Ok
    rcpt to: [email protected]
    250 2.1.5 Ok
    data
    354 End data with <CR><LF>.<CR><LF>
    
    Subject: My first mail for my domain
    
    Hi
    
    Are you there?
    
    Admin
    .
    250 2.0.0 Ok: queued as 85354DF0168
    quit
    221 2.0.0 Bye
    Connection closed by foreign host.
    

    $ su - fmaster
    Password:

    [email protected]:~$ ls -al
    Code:
    total 24
    drwxr-xr-x 2 fmaster fmaster 4096 2007-10-28 20:16 .
    drwxr-xr-x 5 root    root    4096 2007-10-28 09:57 ..
    -rw------- 1 fmaster fmaster  112 2007-10-29 01:40 .bash_history
    -rw-r--r-- 1 fmaster fmaster  220 2007-10-28 09:57 .bash_logout
    
    Where is the Maildir ???


    Do I need changing hostname as "mydomain.com"? If YES, please advice;

    1) Apart from /etc/hosts and /etc/postifx/main.cf what other files I have to change as well ?

    2) After changes made what command shall I run to activate the changes rather than rebooting the server ?


    TIA


    B.R.
    satimis
     
  2. falko

    falko Super Moderator ISPConfig Developer

    You must add mydomain.com to the mydestination line in /etc/postfix/main.cf and restart Postfix.
     
  3. satimis

    satimis New Member

    Problem solved

    Added already and restarted Postfix afterwards.


    It took me hours of working before I found "Maildir" together with subdirectories "cur, new, tmp" will be created automatically if a new mail arrived.

    First I ran "useradd" to create an user including its home directory and /bin/bash. I can't find Maildir on its home directory. Then I ran "telnet localhost 25" sending the user a mail. Its Maildir was created automatically with the mail delivered on "/Maildir/new/" directory.

    Now I encountered another problem. All users added can received mail sent on the same PC, Intranet. But they can't receive mails on Internet. I sent webmails on yahoo.com to them. All mails were returned saying users NOT found.

    Please advise where shall I check? TIA


    B.R.
    satimis
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Please make sure that the MX record for the domains you sent the emails to is pointing to your server. You can check that with
    Code:
    dig mx yourdomain.com
     
  5. satimis

    satimis New Member

    # dig mx satimis.com
    Code:
    
    ; <<>> DiG 9.3.4 <<>> mx satimis.com
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64931
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 2, ADDITIONAL: 3
    
    ;; QUESTION SECTION:
    ;satimis.com.                   IN      MX
    
    ;; ANSWER SECTION:
    satimis.com.            3600    IN      MX      0 smtp.secureserver.net.
    satimis.com.            3600    IN      MX      10 ubuntu.satimis.com.
    satimis.com.            3600    IN      MX      10 mailstore1.secureserver.net.
    
    ;; AUTHORITY SECTION:
    satimis.com.            3600    IN      NS      NS6.secureserver.net.
    satimis.com.            3600    IN      NS      NS5.secureserver.net.
    
    ;; ADDITIONAL SECTION:
    mailstore1.secureserver.net. 2755 IN    A       64.202.166.11
    NS5.secureserver.net.   2376    IN      A       208.109.78.180
    NS6.secureserver.net.   2376    IN      A       208.109.80.75
    
    ;; Query time: 448 msec
    ;; SERVER: 202.14.67.4#53(202.14.67.4)
    ;; WHEN: Fri Nov  2 01:44:00 2007
    ;; MSG SIZE  rcvd: 200
    
    It is point to ubuntu.satimis.com

    # hostname -f
    ubuntu.satimis.com

    I don't know why it fails sending mails to this server. Users are existing include their Maildir/cur,new,tmp/

    I have been trying 2 days. I can't find out the cause


    satimis
     
  6. falko

    falko Super Moderator ISPConfig Developer

  7. amss

    amss New Member

    You Should Config Your IMAP server To Be able to see E-mail Inbox
    You Can use dovocate as your IMAP Server
     
  8. satimis

    satimis New Member

    Hi folko,


    Problem solved. The mail server is now working. I set the priority of this mail server on MX table of Godaddy as 20 and the priority of Godaddy server 30. If the mail server is running mail will be delivered to this server. If this mail server is download then mail will be delivered to Godaddy's server.

    To new users created on this mail server their Maildir will NOT be created simultaneously. Whenever the first mail comes Maildir together with subdirectories, cur,new,tmp, will be created automaitcally. Maybe I have to do something on /etc/skel ???


    A side question is there any howto here to setup clamSMTP and spam for postfix running on Ubuntu? Ubuntu has relevant document but for Virtual Mail. TIA


    satimis
     
  9. satimis

    satimis New Member

    Hi amss,


    Thanks for your advice.

    I have courier installed including;
    courier-base
    courier-pop
    courier-pop-ssl
    courier-smtp
    courier-ssl
    etc.

    w/o courier-maildrop


    Any document on setup courier-smtp running on Ubuntu? TIA

    What webmail application I need to read incoming mails rather than reading them on console?

    TIA


    B.R.
    satimis
     
  10. falko

    falko Super Moderator ISPConfig Developer

    Try Squirrelmail or Uebimiau.
     

Share This Page