Can't receive emails

bubba143

New member
Joined
Sep 25, 2009
Messages
3
Hello,

I have just started using DirectAdmin and I am kind of a noob at webservers. :P

So I've tried to create multiple accounts and domains through directadmin, everything seems to be working perfectly though I have a problem when I try to setup a new domain and it has propagated to my nameservers. You are not able to receive emails... Yes you can send them but you can't receive them. I've tried to email the email address I was using at the moment and I can't receive them, but when I try to email to any of my other emails I can receive them. So I think that the SMTP is working fine since I can send emails.

I believe the problem comes from that maildir doesn't exist in my new domains /home/[username]/ directory. The thing I do when it is not working is that I run the commands explained in this thread http://www.directadmin.com/forum/showthread.php?t=28183 And then the maildir's gets created. Since it seems to reload the mailserver or something.


What I wonder is isn't the maildir directory supposed to be created immediately when you either send/receive the first email or when the domain is created through the panel? And is there something wrong with my configuration since I can't get it to work?

Regards,
Carl

Thanks for your help!
 
re:

solved running this script:
Code:
#!/bin/sh
DIR=/home/$username/imap/$domain/$user/Maildir
mkdir -p $DIR/.INBOX.Drafts
mkdir -p $DIR/.INBOX.Sent
mkdir -p $DIR/.INBOX.Trash
echo "INBOX.Drafts" >> $DIR/subscriptions
echo "INBOX.Sent" >> $DIR/subscriptions
echo "INBOX.Trash" >> $DIR/subscriptions
chown -R $username:mail $DIR
DIR2=/home/$username/
mkdir -p $DIR2/Maildir
DIR3=/home/$username/Maildir
mkdir -p $DIR3/tmp
mkdir -p $DIR3/new
mkdir -p $DIR3/cur
mkdir -p $DIR3/.INBOX.spam
exit 0;

if anybody else has this problem put this script in the /usr/local/directadmin/scripts/custom and save it as "email_create_post.sh"
 
Hello,

That might be a good workaround, but it's probably best to solve the issue in question instead of using a workaround, as not fixing it would cause other issues down the line. (For example with user backups/restores, password resets, quotas, etc)

"Yes" the empty Maildir directory is supposed to be created by DA when you add a User.
If it isn't, that would mean that dovecot=1 is not in the directadmin.conf... or if it is, then DA simply wasn't restarted.

This is the related guide:
http://help.directadmin.com/item.php?id=219

but if DA isn't being restarted, try a brute force restart:
Code:
killall -9 directadmin
cd /usr/local/directadmin
./directadmin d

Note that by default, DA does not create the imap folders within the Maildir directory. That's left to the first imap client to do (eg: squirrelmail).

The script you've posted will create the imap folders and the Maildir directory, but again shouldn't be required.
This is similar to create the folders within the already existing Maildir folder:
http://help.directadmin.com/item.php?id=228

Just a few minor notes about your script:
1) The /home/username/Maildir directory is going to be attempted to be recreated each time a pop account is created.. this is a bit redundant, and that section of it would be more suited to the user_create_post.sh, since it's only done once.

2) chown on /home/username/Maildir to username:mail or it will be chowned to root:root.

However, again, both of these points should be void in the first place if the dovecot=1 value is correctly set... no post.sh script should be required at all.

You can email support if you require any assistance with the issue.

John
 
Thank You for your help everything seems to be working now without that script.

:)

Regards,
Carl
 
Back
Top