On 5/3/2010 2:05 PM, Tanstaafl wrote: > > On 2010-05-03 12:32 PM, Mark Sapiro wrote: > >> [...] >>> mydomain = example.com > >> And this says that example.com is the local domain > > Hmmm... the postfix docs do not say that this setting equates to a LOCAL > domain... > >> and it is included by default in mydestination > > Not according to the docs:
You're right. I confused myself because in my Postfix installation, mydomain and myhostname have the same value. [...] > Hmmm... well, deliveries to normal email addresses @example.com > definitely have always used postfix/virtual: > > May 3 13:48:25 myhost postfix/smtpd[24359]: connect from > hostname.inboundrelay.com[###.###.###.###] > May 3 13:48:25 myhost postfix/smtpd[24359]: EF3DB650B4F: > client=hostname.inboundrelay.com[###.###.###.###] > May 3 13:48:26 myhost postfix/cleanup[24236]: EF3DB650B4F: > message-id=<[email protected]> > May 3 13:48:26 myhost postfix/qmgr[3930]: EF3DB650B4F: > from=<[email protected]>, size=42218, nrcpt=1 (queue active) > May 3 13:48:26 myhost postfix/virtual[24368]: EF3DB650B4F: > to=<[email protected]>, relay=virtual, delay=0.68, > delays=0.67/0/0/0.01, dsn=2.0.0, status=sent (delivered to maildir) > May 3 13:48:26 myhost postfix/qmgr[3930]: EF3DB650B4F: removed > May 3 13:48:26 myhost postfix/smtpd[24359]: disconnect from > hostname.inboundrelay.com[###.###.###.###] OK. > But, you are right, messages to any of the *list* addresses are > definitely handled by postfix/local (I just must have never noticed), > and there is something unexpected (see below log sample)... See comments below. >> [...] >>> virtual_alias_maps = mysql:/etc/postfix/mysql_vam.cf, >>> hash:/var/lib/mailman/data/virtual-mailman > >> And this references Mailman's virtual maps created for the >> myhost.example.com domain. Normally, for delivery of mail addressed >> to, e.g. [email protected] via the virtual mapping >> which maps that address to the local address listname-owner, you also >> need >> >> virtual_alias_domains = myhost.example.com > > Nope... these return nothing: > > myhost # ~ postmap -q myhost.example.com mysql:/etc/postfix/mysql_vmd.cf > myhost # ~ postmap -q smtp.example.com mysql:/etc/postfix/mysql_vmd.cf > > This returns 'Primary Domain' (description in postfixadmin db): > > myhost # ~ postmap -q example.com mysql:/etc/postfix/mysql_vmd.cf So it appears that example.com is a virtual_mailbox_domain. So what's in virtual_mailbox_maps (mysql:/etc/postfix/mysql_vmm.cf)? Does postmap -s mysql:/etc/postfix/mysql_vmm.cf work? >> If it is working without that, there might be something in the >> mysql:/etc/postfix/mysql_vam.cf that is enabling it, > > user = myuser > password = mypassword > hosts = localhost > dbname = mydb > query = SELECT goto FROM alias WHERE address='%s' > >> or those addresses may not be working, > > By those addresses, you mean [email protected]? Been working for > over 4 years like this... No. I mean addresses like [email protected]. >> but if they are not, bounce processing and some owner notifications >> may not be working, > > I do get messages to listname-owner, as well as bounce notifications... > > Something that might help shed some more light though... now that I know > that list deliveries are handled by postfix/local and regular email > addresses by postfix/virtual, I looked more closely at the logs... > > Here is a snippet of a list message - note the line where my servers > name (myhost) is appended: > > 13:17:44 myhost postfix/smtpd[24018]: connect from > my.workstation.example.com[###.###.###.###] > May 3 13:17:44 myhost postfix/smtpd[24018]: 45FC66B690E: > client=my.workstation.example.com[###.###.###.###], sasl_method=PLAIN, > [email protected] > May 3 13:17:44 myhost postfix/cleanup[24025]: 45FC66B690E: > message-id=<[email protected]> > May 3 13:17:44 myhost postfix/qmgr[3930]: 45FC66B690E: > from=<[email protected]>, size=850, nrcpt=1 (queue active) > May 3 13:17:44 myhost postfix/smtpd[24018]: disconnect from > my.workstation.example.com[###.###.###.###] > May 3 13:17:44 myhost imapd-ssl: DISCONNECTED, [email protected], > ip=[::ffff:###.###.###.###], headers=2144, body=5670, rcvd=1702, > sent=56680, time=1908, starttls=1 > May 3 13:17:44 myhost postfix/local[24039]: 45FC66B690E: > to=<[email protected]>, orig_to=<[email protected]>, > relay=local, delay=0.64, delays=0.02/0.04/0/0.58, dsn=2.0.0, status=sent > (delivered to command: /usr/lib64/mailman/mail/mailman post listname) Apparently, smtp.example.com is myhostname which is in mydestinations by default, but now I am puzzled. What is it in your Postfix that maps [email protected] to local 'listname'? There must be something. This is the strange part - why is [email protected] mapped to local listname but [email protected] is mapped to a virtual mailbox maildir? > May 3 13:17:44 myhost postfix/qmgr[3930]: 45FC66B690E: removed > May 3 13:17:46 myhost postfix/smtpd[24020]: connect from > localhost[127.0.0.1] > May 3 13:17:46 myhost postfix/smtpd[24020]: 265E36285BC: > client=localhost[127.0.0.1] > May 3 13:17:46 myhost postfix/cleanup[24025]: 265E36285BC: > message-id=<[email protected]> > > May 3 13:17:46 myhost postfix/qmgr[3930]: 265E36285BC: > from=<[email protected]>, size=1334, nrcpt=4 (queue > active) > ^^^^^^ > NOTE: ^^^^^^ where did that come from? That's what I've been saying all along. The list's host_name is myhost.example.com, so EVERY mailman generated list related address is @myhost.example.com. This is part of what is 'wrong' in your current configuration. [...] >> My understanding is you want the list addresses to be @example.com and >> only the web host to be lists.example.com. > > Yes... but... I also want example.com to *not* be considered a local > domain for normal email... Apparently, that is what's happening now. The question is why? Note: All mail to Mailman is ultimately delivered according to the pipe commands in Mailman's aliases file. For this to work, that mail must be delivered by Postfix local delivery because local is the only delivery that consults alias_maps. So you need list addresses to be handled by local and other addresses in the example.com domain to be handled by virtual. As I said, that is apparently working now. On way to accomplish this is via transport_maps. It is possible even to make a script so mailman writes virtual-mailman maps which are edited into transport mappings that specify the local transport for those addresses. But you said there's nothing in transport_maps doing this now. Find out how the [email protected] addresses are being mapped to local addresses. >> Given that understanding, what you want to end up with in mm_cfg.py is >> >> MTA = 'Postfix' >> DEFAULT_EMAIL_HOST = 'example.com' >> DEFAULT_URL_HOST = 'lists.example.com' >> VIRTUAL_HOSTS.clear() >> add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) >> >> with no POSTFIX_STYLE_VIRTUAL_DOMAINS at all, and, you can remove >> >> hash:/var/lib/mailman/data/virtual-mailman >> >> from Postfix virtual_alias_maps and remove the >> /var/lib/mailman/data/virtual-mailman* files. > > So: > > 1. Stop postfix > > 2. Stop mailman > > 3. Make the (above) changes to mm_cfg.py > > 4. Run $prefix/bin/withlist -l -a -r fix_url to fix all existing lists > > 5. Run $prefix/bin/genaliases > > 6. Start mailman > > 7. Start postfix First we have to figure out exactly why Postfix is doing the right thing with the example.com domain now. Until we know that, we don't know whether virtual_alias_maps and POSTFIX_STYLE_VIRTUAL_DOMAINS are important. >> What about web server changes for the lists.example.com vs. >> myhost.example.com change (there may not be any), and DNS for the >> lists.example.com domain? > > I've already got the DNS setup... but this question made me realize, > there isn't any vhost file set up for mailman access, and its been a > long time since I originally set this up (with some help from someone > else who apparently only knew a little more than I did - ;) ... > > The current list management pages are at the address: > > https://myhost.example.com/mailman/... > > I looked at /etc/apache2/modules.d/50_mailman.conf, but it doesn't show > anything about my hostname, so, what controls the root directory? There is a ScriptAlias for mailman. If it is in a global section of httpd.conf, it's OK as is. If it is in a VirtualHost block for myhost.example.com, it will have to be moved/added to a VirtualHost block for lists.example.com. Likewise for any pipermail Alias and any Directory blocks relating to Mailman directories. -- Mark Sapiro <[email protected]> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list [email protected] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
