LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 09-26-2004, 08:49 AM   #1
iliah
LQ Newbie
 
Registered: Jul 2004
Posts: 4

Rep: Reputation: 0
postfix - wrong recipient address


hi
I've got such problem after installing postfix -
after sending letter by php function mail() with the recipient email as first argument
I can't receive it

here is the log:

####################################################
Sep 26 16:52:31 arisa syslog-ng[8339]: Objects alive: 40, garbage collected: 65
Sep 26 16:52:34 arisa postfix/postfix-script: starting the Postfix mail system
Sep 26 16:52:34 arisa postfix/master[9637]: daemon started -- version 2.1.3
Sep 26 16:52:41 arisa postfix/pickup[9638]: 16B32F6B29: uid=81 from=<apache>
Sep 26 16:52:41 arisa postfix/cleanup[9643]: 16B32F6B29: message-id=<20040926165241.16B32F6B29@arisa.hostname.ru>
Sep 26 16:52:41 arisa postfix/cleanup[9643]: 16B32F6B29: to=<unknown>, relay=none, delay=0, status=bounced (No recipients specified)
Sep 26 16:52:41 arisa postfix/cleanup[9647]: 1E0D1F6BCE: message-id=<20040926165241.1E0D1F6BCE@arisa.hostname.ru>
Sep 26 16:52:41 arisa postfix/qmgr[9639]: 1E0D1F6BCE: from=<>, size=2001, nrcpt=1 (queue active)
Sep 26 16:52:41 arisa postfix/local[9648]: 1E0D1F6BCE: to=<apache@arisa.hostname.ru>, relay=local, delay=0, status=sent (delivered to mailbox)
Sep 26 16:52:41 arisa postfix/qmgr[9639]: 1E0D1F6BCE: removed

####################################################

as it can be seen - wrong recipient address
why postfix override it with the apache@machine_name.hostname.ru ?

here is `cat /etc/mail/aliases`:

####################################################
# Basic system aliases -- these MUST be present.
MAILER-DAEMON: postmaster
postmaster: root

# General redirections for pseudo accounts.
adm: root
bin: root
daemon: root
exim: root
lp: root
mail: root
named: root
nobody: root
postfix: root

# Well-known aliases -- these should be filled in!
root: my_email@my_postserver.ru
# operator:

# Standard RFC2142 aliases
abuse: postmaster
ftp: root
hostmaster: root
news: usenet
noc: root
security: root
usenet: root
uucp: root
webmaster: root
www: webmaster
####################################################

thanx for any suggestions !

Last edited by iliah; 09-26-2004 at 08:53 AM.
 
Old 09-26-2004, 09:19 AM   #2
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
as it can be seen - wrong recipient address
why postfix override it with the apache@machine_name.hostname.ru ?


Based on the logfile entries, your e-mail has no recipient address specified, so its bounced back to the sender. Since the sender address was not a fully qualified address (just apache), postfix will by default, add the fully qualifed domain name of the sending system when generating the bounce.

Suggestions:
1) Fix your php program that is submitting this e-mail to include the recipient
2) See the ADDRESS_REWRITING_README. On my system, this file is located in /etc/postfix/readme
 
Old 09-26-2004, 10:34 AM   #3
iliah
LQ Newbie
 
Registered: Jul 2004
Posts: 4

Original Poster
Rep: Reputation: 0
> Fix your php program that is submitting this e-mail to include the recipient

I don't know what to fix there 'cause it's just one function call - mail($to, $subject, $message);

> See the ADDRESS_REWRITING_README. On my system, this file is located in /etc/postfix/readme

done, but it still isn't clear for me about rewriting
I 've added this to /etc/mail/aliases
"apache: my_email"

and finally got this:

-------------------------------------------------------------------------------------------
Subject: Undelivered Mail Returned to Sender
From: Mail Delivery System <MAILER-DAEMON@arisa.hostname.ru>
To: apache@arisa.hostname.ru

This is the Postfix program at host arisa.hostname.ru.

I'm sorry to have to inform you that your message could not be
be delivered to one or more recipients. It's attached below.

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 attached returned message.

The Postfix program

<unknown>: No recipients specified

Reporting-MTA: dns; arisa.hostname.ru
X-Postfix-Queue-ID: 93C01F6BC6
X-Postfix-Sender: rfc822; apache@arisa.hostname.ru
Arrival-Date: Sun, 26 Sep 2004 18:03:09 +0000 (GMT)

Final-Recipient: rfc822; unknown
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; No recipients specified

Subject:
test from gentoo
From:
apache@arisa.hostname.ru (apache)
Date:
Sun, 26 Sep 2004 18:03:09 +0000 (GMT)
To:
my_email
Received:
by arisa.hostname.ru (Postfix, from userid 81) id 93C01F6BC6; Sun, 26 Sep 2004 18:03:09 +0000 (GMT)
Message-ID:
<20040926180309.93C01F6BC6@arisa.hostname.ru>

message
-------------------------------------------------------------------------------------------

why if I tell PHP send letter to someone@server.ru it doesn't pass address to postfix?

what I miss in /etc/postfix/main.cf?

#################
defer_transport = smtp
relayhost = hostname.ru
mail_owner = postfix
myhostname = arisa.hostname.ru
mydomain = hostname.ru
#################

Last edited by iliah; 09-26-2004 at 10:36 AM.
 
  


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
postfix problem:: Internet recipient cannot receive mail adrianmak Linux - Software 2 08-16-2005 06:30 AM
postfix and php : recipient unknown jodaog Linux - Software 1 03-13-2005 10:25 AM
Recipient gets different address gubak Linux - Networking 3 02-11-2005 01:41 PM
Postfix error - Recipient address rejected: Relay access denied robbiemorgan Linux - Newbie 1 10-01-2004 04:57 AM
Email Error - "Recipient address rejected: Relay access denied" ripcord Linux - Newbie 1 10-31-2002 04:00 PM


All times are GMT -5. The time now is 03:51 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration