On Tue, Jan 26, 2010 at 10:35:23PM -0800, Jeff Weinberger wrote:
> >     Wietse:
> > > > > 5.7.1 <mylist@
> > > > > <mailto:mylist@>>: Relay access denied;
> >
> > You have not listed the domain in relay_domains, 
> > virtual_alias_domains, virtual_mailbox_domains or mydestination.
> >
> > Convince yourself and examine the output from:
> >
> > # postconf relay_domains

> I did this test prior to posting. You'll see in my postconf -n 
> output that:
> 
> relay_domains = $mydestination, mysql:/etc/postfix/
> mysql_relay_domain_maps.cf

This looks strange. Maybe it's a matter of your MUA doing a bad job
of line wrapping, or maybe there is a space in there? If you have
"mysql:/etc/postfix/ mysql_relay_domain_maps.cf" instead of
"mysql:/etc/postfix/mysql_relay_domain_maps.cf", that could surely
explain this.

You don't need $mydestination in there, take that out. Then show us
   postconf relay_domains
   postmap -q <your-munged-domain> 
mysql:/etc/postfix/mysql_relay_domain_maps.cf ; echo $?

> I then checked with `postmap -q "maill...@lists.mylistserver.com"
> mysql:/etc/postfix/mysql_relay_domain_maps.cf` and it showed up
> fine.

Wrong query, relay_domains is a list of domains.

> There is a possibility that the MySQL query is returning a result 
> that is not what postfix needs. I have perused the documentation on 
> this repeatedly and found no specification as to what that query 
> should return for postfix to accept the domain.

The documentation says that if you use a lookup table for this, the
lookup result is ignored. All that matters is that a result is
returned.

> I have tried it where postfix returns the domain 
> ("lists.mylistserver.com" without the quotes)

"Returns"? The domain name would be the lookup key, not necessarily
the result, which per above, is ignored.

> and where it returns the value "OK" (again, without the
> quotes) and neither one works.
>
> If you can offer specifics on what that query should return, I will
> make it do so and test again.
>
> Otherwise, if the proper return value is one of those noted, I'd
> appreciate other suggestions on why this might not be working.

You munged the domain name. That's a bad idea in troubleshooting
email routing issues. If you typoed your log mung or your postmap
query, we are not seeing it, you are on your own. Your logs tell us
that the domain is not an authorized destination handled by your
Postfix. We will choose to believe your logs.

How many domains are there in this relay_domains lookup? SQL maps
make sense for large datasets which change frequently. They do not
make sense for small, relatively static lists. It also creates a
certain risk of mail loss, because class definitions are very
important to Postfix. (Mail loss such as you are seeing, for that
matter.)

So the first suggestion is to use the real domain name, direct
copy and paste from logs and command line to your list post. And the
second suggestion is to take mysql out of this, just put your list of
relay_domains directly into the main.cf file.
-- 
    Offlist mail to this address is discarded unless
    "/dev/rob0" or "not-spam" is in Subject: header

Reply via email to