Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using virtual alias maps to relay mail and I keep having some of the entries bounce. Postfix seems to know where they are supposed to go and when I run postmap -q for virtual_alias_maps and virtual_alias_domains they both return the correct data.

This is the error that I am getting:

Aug  4 16:48:03 server2 postfix/error[53118]: 0ACABDABAA: to=<foo@bar.com>, orig_to=<bar@foo.com>, relay=none, delay=17221, delays=17221/0.02/0/0, dsn=4.0.0, status=SOFTBOUNCE (User unknown in virtual alias table)

When I run

postmap -q "bar.com" hash:/path/to/virtual-alias-domain

it returns "bar.com" and when i run

postmap -q "bar@foo.com" hash:/path/to/virtual-alias-map it returns "bar@foo.com"

Is there something else I should be looking at? Also, what should the maps permissions be?

share|improve this question
    
Does that foo@bar.com user exist? –  Janne Pikkarainen Aug 5 '11 at 7:14
    
Yeah, the "foo@bar.com" user exists and I can send mail to them directly. –  devnill Aug 5 '11 at 9:38
    
How did Postfix decide to forward bar@foo.com to foo@bar.com if the virtual map points to bar@foo.com? (By the way, terrible examples; very confusing) –  womble Aug 5 '11 at 11:10
add comment

1 Answer 1

up vote 0 down vote accepted

I think you might be right on the money with the permissions question (although I have a vague recollection that you got some sort of error message at startup if the files weren't readable, I'm not in a position to test that at the moment). I'm guessing you're running all your command-line testing as root (where it'll definitely succeed) and not as whatever Postfix itself is running as. The maps files need to be readable by all the Postfix processes; this can be achieved by any of:

  • Being owned by the user running Postfix, and u:r
  • Being grouped to the user running postfix, and g:r
  • Being owned by (eg) root:root and o:r

Naturally there has to be suitable x bits on leading directory paths.

If it's not permissions, nothing particular comes to mind; for me, Postfix virtual maps Just Work.

One thing I am curious about is why you're looking up bar@foo.com when Postfix is trying to deliver to foo@bar.com.

share|improve this answer
    
The maps are both owned by root and are readable by other. I also have no errors besides the bounces. Is there a straightforward way I can see why it the mail is bouncing. “User unknown in virtual alias table” is not quite verbose enough to provide any help. –  devnill Aug 5 '11 at 7:00
    
What other information would you need to diagnose the problem? You've already got everything that Postfix is using to look up the map. –  womble Aug 5 '11 at 7:07
    
I'm honestly not sure. Everything that I've read says that it should be working and it still isn't. I've set up test accounts using the same tables and they work fine and I can't find a pattern of why some won't work. I was hoping there would be some magic parameter to say exactly what is going wrong. –  devnill Aug 5 '11 at 9:00
    
Set tell_me_what_im_doing_wrong = true; or just set dwim = yarly. –  womble Aug 5 '11 at 9:06
    
I wish that was real :-/. I've read pretty much every relevant document on postfix.org and everything seems to be in order. I was just hoping I made some obvious mistake... –  devnill Aug 5 '11 at 9:35
show 6 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.