Welcome! Please update anything in the wiki that appeared to be
inaccurate, and add any helpful information you learned along the way. It
is greatly appreciated!

On Fri, 9 Oct 2009 21:15:10 +0200 (CEST), Rene Bartsch <[email protected]>
wrote:
> Hi,
> 
> having a lot of trouble with getting Postfix, MySQL and DBMail running I
> had a little chit-chat
> with Brian Evans and Wietse Venema on the Postfix-ML.

What kind of trouble?

> "mailbox_transport" and "local_recipient_maps" belong to the local
domain
> class which is only for
> delivering to local UNIX accounts! Using them for external MDAs can have
> unpredictable
> side-effects!

What kind of side effects?

> Instead, use the virtual mailbox domain class!
> 
> example:
> 
> ## Virtual mailbox domain class: DBmail MDA
> virtual_transport       = dbmail-lmtp:<hostname/ip>:<port>
> virtual_mailbox_domains =
mysql:/etc/postfix/sql-virtual_mailbox_domains.cf
> virtual_mailbox_maps    = mysql:/etc/postfix/sql-virtual_mailbox_maps.cf

Huh, ok. I'm also using the local variation. I'll try these virtual
options on my system.

> Additionally, the SQL-queries MUST NOT return any value from the
database.
> When
> "mysql:/etc/postfix/sql-virtual_mailbox_domains.cf" returns one domain
or
> the list of domains,
> Postfix cannot relay mail to the internet anymore! Instead return "1" if
a
> value exists in the
> database or a empty set if it doesn't exists!

Where does it say this in the postfix docs?

> examples:
> 
> /etc/postfix/sql-virtual_mailbox_maps.cf:
> 
> user     = <MySQL-username>
> password = <MySQL-password>
> hosts    = <MySQL-host>
> dbname   = <MySQL-database>
> query    = SELECT 1 FROM dbmail_aliases WHERE alias='%s';
> 
> 
> sql-virtual_mailbox_domains.cf:
> 
> user     = <MySQL-username>
> password = <MySQL-password>
> hosts    = <MySQL-host>
> dbname   = <MySQL-database>
> query    = SELECT DISTINCT 1 FROM dbmail_aliases WHERE
> SUBSTRING_INDEX(alias, '@', -1) = '%s';
> 
> (If you use aliases for the email-addresses and simple usernames you do
> not need to query
> dbmail_users. In case you use email-addresses as usernames you need to
add
> dbmail_users to the
> query.)

Adding more recipes to the wiki is welcomed.

Aaron
_______________________________________________
DBmail mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

Reply via email to