LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 09-20-2011, 12:19 AM   #1
said76
Member
 
Registered: Aug 2011
Posts: 113

Rep: Reputation: Disabled
550.5.1.1 Recipient address rejected: User unknown in local recipient table RCPT_TO


Hi,

I have been getting problem in receiving emails from both internal (local) and external accounts i.e. Yahoo. I have set up a Mail Server comprising Postfix, Dovecot, OpenLDAP and Squirrelmail on Ubuntu Server 10.04 machine.

I have no problem sending emails out to my yahoo account, but the issue comes up when trying to receive emails back from Yahoo to my local accounts.

Here is the syslog when doing telnet localhost 25
Sep 20 13:59:16 mailserver1 postfix/smtpd[2849]: connect from localhost[127.0.0.1]
Sep 20 14:00:05 mailserver1 postfix/smtpd[2849]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <sam.oneill>: Recipient address rejected: User unknown in local recipient table; from=<sam.oneill> to=<sam.oneill> proto=ESMTP helo=<localhost>
Sep 20 14:05:05 mailserver1 postfix/smtpd[2849]: timeout after RCPT from localhost[127.0.0.1]

I wonder if anyone might be kind to point out where I made mistakes. I really want to make this system to work as I am still learning my way around Linux system.

This is my slapd.conf
Code:
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/nis.schema
include         /etc/ldap/schema/inetorgperson.schema

# Where the pid file is put. The init.d script
# will not stop the server if you change this.
pidfile         /var/run/slapd/slapd.pid

# List of arguments that were passed to the server
argsfile        /var/run/slapd/slapd.args

# Read slapd.conf(5) for possible values
loglevel        none

# Where the dynamically loaded modules are stored
modulepath	/usr/lib/ldap
moduleload	back_hdb

# The maximum number of entries that is returned for a search operation
sizelimit 500

# The tool-threads parameter sets the actual amount of cpu's that is used
# for indexing.
tool-threads 1

#######################################################################
# Specific Backend Directives for hdb:
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
backend		hdb

#######################################################################
# Specific Backend Directives for 'other':
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
#backend		<other>

#######################################################################
# Specific Directives for database #1, of type hdb:
# Database specific directives apply to this databasse until another
# 'database' directive occurs
database        hdb

# The base of your directory in database #1
suffix          "dc=mailserver1,dc=example,dc=com"

# rootdn directive for specifying a superuser on the database. This is needed
# for syncrepl.
rootdn          "cn=admin,dc=mailserver1,dc=example,dc=com"

rootpw	secrets

# Where the database file are physically stored for database #1
directory       "/var/lib/ldap"

# For the Debian package we use 2MB as default but be sure to update this
# value if you have plenty of RAM
dbconfig set_cachesize 0 2097152 0

# Number of objects that can be locked at the same time.
dbconfig set_lk_max_objects 1500
# Number of locks (both requested and granted)
dbconfig set_lk_max_locks 1500
# Number of lockers
dbconfig set_lk_max_lockers 1500

# Indexing options for database #1
index           objectClass eq

lastmod         on

checkpoint      512 30

access to attrs=userPassword,shadowLastChange
        by dn="cn=admin,dc=mailserver1,dc=example,dc=com" read
        by anonymous auth
        by self write
        by * none

access to dn.base="" by * read

access to *
        by dn="cn=admin,dc=mailserver1,dc=example,dc=com" write
        by * read
Here is my base.ldif
Code:
# Tree root
dn: dc=mailserver1,dc=example,dc=com
# objectClass: top
objectClass: dcObject
objectclass: organization
o: mailserver
dc: mailserver1
description: Tree root 

# LDAP admin
dn: cn=admin,dc=mailserver1,dc=example,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
userPassword: {CRYPT}0.GPaHFgOOKVH.

dn: ou=people,dc=mailserver1,dc=example,dc=com
objectClass: organizationalUnit
ou: people

dn: ou=groups,dc=mailserver1,dc=example,dc=com
objectClass: organizationalUnit
ou: groups

dn: ou=accounts,dc=mailserver1,dc=example,dc=com
objectClass: top
objectClass: organizationalUnit
ou: accounts

# only necessary if you are NOT using 'bind' authentication
dn: cn=dovecot,ou=accounts,dc=mailserver1,dc=example,dc=com
objectClass: top
objectClass: person
cn: dovecot
sn: dovecot

dn: uid=sam.oneill,ou=accounts,dc=mailserver1,dc=example,dc=com
objectClass: top
objectClass: person
objectClass: posixAccount
cn: Samatha ONeill
sn: oneill
uid: sam.oneill
uidNumber: 1005
gidNumber: 1003
userPassword: {CRYPT}dlUtxwTlowPQgVo
homeDirectory: /home/soneill
Here is ldap-user.cf
Code:
server_host = ldap://localhost
search_base = ou=accounts,dc=mailserver1,dc=example,dc=com
version = 3
query_filter = (&(objectclass=person) (samaccountname=%u))
result_attribute = uid
result_format = %s/Maildir/
bind = yes
bind_dn = cn=admin,dc=mailserver1,dc=example,dc=com
bind_pw = {CRYPT}0.GPaHFgOOKVH.
Here is Postfix main.cf
Code:
myhostname = mailserver1.example.com
mydomain = localdomain
mydestination = $myhostname, localhost
virtual_mailbox_domains = $mydomain
virtual_mailbox_base = /home/vmail/
virtual_mailbox_maps = ldap:/etc/postfix/ldap-users.cf
virtual_uid_maps = static:1004
virtual_gid_maps = static:1004
relayhost = 
mynetworks = 127.0.0.0/8, 192.168.1.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
home_mailbox = Maildir/
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanomymous
smtpd_tls_auth_only = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination,reject_sender_login_mismatch
smtpd_sasl_local_domain = mailserver1.example.com
Here is my dovecot.conf
Code:
   protocols = imap

   protocol imap {
     listen = *:143
   }

disable_plaintext_auth = no

log_timestamp = "%Y-%m-%d %H:%M:%S "

ssl = no

login_dir = /var/run/dovecot/login

login_chroot = yes

login_user = dovecot

mail_location = maildir:/home/%u/Maildir 

mail_privileged_group = mail

verbose_proctitle = yes

maildir_copy_with_hardlinks = yes

protocol imap {
  imap_client_workarounds = outlook-idle delay-newmail netscape-eoh tb-extra-mailbox-sep
}

protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}

protocol managesieve {
}


auth_verbose = yes
auth_debug = yes
auth_debug_passwords = yes

auth default {
  mechanisms = plain login
  }

  passdb ldap {
    args = /etc/dovecot/dovecot-ldap.conf
  }

  userdb prefetch {
  }

  userdb passwd {
  }

  userdb ldap {
    # Path for LDAP configuration file
    args = /etc/dovecot/dovecot-ldap.conf
  }

  user = root

  socket listen {

    client {
      path = /var/spool/postfix/private/auth
      mode = 0660
      user = postfix
      group = postfix
    }
  }
  !include_try /etc/dovecot/auth.d/*.auth
}

dict {
}

# Optional configurations, don't give an error if it's not found:
!include_try /etc/dovecot/conf.d/*.conf
#!include_try /etc/dovecot/extra.conf
Here is my dovecot-ldap.conf
Code:
hosts = localhost:389

dn = cn=admin,dc=mailserver1,dc=example,dc=com 

dnpass = {CRYPT}0.GPaHFgOOKVH.

auth_bind = no

ldap_version = 3

base = ou=accounts,dc=mailserver1,dc=example,dc=com
deref = never

scope = subtree

user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid

user_filter = (&(objectClass=posixAccount)(uid=%u))

pass_attrs = uid=user,userPassword=password,\
  homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid

pass_filter = (&(objectClass=posixAccount)(uid=%u))

default_pass_scheme = CRYPT
I hope the above information would be helpful for you to help me out.

Thank you in advance
 
Old 09-24-2011, 10:01 PM   #2
ShanxT
Member
 
Registered: Apr 2007
Location: India
Distribution: Ubuntu 10.04, RHEL/Centos 5.x, Knoppix
Posts: 41

Rep: Reputation: 3
The issue is self-explanatory. Read this part of the error message:

Quote:
Recipient address rejected: User unknown in local recipient table
This is an error from Postfix, telling you that the user doesn't exist. Take a look at this post and the postfix man page to help you out.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Server refuses mail with 550 5.1.1 : Recipient address rejected: User unknown ... cbj4074 Linux - Server 7 01-31-2021 01:54 PM
Recipient address rejected: User unknown in virtual alias table Phiggy Linux - Server 6 11-08-2009 05:34 PM
Recipient address rejected: User unknown in virtual mailbox table Sleen Linux - Server 5 08-25-2007 01:09 AM
qmail stats:Recipient address rejected: User unknown in virtual alias table/Giving up Niceman2005 Linux - Software 0 08-19-2007 08:13 PM
User unknown in relay recipient table ~=gr3p=~ Linux - Networking 2 05-24-2006 02:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration