LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 11-13-2010, 08:56 PM   #1
cbj4074
LQ Newbie
 
Registered: Jan 2005
Location: Dallas, TX
Distribution: Ubuntu 6.10
Posts: 24

Rep: Reputation: 15
Server refuses mail with 550 5.1.1 : Recipient address rejected: User unknown ...


Hello, everyone,

I'm having a problem whereby I'm able to send mail to a mailbox from several different email addresses and SMTP servers (gmail, RoadRunner broadband), but I'm unable to send mail to the same address from one particular account, the SMTP server for which runs on a mediaTemple (dv) 3.0 box with CentOS 5 Final.

I've spent a full workday on the forums, trying to troubleshoot the issue, and I'm running out of ideas.

The server on which I'm having the mail processing problem is a mediaTemple (ve) running Ubuntu 10.04 x64 (Linux 2.6.18-028stab070.7 #1 SMP Fri Oct 1 13:53:00 MSD 2010 x86_64 GNU/Linux), with ISPConfig 3. Here's how I setup the mail-related aspects of the Ubuntu box:

Code:
apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server openssl getmail4 rkhunter binutils dovecot-imapd dovecot-pop3d
Code:
aptitude install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 arj nomarch lzop cabextract apt-listchanges libnet-ldap-perl libauthen-sasl-perl clamav-docs daemon libio-string-perl libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl
I basically stitched together the relevant pieces of these two tutorials (with several modifications, although most were minor and unrelated to mail); I wanted Dovecot instead of Courier, hence the second tutorial:

(from this page onward)
http://www.howtoforge.com/perfect-se...ispconfig-3-p4

(substituted the Dovecot-specific portions of this tutorial into the above steps)
http://www.howtoforge.com/perfect-se...ispconfig-3-p3

I didn't make any changes (at least not directly; ISPConfig may have) to /etc/postfix/master.cf or /etc/postfix/main.cf. Here are the relevant parts of both files:

/etc/postfix/master.cf

Code:
dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
amavis unix - - - - 2 smtp
        -o smtp_data_done_timeout=1200
        -o smtp_send_xforward_command=yes


127.0.0.1:10025 inet n - - - - smtpd
        -o content_filter=
        -o local_recipient_maps=
        -o relay_recipient_maps=
        -o smtpd_restriction_classes=
        -o smtpd_client_restrictions=
        -o smtpd_helo_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o mynetworks=127.0.0.0/8
        -o strict_rfc821_envelopes=yes
        -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
        -o smtpd_bind_address=127.0.0.1
/etc/postfix/main.cf

Code:
myhostname = mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mydomain.com, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8 [::1]/128
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
virtual_transport = dovecot
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
body_checks = regexp:/etc/postfix/body_checks
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
message_size_limit = 0
inet_protocols = ipv4
soft_bounce = no
In Webmin, I have the following under Servers. I'm new to this setup, and I don't know if Fetchmail and Sendmail are even necessary, given that Dovecot and Postfix are installed (any guidance there?). Hopefully, they're not interfering.

Apache Webserver
BIND DNS Server
Dovecot IMAP/POP3 Server
Fetchmail Mail Retrieval
MySQL Database Server
Postfix Mail Server
Read User Mail
SSH Server
Sendmail Mail Server
SpamAssassin Mail Filter
Webalizer Logfile Analysis

Whenever I try to send mail from me@mydomain.com to me@myotherdomain.com (those aren't my real email addresses, obviously), the following events are logged:

/var/log/syslog

Code:
Nov 13 16:40:55 ve postfix/smtpd[11341]: NOQUEUE: reject: RCPT from myotherdomain.com[xxx.xxx.xxx.xxx]: 550 5.1.1 <me@mydomain.com>: Recipient address rejected: User unknown in local recipient table; from=<me@myotherdomain.com> to=<me@mydomain.com> proto=ESMTP helo=<myotherdomain.com>
Nov 13 16:40:55 ve postfix/smtpd[11341]: disconnect from myotherdomain.com[xxx.xxx.xxx.xxx]
/var/log/mail.log

Code:
Nov 13 16:40:55 ve postfix/smtpd[11341]: NOQUEUE: reject: RCPT from myotherdomain.com[xxx.xxx.xxx.xxx]: 550 5.1.1 : Recipient address rejected: User unknown in local recipient table; from= to= proto=ESMTP helo=
Nov 13 16:40:55 ve postfix/smtpd[11341]: disconnect from myotherdomain.com[xxx.xxx.xxx.xxx]
(I don't know if the fact that from= to= and helo= are all without values in the first message is a problem or not. Thoughts?)

I have not changed the default amavis log location, although, there is no file at what I understand to be the default location, /var/log/amavis.log. I assume that amavis has yet to come into the picture at this juncture.

Here's the response that I receive from myotherdomain.com, when mydomain.com refuses the delivery:

Code:
Hi. This is the qmail-send program at myotherdomain.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<me@mydomain.com>:
xxx.xxx.xxx.xxx does not like recipient.
Remote host said: 550 5.1.1 <me@mydomain.com>: Recipient address rejected: User unknown in local recipient table
Giving up on xxx.xxx.xxx.xxx.

--- Below this line is a copy of the message.

Return-Path: <me@myotherdomain.com>
Received: (qmail 24521 invoked from network); 13 Nov 2010 16:40:54 -0800
Received: from xxx.maine.res.rr.com (HELO ?192.168.1.115?) (xxx.xxx.xxx.xxx)
  by myotherdomain.com with (AES256-SHA encrypted) SMTP; 13 Nov 2010 16:40:54 -0800
Message-ID: <4CDF3011.5040109@myotherdomain.com>
Date: Sat, 13 Nov 2010 19:40:49 -0500
From: Me <me@myotherdomain.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6
MIME-Version: 1.0
To: Me <me@mydomain.com>
Subject: Test
X-Enigmail-Version: 1.1.1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
The mailbox setup within ISPConfig appears to be correct. I'm positive that the mailbox exists, because I'm able to send mail from it (using authentication), and the mail reaches its destination (even when sending to myotherdomain.com) and I'm able to log into the account through webmail (roundcube).

If I look at the MySQL tables that are referenced in the .cf files (within /etc/postfix/main.cf), the mailbox to which I am attempting to send mail from my other domain is indeed present.

I've tried adding myotherdomain.com to every whitelist I can find, but nothing changes. SpamAssasin is turned-off for the domain and mailbox within ISPConfig.

This doesn't seem like a DNS issue, does it? I believe that my DNS records are configured correctly:

Code:
A 	*.mydomain.com 	xxx.xxx.xxx.xxx 	0 	
A 	ftp.mydomain.com 	xxx.xxx.xxx.xxx 	0 	
A 	mail.mydomain.com 	xxx.xxx.xxx.xxx 	0 	
A 	www.mydomain.com 	xxx.xxx.xxx.xxx 	0 	
MX 	mydomain.com 	mail.mydomain.com 	10 	
NS 	mydomain.com 	ns1.mediatemple.net 	0 	
NS 	mydomain.com 	ns2.mediatemple.net 	0
The Reverse DNS record at mediaTemple is pointed at mydomain.com, which is the automatically-assigned hostname that mediaTemple gave the Ubuntu (ve) server upon provisioning.

I have tried sending to me@mail.mydomain.com, and I receive a failure message, too, but the reason is "Relay access denied".

Any help would be deeply appreciated. This has been frustrating me for days. Thanks for your time and assistance!
 
Old 11-14-2010, 01:36 AM   #2
sarajevo
Member
 
Registered: Apr 2005
Distribution: Debian, OpenBSD,Fedora,RedHat
Posts: 228
Blog Entries: 1

Rep: Reputation: 31
Did you tried to change line
Code:
mydestination = mydomain.com, localhost, localhost.localdomain
to
Code:
mydestination = $myhostname, localhost.$mydomain, localhost,$mydomain
also what is in your database set up for users....
what have you in table users in your myslql, is user you want to send mail created at all on system ?

hth
 
Old 11-14-2010, 03:21 PM   #3
cbj4074
LQ Newbie
 
Registered: Jan 2005
Location: Dallas, TX
Distribution: Ubuntu 6.10
Posts: 24

Original Poster
Rep: Reputation: 15
Thank you for your timely response, sarajevo!

I tried your suggestion, but the change caused an error in the mail log:

Code:
Nov 14 09:54:44 ve postfix[24492]: warning: unreasonable macro call nesting: "myhostname"
Nov 14 09:54:44 ve postfix[24492]: fatal: dictionary mail_dict: macro processing error
However, your comments got me thinking, and I noticed dozens of log entries containing the following:

Code:
Nov 10 18:37:49 ve postfix/trivial-rewrite[3151]: warning: do not list domain mydomain.com in BOTH mydestination and virtual_mailbox_domains
So, I simply removed mydomain.com from the beginning of that line in /etc/postfix/main.cf and now I'm able to send mail to the intended recipient!

I had read elsewhere that the above warning could be ignored, and that it was normal when a virtual mailbox domain is created with the same name as the server's hostname. Based on this experience, however, it seems that the warning cannot be ignored -- at least if the mail server is to function properly!

I appear to be sorted here; thanks again!
 
Old 12-21-2011, 06:32 AM   #4
dtr
LQ Newbie
 
Registered: Dec 2011
Posts: 1

Rep: Reputation: Disabled
Thanks, i had the same problem and your solution was perfect form me.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Recipient address rejected: User unknown in virtual alias table Phiggy Linux - Server 6 11-08-2009 06:34 PM
Recipient address rejected: User unknown in virtual mailbox table Sleen Linux - Server 5 08-25-2007 02:09 AM
qmail stats:Recipient address rejected: User unknown in virtual alias table/Giving up Niceman2005 Linux - Software 0 08-19-2007 09:13 PM
Recipient address rejected gabsik Linux - Networking 2 10-18-2006 01:45 PM
Postfix: Recipient address rejected: Relay access denied; stormrider_may Linux - Networking 5 02-18-2006 06:38 AM


All times are GMT -5. The time now is 01:26 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration