Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] postfix - user unknown in local recipient table
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
MatchboxOscar
n00b
n00b


Joined: 15 Feb 2004
Posts: 24

PostPosted: Tue Mar 09, 2004 2:31 pm    Post subject: [Solved] postfix - user unknown in local recipient table Reply with quote

I have a strange problem I have not been able to find a solution to.

"jes" is a local ldap user, "testuser" is a local /etc/passwd user

Code:
stu postfix # postmap -q jes unix:passwd.byname
jes:x:501:500:Jes:/home/jes:/bin/bash

Mar  9 08:04:33 stu postfix/smtpd[18512]: mail_addr_find: jes@distanthaze.com -> (not found)
Mar  9 08:04:33 stu postfix/smtpd[18512]: maps_find: local_recipient_maps: jes@distanthaze.com: not found
Mar  9 08:04:33 stu postfix/smtpd[18512]: maps_find: local_recipient_maps: jes: not found
Mar  9 08:04:33 stu postfix/smtpd[18512]: maps_find: local_recipient_maps: @distanthaze.com: not found
Mar  9 08:04:33 stu postfix/smtpd[18512]: mail_addr_find: jes@distanthaze.com -> (not found)
Mar  9 08:04:33 stu postfix/smtpd[18512]: 88DD3E0017: reject: RCPT from oscar.distanthaze.com[192.168.1.2]: 450 <jes@distanthaze.com>: User unknown in local recipient table; from=<me@distanthaze.com> to=<jes@distanthaze.com> proto=ESMTP helo=<distanthaze.com>


(mail fails)

Code:

stu postfix # postmap -q testuser unix:passwd.byname
testuser:x:1004:100::/home/testuser:/bin/bash

Mar  9 08:04:52 stu postfix/smtpd[18512]: mail_addr_find: testuser@distanthaze.com -> (not found)
Mar  9 08:04:52 stu postfix/smtpd[18512]: maps_find: local_recipient_maps: testuser@distanthaze.com: not found
Mar  9 08:04:52 stu postfix/smtpd[18512]: maps_find: local_recipient_maps: unix:passwd.byname: testuser = testuser:x:1004:100::/home/testuser:/bin/bash
Mar  9 08:04:52 stu postfix/smtpd[18512]: mail_addr_find: testuser@distanthaze.com -> testuser:x:1004:100::/home/testuser:/bin/bash


(mail is delivered)

main.cf:

Code:
local_recipient_maps = unix:passwd.byname $alias_maps



Any ideas? If configs are needed, let me know.

Thanks!


Last edited by MatchboxOscar on Thu Mar 11, 2004 8:47 am; edited 1 time in total
Back to top
View user's profile Send private message
appetitus
Apprentice
Apprentice


Joined: 28 Sep 2003
Posts: 210

PostPosted: Tue Mar 09, 2004 6:17 pm    Post subject: Reply with quote

Your maps are probably out of date. You probably added a user and FAILED to update. See the docs for details.
_________________
Being a Gentoo user means living in a house inhabited by a family of crazed carpenters. When you wake up, the house is different. Maybe there is a new turret, or some walls have moved, or perhaps someone has removed the floor under your bed.
Back to top
View user's profile Send private message
MatchboxOscar
n00b
n00b


Joined: 15 Feb 2004
Posts: 24

PostPosted: Tue Mar 09, 2004 6:58 pm    Post subject: Reply with quote

Thanks for the reply,

I don't think there are any maps to update that would cause this problem, it should be reading the usernames from the system passwd table, which is handled through PAM. The LDAP user seems to map just as well as the /etc/passwd user with postmap, but I get failed mail with one and not the other. It is almost as if postmap is working standalone, but not when called from postfix. I assumed (I know, I know, ASS-U-ME) that if postmap can find the user, then postfix should be able to.

Perhaps I am missing something in the docs?
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Tue Mar 09, 2004 7:52 pm    Post subject: Reply with quote

If you haven't, install gentoolkit. Then do an etcat -u postfix to see which USE variables are compiled into Postfix. This will verify that you have ldap support in your Postfix. Missing ldap support might explain the problem.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
MatchboxOscar
n00b
n00b


Joined: 15 Feb 2004
Posts: 24

PostPosted: Wed Mar 10, 2004 12:55 am    Post subject: Reply with quote

This is really strange. I changed one setting:

Code:
mynetworks = 192.168.1.0/24, 127.0.0.0/8


I had taken my private network out to test smtp auth after coming up with the user unknown in recipient table error. I put it back in to allow my wife to send mail again, and went back to work for the afternoon. I came home, and my mail was working.

???

I must be going nuts!

I guess as long as it works...

I don't have ldap support in postfix because I don't have the need for an advanced virtual hosting database. I prefer to let PAM handle as much as possible so things just work. :)

Thanks for the ideas!
Back to top
View user's profile Send private message
trossachs
Veteran
Veteran


Joined: 22 Jan 2004
Posts: 1204
Location: London

PostPosted: Wed Mar 10, 2004 7:25 pm    Post subject: Reply with quote

If you still have problems, have you checked out your aliases file? Look in your /etc/postfix/main.cf file to see where the aliases file resides.

In my own file, it is listed as:

Code:

alias_maps = $alias_database
alias_database = hash:/etc/postfix/databases/aliases
inet_interfaces = all


Your's may be somewhere different. When you locate the file, bear in mind that any name NOT listed here is what will NOT be delivered to your server.

For example:

Code:

postfix: foo
journals: foo
root: foo
forum: foo
webmaster: foo


The usr name of 'foo' is the 'actual physcial usrname' which resides on the machine itself. Anything sent to "postfix, journals, webmaster" etc, will be sent to the usr name 'foo'. Other than what is listed, will be rejected.

So your error regarding "no local name in recipient table" simply means that you have to choose the aliases that you want to be bolted onto the front of @distanthaze.com.

Let me know how you get on.
Back to top
View user's profile Send private message
MatchboxOscar
n00b
n00b


Joined: 15 Feb 2004
Posts: 24

PostPosted: Thu Mar 11, 2004 8:46 am    Post subject: Reply with quote

JulesF:

Thanks for your reply. I had done a systemwide upgrade which caused a few problems (I had to reset all my ldap accounts--grrr). After a day of no local email, it started working again mysteriously. I have no idea what might have timed out or changed, but it works as expected now.

Thanks again!
Back to top
View user's profile Send private message
trossachs
Veteran
Veteran


Joined: 22 Jan 2004
Posts: 1204
Location: London

PostPosted: Thu Mar 11, 2004 8:54 am    Post subject: Reply with quote

No worries. Let me know if you need further help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum