Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Mar 2006 11:12:57 +0200
From:      Vaaf <vaaf@broadpark.no>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>
Cc:        questions@freebsd.org
Subject:   Re: E-mail server, minimalist approach
Message-ID:  <7.0.1.0.2.20060326110715.0238dbb0@broadpark.no>
In-Reply-To: <20060325220850.GA24910@happy-idiot-talk.infracaninophile.c o.uk>
References:  <7.0.1.0.2.20060325213043.023916c8@broadpark.no> <20060325220850.GA24910@happy-idiot-talk.infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
At 00:08 26.03.2006, Matthew Seaman wrote:
>On Sat, Mar 25, 2006 at 09:38:42PM +0100, Vaaf wrote:
>
> > My minimalist approach to using MySQL for instance, is to stay away
> > from phpMyAdmin and just create my databases like this:
> >
> > CREATE DATABASE IF NOT EXISTS database;
> > GRANT USAGE ON database.* TO database@localhost IDENTIFIED BY 'password';
> > GRANT ALL ON database.* TO database@localhost;
>
>Ummm... the minimalist approach would only require /two/ lines:
>
>   CREATE DATABASE IF NOT EXISTS database ;
>   GRANT ALL ON database.* TO database@localhost IDENTIFIED BY 'password' ;
>
>More pertinently, the really big advantage of doing stuff the
>command-line way is that you can arrange all this sort of thing as a
>series of scripts preserved under CVS or the like.  Takes a little
>more effort the first time you do it, then saves you having to
>rediscover it all the next or any subsequent time.
>
>            Cheers,
>
>            Matthew
>
>--
>Dr Matthew J Seaman MA, D.Phil.                       7 Priory Courtyard
>                                                       Flat 3
>PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
>                                                       Kent, CT11 9PW

I feel so silly :)
Thank you for pointing that out.

Yes, I am searching the command-line way for having virtual
e-mail users and virtual domains.

I've set up and configured Postfix, Courier-IMAP and SASL.

According to (a revised setup of) high5.net/howto, this is all I need:

CREATE DATABASE IF NOT EXISTS mail;
GRANT ALL ON mail.* TO mail@localhost IDENTIFIED BY 'fooBehej';

USE mail;
CREATE TABLE IF NOT EXISTS alias (
   address varchar(255) NOT NULL default '',
   goto text NOT NULL,
   domain varchar(255) NOT NULL default '',
   created datetime NOT NULL default '0000-00-00 00:00:00',
   modified datetime NOT NULL default '0000-00-00 00:00:00',
   active tinyint(1) NOT NULL default '1',
   PRIMARY KEY (address),
   KEY address (address)
) TYPE=MyISAM COMMENT='Postfix virtual aliases';

USE mail;
CREATE TABLE IF NOT EXISTS domain (
   domain varchar(255) NOT NULL default '',
   description varchar(255) NOT NULL default '',
   aliases int(10) NOT NULL default '0',
   mailboxes int(10) NOT NULL default '0',
   maxquota int(10) NOT NULL default '0',
   transport varchar(255) default NULL,
   backupmx tinyint(1) NOT NULL default '0',
   created datetime NOT NULL default '0000-00-00 00:00:00',
   modified datetime NOT NULL default '0000-00-00 00:00:00',
   active tinyint(1) NOT NULL default '1',
   PRIMARY KEY (domain),
   KEY domain (domain)
) TYPE=MyISAM COMMENT='Postfix virtual domains';

USE mail;
CREATE TABLE IF NOT EXISTS mailbox (
   username varchar(255) NOT NULL default '',
   password varchar(255) NOT NULL default '',
   name varchar(255) NOT NULL default '',
   maildir varchar(255) NOT NULL default '',
   quota int(10) NOT NULL default '0',
   domain varchar(255) NOT NULL default '',
   created datetime NOT NULL default '0000-00-00 00:00:00',
   modified datetime NOT NULL default '0000-00-00 00:00:00',
   active tinyint(1) NOT NULL default '1',
   PRIMARY KEY (username),
   KEY username (username)
) TYPE=MyISAM COMMENT='Postfix virtual mailboxes';

But then, unfortunately, Postfixadmin to properly govern these.
Aren't there any alternatives?

All the best,
Vaaf




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7.0.1.0.2.20060326110715.0238dbb0>