Daniel L'Hommedieu: > Hi all. > > I posted this the other day but got no replies, on or off list. > I'm really hoping someone might have an idea of what I can do > here. I've been looking into things for the last couple days and > have not made any progress.
You forgot to follow the mailing list welcome message instructions. I'll repeat them below for your convenience. Hint: you need to show Postfix command output and Postfix logging. Wietse TO REPORT A PROBLEM see http://www.postfix.org/DEBUG_README.html#mail TO (UN)SUBSCRIBE see http://www.postfix.org/lists.html Thank you for using Postfix. > Thanks. > > Daniel > > --- > > Today I think I am trying to do something similar to what Bob Eastbrook was > discussing in late December. Here is what he said back then: > > Forgive me if this is a FAQ, but I've looked all over and I don't see it > > addressed. > > > > I have a wildcard MX record for *.example.com which points to > > mail.example.com. I know how to configure postfix to accept > > individual virtual domains such as host1.example.com, but how can I set it > > up to handle any domains which match the wildcard MX record? > > e.g.: > > > > b...@host1.example.com > > b...@host2.example.com > > b...@gibberish.example.com > > > > ... should all map to b...@mail.example.com. I'm only concerned about the > > user "bob" if that matters. I won't know in advance all the hosts in > > example.com, so I can't add them one at a time. > > > > Any ideas? > > > > Bob > > Specifically, I am trying to build a mail catcher for all of my servers. My > production servers run sendmail for outbound mail delivery, but on every one > of them I am blocking inbound mail connections. I have set up another system, > running postfix, for the purpose of catching mail to all of my production > server systems. (My production server systems are database and web servers.) > > I implemented the solution suggested by Wietse, which I quote here: > > APPEND a regular expression map to your virtual_alias_maps > > definition. > > > > /etc/postfix/main.cf: > > virtual_alias_maps = > > ...stuff you perhaps already have... > > pcre:/etc/postfix/virtual_alias.pcre > > > > /etc/postfix/virtual_alias.pcre: > > # Send b...@whatever.example.com to b...@example.com. > > /^bob@([^.]+\.)+example\.com$/ b...@example.com > > > > Further reading: > > man 5 virtual (http://www.postfix.org/virtual.5.html) > > man 5 pcre_table (http://www.postfix.org/pcre_table.5.html) > > man pcrepattern (http://www.pcre.org/pcre.txt, look for section > > "PCREPATTERN") > > I am interested in catching mail to root, not "bob," but I'm sure that that > is immaterial. ;) I have root aliased as follows: > root: root-l...@lists.example.com > > The idea I have is that r...@foo.example.com will get caught by this mail > catcher, which will then redirect it to the mailing list on the mail list > server. > > I have an MX record for one of my systems, and I sent email to > r...@foo.example.com to test it. The mail did get handled by the mail > catcher, but instead of accepting the mail and forwarding it on, it rejected > it with "554 5.7.1 Relay access denied." In another test, I found that this > solution does work great for users with permission to relay on the mail > catcher (e.g., when I send to r...@foo.example.com through my mail catcher, > it redirects as desired), but not when the mail originates elsewhere. > > There is a single MX record for my servers, and it points to my mail catcher, > so I would've thought that mail for r...@foo.example.com, for which my mail > catcher is the lone MX handler, would get handled by postfix without issue, > instead of postfix seeing it as a relay. > > I'm sure I'm missing a simple step, but I'm not sure what. I seem to recall > that members of the postfix-users list typically want the output of postconf > or something similar, but I forget exactly what. Let me know, and I'll send > it. > > Thanks for any assistance you can provide. > > Daniel > >