Dbmail

From Radio Amteur Station OH5BZR - WIKI
Jump to: navigation, search

Installation

Compile from sources

mkdir /mpi3/S4/dbmail
wget http://www.dbmail.org/download/3.1/dbmail-3.1.17.tar.gz
gunzip *.gz
tar -xfv *.tar
apt-get install libgmime-dev libmhash-dev libevent-dev libzdb-dev libsieve2.1-dev
./configure --with-mysql --with-ldap --with-sieve
make
sudo make install

Settings

http://www.dbmail.org/dokuwiki/doku.php http://www.dbmail.org/dokuwiki/doku.php/domain_alias_spam_bounce

There are multiple ways to manage DBMail users. With dbmail-users being the appointed tool by the DBMail development team.

Whichever way you choose to use to manage users is you own. But using dbmail-users is the only tool supported by the developers directly, and if changes are made to dbmail's sourcecode you can expect it to be updated also.

A way to add user directly into the database can be found here

by hand

sql/mysql/create_tables.mysql dose not run to end whitout errors mariadb so:

INSERT INTO dbmail_users (userid, passwd, encryption_type) VALUES 
('__@!internal_delivery_user!@__', , 'md5'),
('anyone', , 'md5'),
('__public__', , 'md5');

sudo nano /etc/rc.local

dbmail-lmtpd dbmail-imapd

Manage Users

source: http://www.dbmail.org/dokuwiki/doku.php/manage_users

Add a user

A user can be added to DBMail with the following command:

 dbmail-users -a USERNAME -w PASSWORD

Change USERNAME and PASSWORD to suit your new user. This newly created user can now login with the imap or pop3 server. However he/she isn't able to receive any emails because the dbmail server doesn't know which email address the newly created user has.

Add a new email address (alias) to the user:

 dbmail-users -c USERNAME -s USER@mydomain

DBMail now accepts email for USER@mydomain and inserts them into our users mailbox. If a user has multiple mailadresses you can simply add more with the above command, or separate them with a ",". Removing aliases can be done with "-S":

 dbmail-users -c USERNAME -S USER@mydomain

For restricting maximum mailbox size of your users you can setup quota. If quota limit is reached DBMail refuses to receive mail for your users during the smtp or lmtp session. This way the mailserver can send a bounce to let the sender know his mail wasn't delivered.

Set up quota with:

 dbmail-users -c USERNAME -m QUOTA

QUOTA can be specified in <bytes>B, <kbytes>KB,<mbytes>M. Default is in bytes.

Delete an user

To delete a user use the dbmail-users utility:

  dbmail-users -d USERNAME


Add a forward

To add a forward also use dbmail-users. If you forward to an external email address there is no need to add a local user.

 dbmail-users -x to@domain -t forward@domain2

to@domain will be forwarded to forward@domain2.

Keep in mind, that a user's mailbox isn't deleted until the next time dbmail-util is run. Aliases are deleted with the user directly.

Delete a forward

Deleting a forward can be done using the dbmail-users utility:

 dbmail-users -x to@domain -T forward@domain

ldap

http://dbmail.10918.n7.nabble.com/Migration-to-LDAP-with-Postfix-td17297.html
http://doc.ubuntu-fr.org/dbmail
http://www.michael-hammer.at/server_config/postfix/

postfix

Gmail : http://blog.hqcodeshop.fi/archives/122-Fixing-Googles-new-IPv6-mail-policy-with-Postfix.html