dbmail

21
La nueva generación de correo electrónico Tutorial para el Congreso Internacional de Software Libre GULEV Noviembre 25 de 2004 Derechos reservados © 2004 Sandino Araico Sánchez <[email protected]> Se permite ilimitadamente el uso, copia, redistribución con o sin modificaciones siempre y cuando se mantenga el aviso de derecho de autor y se anoten al final de la presentación todas las modificaciones que se llevan a cabo conservando la historia de las modificaciones que hagan las demás personas e indicando la fecha de cada modificación y el nombre de la persona que la llevó a cabo.

Upload: sandino-araico-sanchez

Post on 12-Jul-2015

1.060 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Dbmail

La nueva generación de correo electrónico

Tutorial para el Congreso Internacional de Software Libre GULEV

Noviembre 25 de 2004Derechos reservados © 2004 Sandino Araico Sánchez <[email protected]>Se permite ilimitadamente el uso, copia, redistribución con o sin modificaciones siempre y cuando se mantenga el aviso de derecho de autor y se anoten al final de la presentación todas las modificaciones que se llevan a cabo conservando la historia de las modificaciones que hagan las demás personas e indicando la fecha de cada modificación y el nombre de la persona que la llevó a cabo.

Page 2: Dbmail

OverviewDbmail is the name of a group of programs that enable the possiblilty of storing and retrieving mail messages from a database. Currently MySQL and PostgreSQL can be used as database backends. Development and support of dbmail is done by IC&S, a Dutch company specialized in Linux development and support. The dbmail developers can be reached through the dbmail mailinglist.

Page 3: Dbmail

What are the advantages?

ScalabilityDbmail is as scalable as the database system that is used for the mail storage. In theory millions of accounts can be managed using dbmail. One could, for example, run 4 different servers with the pop3 daemon each connecting to the same database (cluster) server.

Page 4: Dbmail

What are the advantages?

ManageabilityDbmail is based upon a database. Dbmail can be managed by changing settings in the database (f.e. using PHP/Perl/SQL), without needing shell access.

Page 5: Dbmail

What are the advantages?

SpeedDbmail uses very efficient, database specific queries for retrieving mail information. This is much faster then parsing a filesystem.

Page 6: Dbmail

What are the advantages?

SecurityDbmail has got nothing to do with the filesystem or interaction with other programs in the Unix environment which need special permissions. Dbmail is as secure as the database it's based upon.

Page 7: Dbmail

What are the advantages?

Flexibility.Changes on a Dbmail system (adding of users, changing passwords etc.) are effective immediately.

Page 8: Dbmail

How Dbmail worksA normal MTA

sendmailqmailpostfix

dbmail-smtpdbmail-lmtp

MySQLPostgresIncoming mail

Page 9: Dbmail

How Dbmail works

dbmail-pop3ddbmail-imapd

MySQLPostgresUser retreiving email

Page 10: Dbmail

What’s inside the DB?

aliases

users

mailboxes messages

message blocks

Page 11: Dbmail

dbmail.conf[DBMAIL] # Database settingshost=localhostuser=dbmailpass=********db=dbmail# trace level for dbmail-maintenance

TRACE_LEVEL=2

Page 12: Dbmail

dbmail.conf[SMTP]SENDMAIL=/usr/sbin/sendmail # your sendmail executable, this is needed for boucing [email protected] # the email address where bounces come from [email protected] # postmaster's email address (which is used in the bounce messages)AUTO_NOTIFY=noAUTO_REPLY=yesTRACE_LEVEL=1

Page 13: Dbmail

dbmail.conf[POP]EFFECTIVE_USER=dbmail EFFECTIVE_GROUP=dbmail #BINDIP=69.93.121.178 BINDIP=* PORT=110 NCHILDREN=50 MAXCHILDREN=200 MAXCONNECTS=10000 TIMEOUT=300 RESOLVE_IP=yes POP_BEFORE_SMTP=yesTRACE_LEVEL=1

Page 14: Dbmail

dbmail.conf[IMAP]EFFECTIVE_USER=dbmailEFFECTIVE_GROUP=dbmail#BINDIP=69.93.121.178BINDIP=*PORT=143NCHILDREN=15MAXCONNECTS=10000 #TIMEOUT=3600 TIMEOUT=300 RESOLVE_IP=yes IMAP_BEFORE_SMTP=yesTRACE_LEVEL=1

Page 15: Dbmail

postfix transportalpos.org dbmail:apesta.org dbmail:araico.net dbmail:batracio.org dbmail:delbebe.com.mx dbmail:correo.delbebe.com.mx dbmail:elmundo.delbebe.com.mx dbmail:delbordado.com dbmail:correo.delbordado.com dbmail:elmundo.delbordado.com dbmail:h-o-p-p.org dbmail:royald.net dbmail:royald.org dbmail:sandino.net dbmail:tumamafuemia.com dbmail:

Page 16: Dbmail

postfix master.cf

dbmail unix - n n - - pipe flags= user=dbmail:dbmail argv=/usr/bin/dbmail-smtp -d ${recipient}

Page 17: Dbmail

postfix main.cf

local_recipient_maps = pgsql:/etc/postfix/users.cfrelay_recipient_maps = pgsql:/etc/postfix/users.cfmynetworks = 69.93.121.178/32, pgsql:/etc/postfix/my_net.cf

Page 18: Dbmail

postfix users.cf

users.cf:

user = dbmailpassword = ********dbname = dbmailtable = aliaseshosts = localhostselect_field = alias_idnrwhere_field = alias

Page 19: Dbmail

postfix my_net.cf

my_net.cf:

user = dbmailpassword = ********dbname = dbmailtable = pbsphosts = localhostselect_field = sincewhere_field = ipnumberadditional_conditions = and since > (now() - interval '1 hour')

Page 20: Dbmail

Referencias

http://dbmail.orghttp://dbmail.org/dokuwiki/doku.php

Page 21: Dbmail

Gracias<[email protected]>