Re: E-mail server, minimalist approach

2006-03-26 Thread Vaaf

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 [EMAIL PROTECTED] IDENTIFIED BY 'password';
> GRANT ALL ON database.* TO [EMAIL PROTECTED];

Ummm... the minimalist approach would only require /two/ lines:

  CREATE DATABASE IF NOT EXISTS database ;
  GRANT ALL ON database.* TO [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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 '-00-00 00:00:00',
  modified datetime NOT NULL default '-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 '-00-00 00:00:00',
  modified datetime NOT NULL default '-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 '-00-00 00:00:00',
  modified datetime NOT NULL default '-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

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: E-mail server, minimalist approach

2006-03-25 Thread Matthew Seaman
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 [EMAIL PROTECTED] IDENTIFIED BY 'password';
> GRANT ALL ON database.* TO [EMAIL PROTECTED];

Ummm... the minimalist approach would only require /two/ lines:

  CREATE DATABASE IF NOT EXISTS database ; 
  GRANT ALL ON database.* TO [EMAIL PROTECTED] 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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


E-mail server, minimalist approach

2006-03-25 Thread Vaaf


Hello!

I am curious about the best practices of hosting other people's e-mails
in FreeBSD, using Postfix and MySQL if necessary.

I used to use Postfixadmin but lately I feel sick when using badly laid out
web user interfaces like that. Maintaining stuff graphically not only makes me
want to change and redesign everything I see---it also makes it difficult for
me to store my configurations in my configuration repository.

Is there a minimalist approach to this?
Any recommendations?

(the following is off topic)

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 [EMAIL PROTECTED] IDENTIFIED BY 'password';
GRANT ALL ON database.* TO [EMAIL PROTECTED];

Those are 3 lines that go well into my mysql.txt file, further subjected to
encryption, DVD burning and then burrial somewhere deep inside the
Sahara desert. Thanks folks!

-- Vaaf

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"