On Tue, Aug 07, 2012 at 03:28:45PM -0700, Scott Brown wrote:
> I recently switched from using flat virtual files to using mysql
> to manage a virtual table.

http://www.postfix.org/DATABASE_README.html#preparing is worth a 
read.

> Email addresses that were set up prior to the switchover can be 
> reached.  But emails set up afterwards can't.

postmap -q new@address mysql:/path/to/your/query

> I added verbose logging to the smtp processes by adding the -v 
> parameter in master.cf

It looks like you added it to smtpd, not smtp. Probably was not 
necessary.

> With old email addresses set up prior to mysql, the resolve_clnt 
> function seems to recognize that the domain is local, even though 
> it doesn't initially see the email address in the virtual alias 
> table (not sure why)

Your post should have included "postconf -n" also. This would have 
been more useful than verbose logs.

> With the new email addresses that are managed by mysql, 
> resolve_clnt doesn't seem to be looking up the email in the virtual 
> table.  Instead, it comes back with the host IP address -- this is 
> the relayhost value set in main.cf.
> 
> Here are the maillog entries for the email set up prior to the 
> mysql switch:
> [root@miltermatic log]# grep "sbr...@oldvirtualdomain.com" maillog

This grep string is going to miss some logging.

[snip]
> I get "Relay access denied" if I try sending email to that domain 
> from gmail.  If I try sending email to that domain with a manual 
> telnet smtp session to localhost port 25 on the machine postfix is 
> running on, it goes through fine:

Sounds like your domain lookup (virtual_mailbox_domains? Just 
guessing, because you did not show us) is failing, but your 
permit_mynetworks restriction accepts it locally.

> Any help would be greatly appreciated!

Repost including NON-verbose logs and postconf -n, plus the output of 
any relevant postmap -q lookups. Lose the grep: show an entire 
transaction for one each of working and non-working addresses. Lose 
the munging, because that will make mail routing issues hard to 
impossible to diagnose.
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:

Reply via email to