Am 07.11.2013 22:17, schrieb Matt .:
> I indeed managed this also with some fine scripting.
> It's very nice to have a "native" mailbox indeed!

yup, and if it comes to complexer setups you are glad about having
all "normal RCPTS's in a single table and column"

the postfix config below looks tiny, but the view behind is
a bigger hammer and caused by supporting all sorts of aliases
and sender/rcpt-dependent transports from my web-backend

this monster used me 2 months day and night coding because
it was the first and last production mailserver in my life
summer 2009 and was coded with "everything which looks
possible" in my crazy mind :-)

[root@mail:~]$ cat /etc/postfix/mysql-recipients.cf
user     = dbmailro
password = ***********
dbname   = dbmail
hosts    = unix:/var/lib/mysql/mysql.sock
query    = select alias from dbma_recipients where alias='%s';

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW 
`dbma_recipients` AS select
`dbmail_aliases`.`alias` AS `alias` from `dbmail_aliases` where 
(not((`dbmail_aliases`.`alias` like '%@'))) union
(select concat('@',`dbma_mta`.`mydestination`) AS `alias` from `dbma_mta` where 
(`dbma_mta`.`transport` <>
'dbmail-lmtp:127.0.0.1:24')) union (select 
`dbma_recipient_relay`.`mydestination` AS `alias` from
`dbma_recipient_relay`) union (select `dbma_aliases_global`.`alias` AS `alias` 
from `dbma_aliases_global`)

> 2013/11/7 Reindl Harald <[email protected] 
> <mailto:[email protected]>>
> 
>     Am 05.11.2013 18 <tel:05.11.2013%2018>:25, schrieb Matt .:
>     > OK, but I need to make an alias for every user ?
>     > I actually want to have [username]@domain.tld alway delivered to 
> [username]
>     > Additional aliasses can added later on, but this is what I "static" 
> want to have running in this setup
> 
>     in short: yes
> 
>     i have written my own webinterface 4 years ago which automatically 
> creates the aliases
>     in doubt these are only a few lines of code
> 
>     from dbmail side it is more clear and tiny to have a defined structure for
>     simple and complex cases instead distinct between them and act with
>     different code-paths which needs their own tests and may have
>     regressions in future development
> 
> 
> 
>     _______________________________________________
>     DBmail mailing list
>     [email protected] <mailto:[email protected]>
>     http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
> 
> 
> 
> 
> _______________________________________________
> DBmail mailing list
> [email protected]
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
> 

-- 

Reindl Harald
the lounge interactive design GmbH
A-1060 Vienna, Hofmühlgasse 17
CTO / CISO / Software-Development
m: +43 (676) 40 221 40, p: +43 (1) 595 3999 33
icq: 154546673, http://www.thelounge.net/

http://www.thelounge.net/signature.asc.what.htm

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to