Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Return-Path settings. qmail-send program.  Unreturnable address rejected.

Posted on 2010-09-13
3
1,440 Views
Last Modified: 2013-12-13
Hi,
    Ive bought a VPS hosting with 2-IP addresses. (Plesk Control Panel)

1st IP address is set to domain -> test.domain.jp (external DNS not assigned)
( test.domain.jp will not be resolved )

2nd address is my original online server with proper DNS settings.

My plesk control panel is showing both this domain &
- Mail service has been enabled for test.domain.jp
- Mail service has been disabled for www.domain.jp


Inside www.domain.jp I have PHP website which uses mail() function.

Im setting the and From: ReplyTo: to support@domain.jp and this is working fine.
But the Return-Path which is set automatically by the server becomes
Return-Path:<annonymous@test.domain.jp>

Mail is sent sucessfully & received in most cases. But some gives the error attached in code.
Because the Domain of sender address annonymous@test.domain.jp does not exist.

How to fix this or atleast change this Return-Path to annonymous@domain.jp
Hi. This is the qmail-send program at test.domain.jp.
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.

<receiving@nifty.com>:
Connected to 201.258.138.10 but sender was rejected.
Remote host said: 553 5.1.8 <anonymous@test.domain.jp>... Unreturnable address rejected

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

Return-Path: <anonymous@test.domain.jp>
Received: (qmail 10186 invoked by uid 23); 3 Sep 2010 11:64:25 +0900
Date: 3 Sep 2010 11:64:25 +0900
To: receiving@nifty.com
Subject: =?UTF-8?B?aXdpbmUuanAg44GU5rOo5paH44GC44KK44GM44Go44GG44GU44GW44GE?=  =?UTF-8?B?44G+44GZ44CA44GK5oyv6L6844G/5L6d6aC8?=

Open in new window

0
Comment
Question by:BToTheAToTheBABA
  • 2
3 Comments
 

Author Comment

by:BToTheAToTheBABA
ID: 33662355
- Mail service has been enabled for test.domain.jp
- Mail service has been disabled for www.domain.jp

If I change this the other way, Mail send stops working completely.
Because my mail server & accounts are managed separately by google.com

So google.com will receive any email sent to support@domain.jp.

0
 
LVL 20

Accepted Solution

by:
Daniel McAllister earned 500 total points
ID: 33685964
The issue is two-fold... but first, let's get some things straight:

- DNS resolves hostnames with A records, and SEPARATELY routes EMAIL with MX records. A domain's DNS service can specify an MX record either as an A record, or with an IP address directly (you're not supposed to have an MX record point to a CNAME DNS entry, as it breaks some mail programs).

So, if InterfaceA is what you call test.domain.jp and it has an IP address of 1.1.1.1 and InterfaceB is what you call www.domain.jp and it has IP address 2.2.2.2. Now, what you've described above is that only the IP address 2.2.2.2 has been "advertised" as the domain.jp server address, but you're trying to make sure that e-mail passes over the 1.1.1.1 interface.

If that is all true, then here are my observations:

1) Receivers from "anonymous@test.domain.jp" cannot reply because there is no DNS entry for the domain test.domain.jp -- you need to either:"
  A) fix your DNS for domain.jp to include a domain of test.domain.jp, or
  B) fix your QMAIL setting so that the defaulthost (and me) values are just domain.jp instead of test.domain.jp, or
  C) fix your call to the mail() function so that you use a non-default (anonymous@hostname) FROM value

NOTE: Some recipients WILL be able to reply because the mail servers CHEAT -- recognizing that the message is a REPLY, it gets the IP address of the server from the replied-to message header instead of DNS's MX record (which, as discussed above, won't work).

2) Some recipients won't accept mail from "anonymous@test.domain.jp" because their SPAM blockers recognize that the domain name isn't valid (there isn't even an A record for test.domain.jp, much less an MX record for it!)

Fortunately, the fixes are the same for both! Once you make the domain that is being SENT in the from field a "real" domain (either by fixing DNS or by fixing your send function), then those SPAM blockers should start letting your messages through.

I hope this helps....

Dan
IT4SOHO
0
 

Author Closing Comment

by:BToTheAToTheBABA
ID: 33869673
>  C) fix your call to the mail() function so that you use a non-default (anonymous@hostname) FROM value


From & ReplyTo were initilized before.

But there is also a attibute called "Return-Path" which i set to same value as "From" value.


I know the difference between From & ReplyTo.

But still I don't know the purpose of "Return-Path".
0

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question