LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-21-2003, 01:32 AM   #1
DeVryGuy
LQ Newbie
 
Registered: Sep 2003
Distribution: Red Hat 8/9
Posts: 7

Rep: Reputation: 0
Postfix not delivering mail to mailbox


I am using Postfix as my MTA, I am running it on RH 8.0

Basically the problem boils down like this:
I can send mail to an outside email address, however, when I try to reply, it hits the postfix program and sends back a message saying it can't find the addressed user. So it is getting to the box, but then the program can't figure out what to do with it and sends it back.
Telenet localhost 25 works fine

I put into a terminal:
mail root
subject: hello world
hello world
cc:

and the mail log shows this

Sep 21 02:23:49 www postfix/pickup[6637]: 1AA4D123E0: uid=0 from=<root>
Sep 21 02:23:49 www postfix/cleanup[6656]: 1AA4D123E0: message-id=<20030921062349.1AA4D123E0@mydomain>
Sep 21 02:23:49 www postfix/nqmgr[6638]: 1AA4D123E0: from=<root@mydomain>, size=310, nrcpt=1 (queue active)
Sep 21 02:23:49 www postfix/local[6658]: 1AA4D123E0: to=<DeVryGuy@mydomain>, relay=local, delay=0, status=bounced (unknown user: "devryguy")
Sep 21 02:23:49 www postfix/cleanup[6656]: 4773B12D46: message-id=<20030921062349.4773B12D46@mydomain>
Sep 21 02:23:49 www postfix/nqmgr[6638]: 4773B12D46: from=<>, size=1877, nrcpt=1 (queue active)
Sep 21 02:23:49 www postfix/local[6658]: 4773B12D46: to=<DeVryGuy@mydomain>, relay=local, delay=0, status=bounced (unknown user: "devryguy")

Here is my main.cf file (I appoligize if this is a little messy, I'm sure that there are things that shouldn't be here and things that are declared wrong. I've been working on this for a little over a month and used several different examples on the internet but nothing really ever seems to change)
queue_directory = /var/spool/postfix
command_directory = usr/sbin
daemon_directory = /usr/libexex/postfix
mail_owner = postfix
myorigin = devryguyz.com
mydestination = $myhostname, devryguyz.com, $mydomain
relay_domains = $mydestination, devryguyz.com
local_recipient_maps = $alias_maps unixasswd.byname
alias_maps = hash:/etc/postfix/aliases
mail_spool_directory = /var/spool/mail
debug_peer_level = 2
debugger_command
PATH=/usr/bin:/usr/X11R6/bin
xxgbd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
manpage_directory = usr/share/man
sample_directory = /usr/share/doc/postfix-1.1.11/samples
readme_directory = /usr/share/doc/postfix-1.1.11/README_FILES
alias_database = hash:/etc/postfix/aliases
 
Old 09-21-2003, 01:54 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Well, assuming that libexex is a typo (libexec) I don't see any blatently obvious errors in the file. It's a little messy, like you said, but nothing really stands out as 'wrong'.

You probably just need to make an alias (unless that user actually exists on the system) and then update the aliases database, finally restart postfix:
vim /etc/postfix/aliases
Add the users using the syntax as noted, save exit, then:
newaliases
postalias /etc/postfix/aliases
postfix reload
And resend the message.

And just to clarify your post:
You are attempting to send mail TO this box, from another Linux box, or the localhost possibly, and it's getting returned because of 'user unknown'. If this is correct, cool. If not, please clarify what you are doing, and the error message you are getting.

Cool
 
Old 09-21-2003, 09:23 AM   #3
DeVryGuy
LQ Newbie
 
Registered: Sep 2003
Distribution: Red Hat 8/9
Posts: 7

Original Poster
Rep: Reputation: 0
Well basically I have been running a webserver from home the last two months and I've been trying to get the email (which my old hosting company used to provide) back up and running. The user I'm sending email to is an actual user on the box. It will send mail to an outside address (such as my school email) but when I try to get mail on the box, reguardless of where it comes from(outside email or using the mail command). I am still very much a newb to linux, but this is the only thing I've really had trouble configuring so far.

This is the exact error message being returned to the outside email address:
This is the Postfix program at host mydomain.

I'm sorry to have to inform you that the message returned
below could not be delivered to one or more destinations.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the message returned below.

The Postfix program

<DeVryGuy@mydomain>: unknown user: "devryguy"

And while looking at the mail log, the internal mail attempts to send this back but can't find the mailbox it came from as shown in the above post

Last edited by DeVryGuy; 09-21-2003 at 09:27 AM.
 
Old 09-21-2003, 12:32 PM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Ok, does it do that regardless of the user, for example, if you use user 'root' does that happen? Check your aliases file as suggested above.

Also, something just hit me, I don't see a reference to your domain, nor to your hostname in your above main.cf file. That could be causing you some hate and discontent if those aren't defined properly or at all.

Cool
 
Old 09-21-2003, 12:43 PM   #5
DeVryGuy
LQ Newbie
 
Registered: Sep 2003
Distribution: Red Hat 8/9
Posts: 7

Original Poster
Rep: Reputation: 0
Hmm after doing some testing...

there is another user on the box names 'jason' after logging in and mailing Jason, I checked his mail using the mail command and squirrelmail and both showed the email from root. However the outside email still bounced. my username (devryguy) and root both bounce no matter where the mail is coming from.

i added the myhostname = www.mydomain.com and the mydomain = domain.com as you said, still same issues

Last edited by DeVryGuy; 09-21-2003 at 12:50 PM.
 
Old 09-21-2003, 01:03 PM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
The hostname is incorrect, it should be the following:

Go to a console and type:
hostname
It will report back the hostname of the localhost, if you haven't changed it, it will likely just be localhost, which should be changed if you are on anything other than a single computer network. Anyway, let's go with it for the example:
myhostname = localhost.domain.com
mydomain = domain.com

Is the proper syntax for the 2. After making any changes to this file, be sure to restart postfix:
postfix reload

Cool
 
Old 09-21-2003, 02:15 PM   #7
DeVryGuy
LQ Newbie
 
Registered: Sep 2003
Distribution: Red Hat 8/9
Posts: 7

Original Poster
Rep: Reputation: 0
hostname returns www.devryguyz.com

so I set myhostname = www.devryguyz.com
and domain to devryguyz.com

Correct?

Also I'm assuming when you say postfix reload that means the same thing as

/sbin/service postfix restart
 
Old 09-21-2003, 02:37 PM   #8
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
If that is how your distro does it, then that should be sufficient.

However, you should alter your hostname. The name should be a single word or so. Something like "linuxbox" or "server" would be a hostname. The domain is where the address of your site goes.

Cool
 
Old 09-21-2003, 04:35 PM   #9
DeVryGuy
LQ Newbie
 
Registered: Sep 2003
Distribution: Red Hat 8/9
Posts: 7

Original Poster
Rep: Reputation: 0
Alright I'll change that, and other ideas on why the mail is still messing up though?

BTW I really appreciate all the help
 
Old 09-21-2003, 04:44 PM   #10
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Not off hand, if you can post up a full error message, the bounced message or something, then that'd be great.

Cool
 
Old 09-21-2003, 04:50 PM   #11
DeVryGuy
LQ Newbie
 
Registered: Sep 2003
Distribution: Red Hat 8/9
Posts: 7

Original Poster
Rep: Reputation: 0
Well here is what the mail log just put out when attempting to send mail to devryguy from jason

Sep 21 17:52:31 www postfix/pickup[15217]: 4DAC1123C5: uid=502 from=<jason>
Sep 21 17:52:31 www postfix/cleanup[15465]: 4DAC1123C5: message-id=<20030921215231.4DAC1123C5@localhost.devryguyz.com>
Sep 21 17:52:31 www postfix/nqmgr[15063]: 4DAC1123C5: from=<jason@devryguyz.com>, size=323, nrcpt=1 (queue active)
Sep 21 17:52:31 www postfix/local[15466]: 4DAC1123C5: to=<DeVryGuy@devryguyz.com>, relay=local, delay=0, status=bounced (unknown user: "devryguy")

It does however get the message back to jasons mailbox
Sep 21 17:52:31 www postfix/cleanup[15465]: 63D2512D47: message-id=<20030921215231.63D2512D47@localhost.devryguyz.com>
Sep 21 17:52:31 www postfix/nqmgr[15063]: 63D2512D47: from=<>, size=1945, nrcpt=1 (queue active)
Sep 21 17:52:31 www postfix/local[15466]: 63D2512D47: to=<jason@devryguyz.com>, relay=local, delay=0, status=sent (mailbox)

I've been comparing user accounts to see why Jason might be working and DeVryGuy wouldn't, however no such information is obvious to me
 
Old 09-21-2003, 08:28 PM   #12
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Do you have a user named "devryguy"?

Cool
 
Old 09-21-2003, 11:00 PM   #13
DeVryGuy
LQ Newbie
 
Registered: Sep 2003
Distribution: Red Hat 8/9
Posts: 7

Original Poster
Rep: Reputation: 0
Sure do lol
 
Old 09-22-2003, 12:43 AM   #14
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Ok, I guess the next step is looking at the network. You say email FROM anywhere can get through to user "jason", is that correct? That would include localhost email sent to user Jason, as well as remote email from something like yahoo.com sent to jason, all gets through.

I just took a look at your MX record, I don't see any info there for an IP:
Code:
bash-2.05a$ dig devryguyz.com MX

; <<>> DiG 9.2.1 <<>> devryguyz.com MX
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40608
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;devryguyz.com.                 IN      MX

;; AUTHORITY SECTION:
devryguyz.com.          1800    IN      SOA     ns1.mydyndns.org. zone-admin.dyndns.org. 2003072700 10800 1800 604800 1800

;; Query time: 51 msec
;; SERVER: 4.2.2.5#53(4.2.2.5)
;; WHEN: Sun Sep 21 22:37:01 2003
;; MSG SIZE  rcvd: 101
Which might mean that you simply don't have your network setup properly. Add an MX record to your zone, and be sure that the MX record is pointing properly to an A record IP. For example:
mail.devryguyz.net must resolve to the IP of your box. Once it does, add it as the MX record:
A record: mail.devryguyz.com = 65.25.149.88
MX record = mail.devryguyz.com as primary mail handler for devryguyz.com

Give it about an hour for the changes to take effect, and try again. In the meantime, tell us anything you can about your network, you may have something setup improperly.

Cool
 
  


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
Postfix/Cyrus Not delivering mail nitsujw Linux - Software 1 07-17-2005 06:16 PM
qmail delivering mail but not to mailbox ServerStorm Linux - Software 9 01-13-2005 10:39 AM
postfix not delivering mail to root pbaumgar Linux - Software 1 06-25-2004 12:44 AM
postfix not delivering mail stir_frey Linux - Software 2 10-10-2003 07:43 AM
POSTFIX not delivering? BxBoy Linux - Software 1 06-04-2003 03:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:59 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
Open Source Consulting | Domain Registration