[Workaround.org] r156 - trunk/etch

chaas at workaround.org chaas at workaround.org
Fri Nov 9 23:34:45 CET 2007


Author: chaas
Date: 2007-11-09 23:34:43 +0100 (Fri, 09 Nov 2007)
New Revision: 156

Modified:
   trunk/etch/en.rest
Log:
Added contribution my Michael D?\195?\188rgner on using mailman with SQL "LIKE" regular expressions.


Modified: trunk/etch/en.rest
===================================================================
--- trunk/etch/en.rest	2007-11-01 19:38:15 UTC (rev 155)
+++ trunk/etch/en.rest	2007-11-09 22:34:43 UTC (rev 156)
@@ -2194,43 +2194,40 @@
 the /etc/aliases into the MySQL database, too. Let me know if you
 have invented something. :)
 
-..
-    Using transport maps
-    .........................
+Using transport maps (contributed by Michael Dürgner)
+..........................................................
 
-    (coming soon)
+If you want to allow your customers/clients to have their own mailing lists
+then the above solution is not flexible enough. Consider using Postfix'
+powerful transport maps. They allow you to tell postfix which transport
+(service) to use for certain email addresses or even whole domains.
 
-        If you want to allow your customers/clients to have their own mailing lists
-        then the above solution is not flexible enough. Consider using Postfix'
-        powerful transport maps. They allow you to tell postfix which transport
-        (service) to use for certain domains and even certain email addresses.
+Using a regular expression lookup table you can forward emails where
+the recipient email address matches a certain pattern to mailman.
+The following is a static example of a transport mapping that forwards
+``mylist at example.com`` and anything looking like ``mylist-*@example.com`` to
+the mailman service::
 
-        Using a regular expression lookup table e.g. that looks like the following cases as emails
-        for the list 'mylist at example.com' to be forwarded to mailman, everything else
-        within 'example.com' has normal virtual delivery:
+    /^(mylist|mylist-.*)@example\.com$/      mailman:
 
-        /etc/postfix/transport-lists-regex:
-        /^(mylist|mylist-.*)@example\.com$/      mailman:
+If you want to maintain your mailing list addresses in a MySQL table then
+use this ``/etc/postfix/mysql-transport-mailman.cf`` configuration file::
 
-        You could use a mysql lookup table nearly the same way, when you add all
-        mylist-.*@example.com addresses for every list there and give them
-        mailman: as transport.
+    user = mailuser
+    password = mailuser2007
+    hosts = 127.0.0.1
+    dbname = mailserver
+    query = SELECT 'mailman:' FROM transports WHERE email LIKE '%s'
 
-        The mysql lookup table should also work with having only two entries for
-        each list, i.e. for 'mylist at example.com' and 'mylist-%@example.com' and
-        define the mysql looup table the following way:
+The ``transport`` table would consist at least of a column ``email``
+that contains mailing list addresses. Use '%' in the address as a
+placeholder.
 
-        /etc/postfix/transport-lists-mysql:
-        user = mailuser
-        password = mailuser2007
-        hosts = 127.0.0.1
-        dbname = mailserver
-        query = SELECT transport FROM transports WHERE email='%s' OR email LIKE '%s'
+Use this config file by setting::
 
+    $> postconf -e transport_maps=mysql:/etc/postfix/mysql-transport-mailman.cf
 
-        [Courtesy of Michael Dürgner]
 
-
 Greylisting with postgrey
 ----------------------------
 



More information about the Workaround-chitchat mailing list