Postfix, Dovecot, ViMbAdmin, RoundCube

This article covers:

  1. Multiple domains support e.g. example.com, rtcamp.com, apple.com, google.com, etc.
  2. Virtual users support e.g. rahul@apple.com, steve@rtcamp.com, etc. Virtual users cannot login to server using shell/ftp like real-users.
  3. Alias management e.g. mails for you@example.com should be forwarded to rahul@rtcamp.com)
  4. Web-based administration interface to add/remove domains, email users and aliases.
  5. Webmail Interface for mail users can simply login with email-id & password to send/check emails.

Installing packages for postfix, dovecot, mysql

apt-get install postfix postfix-mysql dovecot-core dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-mysql mysql-server dovecot-sieve dovecot-managesieved

If you are adding a mail server on existing system some packages might be present already. Depending on previously installed package list, you may or may not see prompts to configure mysql, postfix, etc. Choose defaults wherever possible.

Postfix Configuration

This guide is created using postfix 2.9.6. You can check postfix version installed using command: postconf mail_version

Postfix configuration has 2 important files: main.cf and master.cf. We will also add some more files for virtual domain/mail system.

Postfix master.cf

If you want to run smtp on port 465 (with SSL) and on port 587 (with TLS), you need to uncomment following lines in master.cf:

It is highly recommend to do this as most ISP block port 25 to prevent spam.

vim /etc/postfix/master.cf
submission inet n       -       -       -       -       smtpd
smtps     inet  n       -       -       -       -       smtpd

Postfix main.cf

Open main.cf file: vim /etc/postfix/main.cf

Add following lines towards end of file:

# Change postfix TLS parameter to use dovecot 
#smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
#smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_cert_file=/etc/ssl/certs/dovecot.pem
smtpd_tls_key_file=/etc/ssl/private/dovecot.pem
smtpd_use_tls=yes
#smtpd_tls_auth_only = yes

#Handle SMTP authentication using Dovecot
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes

smtpd_recipient_restrictions =
        permit_sasl_authenticated,
        permit_mynetworks,
        reject_unauth_destination

# other destination domains should be handled using virtual domains 
mydestination = localhost

# using Dovecot's LMTP for mail delivery and giving it path to store mail
virtual_transport = lmtp:unix:private/dovecot-lmtp

# virtual mailbox setups
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_alias_maps = mysql:/etc/postfix/mysql/virtual_alias_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql/virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf

Postfix Virtual Mailbox Config

We will be using a mysql database for virtual domains, users and aliases.

Create a separate directory to store all postfix-mysql config:

mkdir /etc/postfix/mysql

Virtual Alias Mapping

Create a file: vim /etc/postfix/mysql/virtual_alias_maps.cf
Paste following in it:

user = vimbadmin
password = password
hosts = 127.0.0.1
dbname = vimbadmin
query = SELECT goto FROM alias WHERE address = '%s' AND active = '1'

Virtual Domain Mapping

Create a file: vim /etc/postfix/mysql/virtual_domains_maps.cf
Paste following in it:

user = vimbadmin
password = password
hosts = 127.0.0.1
dbname = vimbadmin
query = SELECT domain FROM domain WHERE domain = '%s' AND backupmx = '0' AND active = '1'

Virtual Mailbox (user) Mapping

Create a file:  vim /etc/postfix/mysql/virtual_mailbox_maps.cf
Paste following in it:

user = vimbadmin
password = password
hosts = 127.0.0.1
dbname = vimbadmin
query = SELECT maildir FROM mailbox WHERE username = '%s' AND active = '1'

Dovecot Configuration

Dovecot is an IMAP and POP server. It also implements security/authentication for IMAP/POP as well as SMTP (via Postfix).

We are using dovecot version 2.0.19. You can check it using command: dovecot --version

A real linux user – vmail

Following commands create a user and a group named vmail. vmail is a linux user who will own everybody’s email! (There’s nothing to get panic about this fact…)

groupadd -g 5000 vmail
useradd -g vmail -u 5000 vmail -d /var/vmail -m

Restart postfix

service postfix restart

Dovecot Configs

This is most annoying part I found with dovecot. Configuration is literally scattered among too many files:

Enable required protocols

vim /etc/dovecot/dovecot.conf
# Enable installed protocols
!include_try /usr/share/dovecot/protocols.d/*.protocol
protocols = imap pop3 lmtp sieve

Configure mail storage location

vim /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:/var/vmail/%d/%n

Configure authentication

vim /etc/dovecot/conf.d/10-auth.conf
disable_plaintext_auth = no
auth_mechanisms = plain login

Also comment out line: #!include auth-system.conf.ext to disable system user authentication.

Finally add support for mysql based authentication at the bottom:

passdb {
    driver = sql
    args = /etc/dovecot/dovecot-sql.conf.ext
}
userdb {
    driver = static
    args = uid=5000 gid=5000 home=/var/vmail/%d/%n allow_all_users=yes
}

Configure mysql parameters in dovecot

vim /etc/dovecot/dovecot-sql.conf.ext

Paste following to the bottom:

driver = mysql
connect = host=127.0.0.1 dbname=vimbadmin user=vimbadmin password=password
password_query = \
  SELECT username AS user, password, \
    homedir AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \
  FROM mailbox WHERE username = '%u'
iterate_query = SELECT username AS user FROM mailbox

Change master config file

vim /etc/dovecot/conf.d/10-master.conf

Make sure it looks like following:

service lmtp {
 unix_listener /var/spool/postfix/private/dovecot-lmtp {
   mode = 0600
   user = postfix
   group = postfix
  }
}

service auth {
 unix_listener /var/spool/postfix/private/auth {
    mode = 0666
    user = postfix
    group = postfix
  }

  unix_listener auth-userdb {
    mode = 0600
    user = vmail
  }

  user = dovecot
}

service auth-worker {
  user = vmail
}

Configure Logging

vim /etc/dovecot/conf.d/10-logging.conf
log_path = /var/log/dovecot.log

Debug logging

If you want to enable debug logs, use following:

#debuggign authentication requests
auth_debug = yes

#debugging other mail related stuff
mail_debug = yes

For more details about debug logging, check available parameters in dovecot docs.

Doveconf

As we are changing many files, we may lose track. You can run doveconf -n at those times.

doveconf -n displays list of changes made across entire dovecot.

Similarly, doveconf -a displays entire dovecot config (including defaults).

Restart dovecot

service dovecot restart

ViMbAdmin – Virtual Mail Server Administration

There are many postfix web interfaces available but we choose to go with ViMbAdmin. It “looks” nice and it uses PHP.

If you prefer ruby/rails, there is a promising alternative – posty.

ViMbAdmin v3 Installation

Vimbadmin requires composer so install it first.

curl -sS https://getcomposer.org/installer | php

Then…

cd /usr/local
apt-get install subversion git-core 
git clone git://github.com/opensolutions/ViMbAdmin.git vimbadmin 
cd /usr/local/vimbadmin 
php composer.phar install
chown -R www-data: /usr/local/vimbadmin

When composer will prompt you:

Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]?

Answer no n.

Create a mysql database and user for vimbadmin

Run following from mysql shell

CREATE DATABASE `vimbadmin`;
GRANT ALL ON `vimbadmin`.* TO `vimbadmin`@`127.0.0.1` IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

vimbadmin config file

cp application/configs/application.ini.dist application/configs/application.ini
vim application/configs/application.ini
securitysalt = "superadmin-password"
defaults.mailbox.uid = 5000
defaults.mailbox.gid = 5000
defaults.mailbox.homedir = "/var/vmail/"
resources.doctrine2.connection.options.driver   = 'pdo_mysql'
resources.doctrine2.connection.options.dbname   = 'vimbadmin'
resources.doctrine2.connection.options.user     = 'vimbadmin'
resources.doctrine2.connection.options.password = 'password'
resources.doctrine2.connection.options.host     = 'localhost'

Make sure mysql setting are correct in above config.

Memcache glitch

If you are using memcache, comment out

;resources.session.save_path = APPLICATION_PATH "/../var/session"

Create mysql tables

Following will create mysql tables for which we already tweaked postfix and dovecot.

./bin/doctrine2-cli.php orm:schema-tool:create

Chnage Ownership

chown -R www-data:www-data /usr/local/vimbadmin

set timezone in php

Open /etc/php5/fpm/php.ini

Add/update

date.timezone = "UTC"

Restart PHP-FPM using service php5-fpm restart

Open VimbAdmin interface and follow instructions from there.

ViMbAdmin v2 Installation

Following commands are for Vimbadmin V2. I am sorry to say I did not get time to try V3. But I hope to add v3 instructions soon.

cd /usr/local
git clone -b v2 git://github.com/opensolutions/ViMbAdmin.git vimbadmin
apt-get install subversion
cd /usr/local/vimbadmin
./bin/library-init.sh

Run following from mysql shell

CREATE DATABASE `vimbadmin`;
GRANT ALL ON `vimbadmin`.* TO `vimbadmin`@`127.0.0.1` IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

vimbadmin config file

cp application/configs/application.ini.dist application/configs/application.ini
vim application/configs/application.ini
securitysalt = "superadmin-password"
defaults.mailbox.uid = 5000
defaults.mailbox.gid = 5000
defaults.mailbox.homedir = "/var/vmail/"
resources.doctrine.connection_string = "mysql://vimbadmin:password@127.0.0.1/vimbadmin"

Memcache glitch

If you are using memcache, comment out

;resources.session.save_path = APPLICATION_PATH "/../var/session"

Create mysql tables

Following will create mysql tables for which we already tweaked postfix and dovecot.

bin/doctrine-cli.php create-tables

Chnage Ownership

chown -R www-data:www-data /usr/local/vimbadmin

Nginx config

server {
	server_name vma.example.com;

	access_log   /var/log/nginx/vma.example.com.access.log;
	error_log    /var/log/nginx/vma.example.com.error.log;

	root /usr/local/vimbadmin/public;
	index index.php;

	location / {
		try_files $uri $uri/ /index.php?$args;
	}

	location ~ \.php$ {
		try_files $uri =404;
		include fastcgi_params;
		fastcgi_pass 127.0.0.1:9000;
	}

}

At this point you can open vma.example.com and create an ViMbAdmin admin account. Please note that ViMbAdmin account is not virtual email account.

You can add domain, virtual mail-users after logging into vma.example.com using ViMbAdmin account.

Roundcube for Webmail Interface

You can literally use email client which supports smtp and pop/imap. So webmail part is completely optional.

apt-get install roundcube roundcube-plugins roundcube-plugins-extra

Above install roundcube inside /usr/share/roundcube

Roundcube config files are present in: /etc/roundcube

Open vim /etc/roundcube/main.inc.php

Add/change following:

$rcmail_config['default_host'] = 'localhost';
$rcmail_config['imap_cache'] = memcache;
$rcmail_config['messages_cache'] = db

Nginx config

server {
	server_name mail.example.com;

	access_log   /var/log/nginx/mail.example.com.access.log;
	error_log    /var/log/nginx/mail.example.com.error.log;

	root /usr/share/roundcube;
	index index.php;

	location / {
		try_files $uri $uri/ /index.php?$args;
	}

	location ~ \.php$ {
		try_files $uri =404;
		include fastcgi_params;
		fastcgi_pass 127.0.0.1:9000;
	}

}

You can open mail.example.com in browser and login using a virtual user-email and password.

Testing

At this point, we have SMTP (via Postfix), POP/IMAP (via dovecot) and a web-interface (via Vimbadmin) to manage virtual domains and users.

Before we proceed with remaining goals lets test if we have a working setup (so far).

Testing SMTP, IMAP and POP is covered here in detail.

 

Comments

  1. atux Avatar
    atux

    hi. i am trying to setup my email server to debian wheezy and i do follow you guide. i am stuck at the point where i have to type bin/doctrine-cli.php create-tables. i am in the folder /usr/local/vimbadmin/ and i do issue bin/doctrine-cli.php create-tables and i do get an error:
    /usr/bin/env: php: No such file or directory
    how do you overcome this issue?

    1. Rahul Bansal Avatar

      Try ./bin/doctrine-cli.php create-tables instead of bin/doctrine-cli.php create-tables

  2. atux Avatar
    atux

    even that is not working.

  3. Andy Avatar

    “Nginx config”

    What’s that file? Where is it?

  4. Andy Avatar

    After reading a bit it turns out nginx is a web server.

    How would I “adapt” those nginx confix files to something Apache would “Understand”? I got so far on this tutorial to give up now.

    1. Rahul Bansal Avatar

      I think you can create Apache virtual host and then add .htaccess to it.

      WordPress htaccess might work as well – http://codex.wordpress.org/htaccess#Basic_WP

      Sorry but we haven’t used Apache in years.

      In case you wish to try Nginx (and use WordPress/PHP sites), try https://rtcamp.com/easyengine

    2. Vibhav Sinha Avatar

      For Apache users, this link might be of help. It explains the apache config required for vimbadmin.

      https://github.com/opensolutions/ViMbAdmin/wiki/Installation

  5. Andy Avatar

    I’ll just follow a different tutorial. Thank you anyway.

    Though can I recommend you state that this tutorial was written with nginx in mind at the top of the tutorial? While it was foolish for me to assume it was using Apache, many other people will assume the same and just follow the tutorial until they are stuck in the last two parts like it happened to me.

    Also I found this tutorial with Google search – so I had no idea this was a company that offered hosting using nginx. Had I known that I would have followed a different tutorial.

    1. Rahul Bansal Avatar

      Thanks for your suggestion. I added Nginx in SEO title and description so same issue won’t happen.

      I do not intend to offend you but if you find it tough to write few apache config lines, then running a mail-server might be wrong thing to do.

      1. Andy Avatar

        Haha, disagreed.

        I got everything to work. I may be a Linux idiot, but screwing up is the way to learn. Aaand that’s exactly what I did. Got my mail-server up and running, with spam and antivirus filters, even.

      2. Rahul Bansal Avatar

        I am talking about maintenance. Most tutorials will help you getting up and running.

        Even I have covered here most stuff https://rtcamp.com/tutorials/mail and will be adding more as I explore (or run into problems).

        Painful part is maintenance, specially when you are running a big mail-server hosting multiple domains for 100’s of users. If it’s private mail-server, you may not run into many issues.

        I noticed you are using WordPress. Just wonder if you atleast tried to give WordPress-Apache config a try for Roundcube/Vimbadmin (or you were only looking for copy-paste solution)

      3. Andy Avatar

        Oh no no, this is for a completely different server. My WordPress site has nothing to do with this. For my WordPress site, I settled with Google Apps and that was it. For this other thing I just wanted to try it on my own.

      4. Rahul Bansal Avatar

        Oops. I guess I did not made my point clear.

        What I wanted to say, you setup a PHP site, just like you have setup your WordPress site. Then instead of WordPress codes, put Vimbadmin/Roundcube codes there. It might have worked out of the box or you might have needed to change 1/2 lines in .htaccess file.

        Anyway, if its working for you, that’s all that matters! 🙂

    2. Antoine Avatar
      Antoine

      FYI, an Apache configuration is available here https://github.com/opensolutions/ViMbAdmin/wiki/Install-using-git
      Don’t forget, with Apache 2.4 Order&Deny become Require http://httpd.apache.org/docs/2.4/upgrading.html

      1. Antoine Avatar
        Antoine

        Great tutorial !

        – With an Apache and Ubuntu 13.10 default install, mcrypt was not activated for Roundcube “PHP Error: Could not perform encryption; make sure Mcrypt is installed”, I had to follow thoses advices of http://stackoverflow.com/questions/19446679/mcrypt-not-present-after-ubuntu-upgrade-to-13-10
        – In RoundCube, I had to configure $rcmail_config[‘messages_cache’] = null; and not to ‘db’ value, else new email didn’t list in Inbox (only the number of unread was updated).
        – Incoming email from outside domain were delete, I had to change back in Postfix smtpd_tls_cert_file and smtpd_tls_key_file to Ubuntu default value (maybe not secure).

        Thanks again.

      2. Rahul Bansal Avatar

        Why did not you simply install mcrypt?

        Its as simple as running apt-get install php5-mcrypt

      3. Antoine Avatar
        Antoine

        It was already install, but it was not working. I didn’t try to reinstall it. I followed SO’s advice, based on launchpad bug of 13.10 (https://bugs.launchpad.net/ubuntu/+source/php-mcrypt/+bug/1241286)

      4. Rahul Bansal Avatar

        Its fine. Thanks for sharing your experience. It might help others in future. 🙂

  6. Cristhian Avatar
    Cristhian

    I think you should include this (as an option) in your EasyEngine…

    1. Rahul Bansal Avatar

      This is already in roadmap – https://github.com/rtCamp/easyengine/issues/65

      We hope to get there next month. 🙂

  7. wayne Avatar
    wayne

    Rahul,

    I am working my way through this and have come across a problem I cant figure out (2 days now). Swallowing my pride I ask for help :).

    I have a working(mostly) test setup. The main problem I am having is ViMbAdmin fails to send mail out.
    php mail is working cli/WordPress and with /user/sbin/sendmail -t and sendmail command. I suspect it has something to do with permissions? Or maybe I need an alias for www-data. I also see that ViMbAdmin uses Zend_Mail(). As I said testing mail works from every other way I know how to send mail except ViMbAdmin.

    Whatever it is, it is not writing the error to any log file I am aware of.

    Any insight greatly appreciated. As I am new to this I don’t want to go inadvertently punching holes in this thing.

    -Best Regards
    Wayne

    1. Rahul Bansal Avatar

      Hey sorry to check this late.

      I never ran into ViMbAdmin issue. May be its better to ask them – https://github.com/opensolutions/ViMbAdmin

      If it would have been PHP issue, PHP mail would have broken as well.

    2. wayne Avatar
      wayne

      Revisited this today. My solution was configuring vma a bit more. /usr/local/vimbadmin/application/configs/application.ini.

      More specifically this Line
      resources.mailer.smtphost = “localhost” Hope this helps someone.

      1. Rahul Bansal Avatar

        Thanks for update.

        Did you change postfix to use external service for outbound mail?

        Just wondering as default might be localhost only.

      2. Wayne Avatar
        Wayne

        Rahul I missed this, I have been generating a lot of mail lately 🙂 This was oob 12.04 droplet. I did cheat at some point and used ee to generate the serverblocks and take advantage of acl.conf and locations.conf.
        Looks like VimbAdmin 3 is being developed and to be released soon?

      3. Rahul Bansal Avatar

        Glad to know that. If VimbaAdmin 3 arrives before month end, we will use it in our EasyEngine mail setup.

      4. Artem K Avatar
        Artem K

        Thanks wayne, that was the solution for the same issue that I had.

  8. Ryan Fergerson Avatar
    Ryan Fergerson

    Thought I’d mention that ViMbAdmin only works with PHP versions before 5.4 because it’s using deprecated methods (session_register). Really awesome tutorial nonetheless, thank you!

    1. Rahul Bansal Avatar

      Thanks for bringing that to notice. I will have a look at it.

  9. willmkt Avatar
    willmkt

    Hi i configured most of all the server until now, but i have a question

    the nginx config files for ViMbAdmin and roundcube, do i have to create? i got lost at this part.

    Thanks..

    1. Rahul Bansal Avatar

      You can put nginx config in separate files or in nginx.conf also.

      Going by our convetions – https://rtcamp.com/wordpress-nginx/tutorials/conventions/ there should be two separate files to hold ViMbAdmin and roundcube nginx config.

  10. Fernando Avatar

    Hello, first would like to congratulate you for the tutorial, great!
    I followed all the steps and managed to set up my mail server.
    The emails are being received, just can not send.

    Looking at the logs I found the following in Postfix log:

    Jan 28 12:03:17 localhost postfix [1894]: error: to submit mail, use the Postfix sendmail command
    Jan 28 12:03:17 localhost postfix [1894]: fatal: the postfix command is reserved for the superuser

    It seems simple to solve, but I found somewhere.

    1. Fernando Avatar

      Sorry, found the problem. I once had altered the sendmail configuration to send via php postfix. I commented the line to return to the default setting being used, restarted apache and everything worked.

      Thank you!

      1. Rahul Bansal Avatar

        Glad to know you found solution. 🙂

  11. Daniel Avatar
    Daniel

    Hi,
    thank you for the tutorial. I’ve a Ubuntu installation with nginx on DigitalOcean. I’ve followed your tutorial but it doesn’t work for me.

    I’m able to send emails with roundcube but I can’t receive any emails.

    I don’t know what could be wrong. Do you have a suggestion how to check what goes wrong on email receiving?

    Best regards,
    Daniel

    1. Rahul Bansal Avatar

      First check DNS. Specially MX record for domain you are hosting mail for.

      Then send a mail from outside and check postfix log on your server. If that mail reaches your server postfix log will show an entry for that. Postfix log will also have entries for action taken by your server (processed, rejected, etc)

  12. Vincent Avatar
    Vincent

    HI Rahul,
    I have some problem on step of Nginx config (vimbadmin), I was setting the same config with yours and I browsing my website always show “520 Bad Gateway”, but browsing the “http://localhost” Nginx is showing “Welcome to nginx”, can you help me to fix this problem ? thanks a lot!!

    1. Vincent Avatar
      Vincent

      Sorry, I browsing my website always show “502 Bad Gateway”
      thanks a lot !

      1. Rahul Bansal Avatar

        Check nginx’s error_log file. Looks like some PHP issue.

      2. Vincent Avatar
        Vincent

        I check the error log and I got some error information here:
        [error] 24879#0: *3 rewrite or internal redirection cycle while internally redirecting to “/index.php”, client: 127.0.0.1, server: localhost, request: “GET / HTTP/1.1”, host: “localhost”

        I have no idea to fix this problem.. could you help me ? thanks a lot !!!

      3. Rahul Bansal Avatar

        Sorry for delayed reply. It’s not possible for me to debug based on information you have given.

  13. raul Avatar
    raul

    Hi Rahul, thanks for the excellent guide and all the fantastic work and tutorials you guys have been doing on easyengine and setting up a web server and mail server.

    A heads up there is a new version of Vimbadmin, 3.0 and it seems some of the vimbadmin config sections may fail with the current guide I think, as they have changed the database structure and a few other things.

    1. Rahul Bansal Avatar

      I will be testing these configs soon with Vimbadmin 3.0. I will update them if any change is needed.

  14. ninja911 Avatar
    ninja911

    Feb 21 15:44:19 mail postfix/postfix-script[2147]: starting the Postfix mail system
    Feb 21 15:44:19 mail postfix/master[2148]: daemon started — version 2.6.6, configuration /etc/postfix
    Feb 21 15:46:29 mail postfix/postfix-script[2206]: stopping the Postfix mail system
    Feb 21 15:46:29 mail postfix/master[2148]: terminating on signal 15
    Feb 21 15:51:59 mail postfix/postfix-script[2700]: fatal: the Postfix mail system is not running
    Feb 21 15:52:00 mail postfix/postfix-script[2772]: starting the Postfix mail system
    Feb 21 15:52:00 mail postfix/master[2773]: daemon started — version 2.6.6, configuration /etc/postfix
    Feb 21 15:52:24 mail postfix/smtpd[2799]: connect from localhost[::1]
    Feb 21 15:52:25 mail postfix/smtpd[2799]: fatal: no SASL authentication mechanisms
    Feb 21 15:52:26 mail postfix/master[2773]: warning: process /usr/libexec/postfix/smtpd pid 2799 exit status 1

    i type “telnet localhost 25”,show this message. “fatal: no SASL authentication mechanisms”
    I had configured with this article. but is had some miss info on /var/log/mainlog.

    can you help me solve this progrem.

    OS: Centos6.5 minial X64
    postfix: 2.6.6 (yum installed)
    dovecot: 2.0.9 (yum installed)
    Nginx:1.5.10
    MySQL:5.6.16

  15. ninja911 Avatar
    ninja911

    thanks! I had solved this issue.
    /etc/dovecot/dovecot-sql.conf.ext , I wite error! because i had copyed less words!

    1. Rahul Bansal Avatar

      Glad to know that your issue got solved. 🙂

  16. Girish Kg Avatar

    The file “./bin/library-init.sh” is not available for VimBadmin Installation. Please update the installation steps under VimbAdmin. Thanks.

    1. Rahul Bansal Avatar

      Looks like you have tried VimBaAdmin 3. We will update this article with VimBaAdmin 3 ASAP.

  17. effiong Avatar
    effiong

    I get stuck at ./bin/library-init.sh it gives me the error -bash: ./bin/library-init.sh: No such file or directory

    How do i get the libraries installed.

    1. effiong Avatar
      effiong

      It seems my current problem is tied to VimBaAdmin 3 and Doctrine 2 so i’ll have to wait for the article update or is it possible to downgrade to VimBaAdmin 2 and Doctrine

      1. ninja911 Avatar
        ninja911

        Github was banned by GFW(Great Firewall) in china. so I recommend the use of postfixadmin.
        I am in china, so I can not use vimbadmin.

      2. Rahul Bansal Avatar

        Try using proxy.

        Or if you can access a server via SSH outside China, inside shell try wget https://github.com/opensolutions/ViMbAdmin/archive/master.zip or git clone https://github.com/opensolutions/ViMbAdmin. After that you can rsync content.

        I also think you can use SSH-tunnel on your machine (not sure about its legal consequence in your country though)

      3. Wayne Avatar
        Wayne

        route all traffic and dns through your webserver.
        http://www.unixmen.com/sshuttle-poor-mans-vpn-ssh/
        sudo apt-get install sshuttle

      4. Rahul Bansal Avatar

        Nice one. 🙂

        I simply use ssh xyz@example.com -D 9999 and then configure OS/browser to use socks proxy with localhost and port 9999.

      5. Wayne Avatar
        Wayne
        alias tun='sudo sshuttle -e "ssh -i /home/wayne/.ssh/id_rsa" --dns -r xyz@example.com 0/0 --no-latency-control -D --pidfile=/tmp/sshuttle.pid' 
        alias tunx='[[ -f /tmp/sshuttle.pid ]] && sudo kill $(cat /tmp/sshuttle.pid) && echo "Disconnected."'

        toggle on toggle off 😉 thanks for the pro tip in the other post btw.

  18. ninja911 Avatar
    ninja911

    A new isse.
    mail server forward internet IP. it can send mails to internet. But it can not receive any mails.
    how to configured server ?

    1. Rahul Bansal Avatar

      Sorry but I couldn’t understood your problem. Can you please post it in – https://rtcamp.com/support/forum/wordpress-nginx/ with as much details as possible.

  19. Beaudinn Avatar

    Thanks for the guide!
    I will also have to wait for the article to update.
    I can not wait until then 🙂

  20. raul Avatar
    raul

    I ran into the same problem with ViMbAdmin 3.0, it seems to be significantly more complicated to setup.

    As a a workaround I used the ViMbAdmin 2.0 branch from git. If you want to make the above guide work, in the ViMbAdmin section replace the ‘git clone …’ command with below.

    “git clone -b v2 git://github.com/opensolutions/ViMbAdmin.git vimbadmin”

    This will pull the v2 branch and the guide will work perfectly.

  21. nmq Avatar
    nmq

    In current version Vimbadmin (v3)
    default password auth scheme is salted md5, which is incompatible with dovecot (or i something missed)

    in my case solution was
    change
    application/configs/application.ini

    from:
    defaults.mailbox.password_scheme = “md5.salted”
    to:
    defaults.mailbox.password_scheme = “md5”

    1. Rahul Bansal Avatar

      Thanks for your suggestion. 🙂

      1. niko Avatar

        Hello, your nginx.conf don’t work. Browser return error.
        “The page isn’t redirecting properly
        Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
        This problem can sometimes be caused by disabling or refusing to accept cookies.”
        Please, help me.

      2. Rahul Bansal Avatar

        What did you try opening? Vimbadmin or Roundcube?

        Most likely it’s a mistake in your config.

    2. hiro.ferreira Avatar

      Thank you! With your suggestion i got everything working! Created domains, users for the domain and managed to lgoin on round cube with accounts created at Vimbadmin.

      But now i have a new problem, my outgoing and incoming email don’t work. I can not send emails neither to local nor elsewhere mailboxes. Roundcube says it was sent, but it never shows on other users mailbox(local or gmail) and receiving the same. I send it from gmail and locally and the emails do not appear on roundcubes mail box.

      I can see the messages i sent from a mailbox though…

      After making this change, did you manage to send and/or receive emails?

      1. Tamas Ruszka Avatar
        Tamas Ruszka

        Same here, hope someone know the solution

  22. effiong Avatar
    effiong

    Hello Rahul,

    i get stuck at bin/doctrine-cli.php create-tables. I have tried using ./bin/doctrine-cli.php create-tables too but i still get the same error /usr/bin/env: php: No such file or directory

    Please how can i solve this?

  23. Clydesdale Avatar
    Clydesdale

    Seem to have all running but I too have run into the vimbadmin 3 tables snag. I thought it was just my fumbling with all things linux. I was wondering if the current version has taken into account V3 ? if not, would it be possible to change the page name / place a disclaimer at the top stating what versions the process works with ?

    Thanks for the guide ! its been seriously appreciated. Please do keep it updated.

    1. Rahul Bansal Avatar

      You can v2 branch from Vimbadmin for now. I will update v3 instructions soon.

      Also added disclaimer to the above article.

  24. Mitesh Shah Avatar
    Mitesh Shah

    Dovecot automatically create a folders for us 🙂

    vim /etc/dovecot/conf.d/20-imap.conf
    mail_plugins = $mail_plugins autocreate

    At the end of file paste following code
    plugin {
    autocreate = Trash
    autocreate2 = Junk
    autocreate3 = Drafts
    autocreate4 = Sent
    autosubscribe = Trash
    autosubscribe2 = Junk
    autosubscribe3 = Drafts
    autosubscribe4 = Sent
    }

Book a strategy call
with our experts

No obligation. Limited slots.

Contact Form Business Enquiry

"*" indicates required fields

Please attach any RFP, project specification, or document that you would like to share.
Drop files here or
Max. file size: 5 GB.
    This field is for validation purposes and should be left unchanged.