0
Not a bug

Exim and Maildir for vmail self-configuration on ajenti-v-mail

Sdlion 6 years ago updated by Eugene Pankov (Project coordinator) 6 years ago 4
In a clean Centos6 VPS after installing ajenti and the ajenti-v suite I created a new email account through the ajenti interface.
It said it will configure exim and courier automatically.
But at what extend and which kind of setup is using?

After opening the right ports with iptables I tried to connect with Thunderbird but it failed saying it couldn't open the Inbox folder. Later I read that I needed to create the maildir directory for my account. Run it inside /var/vmail/account@domain changed ownership to 8:12 (mail:mail) and voila! It worked and if I telnet inside the server I could send an email to this new account.

But I can't receive emails from the outside.
I read that the smtp port (25) is used for communication between servers and a `netstat -tulpn` showed this.

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 956/sendmail

So I guess the smtp service is only listening to local request. Another test with http://mxtoolbox.com/ revealed that it wouldn't connect through smtp (25 port).

There's a tool to reconfigure exim to set the IP's to bind?
Cleary /etc/exim/exim.conf states "AUTOMATICALLY GENERATED -- DO NOT EDIT", so I'm wary about messing with it.

Local Interfaces line in /etc/exim/exim.conf
LOCAL_INTERFACES = <; 0.0.0.0.25 ; 0.0.0.0.465 ; [::0]:25 ; [::0]:465
Still the only process that is using the smtp port is sendmail... that I suppose is an alias for the exim function. And is listening only on 127.0.0.1

This is not the only one service that is not properly autoconfigured, I had to edit BIND9 config file to set the correct network IP.
+2
Under review
You need to remove your old Sendmail instance and restart Exim4 SMTP server, which Ajenti V uses.
That did the trick! 
I read that some packages has a sendmail simlink for compatibilty reasons.

That being solved,
The only thing that thought it could have been a bug is the Maildir autoinitialization and that the BIND9 network IP is not set automatically.

Inside /var/vmail/myaccount@mydomain.net I have a Maildir structure and a Maildir directory (the one I manually created). So I guess that for some reason while creating the new virtual account the maildirmake was executed in /var/vmail/ instead of /var/vmail/myaccount@mydomain.net
This could be related to sendmail running instead of Exim. It looks like it's actually a *real* Sendmail that was running on your system before you replaced it with Exim package. Normally Exim handles Maildir creation automatically, and Ajenti V assigns mail:mail ownership to the mail directory.