PDA

View Full Version : Where is Maildir


satimis
29th October 2007, 14:29
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
ubuntu


$ hostname -f
ubuntu.mydomain.com


$ cat /etc/postfix/main.cf | grep mailbox_command
mailbox_command =


$ cat /etc/postfix/main.cf | grep home_mailbox
home_mailbox = Maildir/


$ cat /etc/postfix/main.cf | grep mydestination
mydestination = ubuntu.mydomain.com, localhost.mydomain.com, localhost.localdomain, localhost


$ cat /etc/postfix/main.cf | grep inet_interfaces
inet_interfaces = all


$ cat /etc/postfix/main.cf | grep inet_protocols
inet_protocols = all


$ cat /etc/postfix/main.cf | grep mynetworks
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
Trying 64.202.165.92...
telnet: Unable to connect to remote host: Connection timed out



$ telnet ubuntu.mydomain.com 25
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: root@mydomain.com
250 2.1.0 Ok
rcpt to: fmaster@mydomain.com
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:

fmaster@ubuntu:~$ ls -al
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

falko
30th October 2007, 18:38
You must add mydomain.com to the mydestination line in /etc/postfix/main.cf and restart Postfix.

satimis
31st October 2007, 04:46
You must add mydomain.com to the mydestination line in /etc/postfix/main.cf and restart Postfix.
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

falko
1st November 2007, 19:32
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 make sure that the MX record for the domains you sent the emails to is pointing to your server. You can check that with
dig mx yourdomain.com

satimis
1st November 2007, 19:49
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
dig mx yourdomain.com
# dig mx satimis.com

; <<>> 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

falko
2nd November 2007, 19:00
http://www.howtoforge.com/forums/showthread.php?t=16787

amss
8th November 2007, 23:25
You Should Config Your IMAP server To Be able to see E-mail Inbox
You Can use dovocate as your IMAP Server

satimis
9th November 2007, 08:05
http://www.howtoforge.com/forums/showthread.php?t=16787
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

satimis
9th November 2007, 08:21
You Should Config Your IMAP server To Be able to see E-mail Inbox
You Can use dovocate as your IMAP Server
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

falko
9th November 2007, 20:08
What webmail application I need to read incoming mails rather than reading them on console?

Try Squirrelmail or Uebimiau.