Issues on email delivery


 
Thread Tools Search this Thread
Operating Systems AIX Issues on email delivery
# 1  
Old 10-02-2009
Issues on email delivery

Hello, there is a problem when using sendmail to certain destinations, basically the recipient will reject the incoming message because the user@local.domain.com is used as the sender (Return-Path), they would verify local.domain.com is not a valid DNS record which is true because it is a local machine.

However the "From:" field in the custom header contains a valid address and host in DNS, let's say popeye@spinach.com.

Why does sendmail use @local.domain.com instead of using @spinach.com? I have a feeling this is solely down to the Return-Path because when I used the command "sendmail -t < header.txt -f popeye@spinach.com" it was received fine but that is abit of a hack fix.

I then tried setting "Return-Path: popeye@spinach.com" in the custom header.txt but it seemed to be keep overriding to user@local.domain.com again. So I proceeded to the look inside sendmail.cf, changed the Return-Path setting:
From:-
Code:
H?P?Return-Path: <$g>

To:-
Code:
H?P?Return-Path: <$f>

Refreshed sendmail, and triggered another message... however this made no difference it seems.

The recipient receives this message in the logs when rejecting:
Quote:
Oct 2 11:20:15 mail0 postfix/smtpd[14382]: NOQUEUE: reject: RCPT from
unknown[123.234.345.45]: 450 4.1.8 <user@local.domain.com
<mailto:user@local.ourdomain.com>>: Sender address rejected: Domain not found; from=<user@local.ourdomain.com <mailto:user@local.ourdomain.com>>
to=<user.name@recipientdomain.com
<mailto:user.name@recipientdomain.com>> proto=ESMTP helo=<gateway01.domain.com>
Here is what we get in our logs, I highlighted the important part:
Quote:
Received Time: 30 Sep 2009 08:51:41 (GMT -0400)
MID: 44444444
Message Size: 3150 (Byte)
Subject: TEST EMAIL
Envelope Sender: user@local.ourdomain.com
Envelope Recipients: user.name@recipientdomain.com
Message ID Header: <200909301234.asdf1234567@local.ourdomain.com>
IronPort Host: GATEWAY01 (123.123.123.123)
SMTP Auth User ID: N/A
Sending Host Summary
Reverse DNS Hostname: None (unverified)
IP Address: 123.123.123.123
SBRS Score: not enabled
Processing Details
MAIL POLICY "Corporate Email" MATCHED THESE RECIPIENTS: user.name@recipientdomain.com
30 Sep 2009 08:51:41 (GMT -0400) Protocol SMTP interface OutboundInterface (IP 123.123.123.123) on incoming connection (ICID 123321123) from sender IP 123.123.123.123. Reverse DNS host None verified 0.
30 Sep 2009 08:51:41 (GMT -0400) (ICID 123321123) RELAY sender group RELAYLIST match 123.123.123/24 SBRS not enabled
30 Sep 2009 08:51:41 (GMT -0400) Start message 44444444 on incoming connection (ICID 123321123).
30 Sep 2009 08:51:41 (GMT -0400) Message 44444444 enqueued on incoming connection (ICID 123321123) from user@local.ourdomain.com.
30 Sep 2009 08:51:41 (GMT -0400) Message 44444444 on incoming connection (ICID 123321123) added recipient (user.name@recipientdomain.com).
30 Sep 2009 08:51:41 (GMT -0400) Message 44444444 contains message ID header '<200909301251.n8UCpfZV1003650@local.ourdomain.com>'.
30 Sep 2009 08:51:41 (GMT -0400) Message 44444444 original subject on injection: TEST EMAIL
30 Sep 2009 08:51:41 (GMT -0400) Message 44444444 (3150 bytes) from user@local.ourdomain.com ready.
30 Sep 2009 08:51:41 (GMT -0400) Message 44444444 matched per-recipient policy Corporate Email for outbound mail policies.
30 Sep 2009 08:51:41 (GMT -0400) Message 44444444 scanned by Anti-Virus engine Sophos. Interim verdict: CLEAN
30 Sep 2009 08:51:41 (GMT -0400) Message 44444444 scanned by Anti-Virus engine. Final verdict: Negative
30 Sep 2009 08:51:41 (GMT -0400) Message 44444444 queued for delivery.
30 Sep 2009 08:51:42 (GMT -0400) SMTP delivery connection (DCID 55555555) opened from IronPort interface 147.179.184.137 to IP address 204.248.176.91 on port 25.
30 Sep 2009 08:51:42 (GMT -0400) (DCID 55555555) Delivery started for message 44444444 to user.name@recipientdomain.com.
30 Sep 2009 08:51:42 (GMT -0400) (DCID 55555555) Message 44444444 to user.name@recipientdomain.com delayed. Reason: 4.1.0 - Unknown address error ('450', ['<user@local.ourdomain.com>: Sender address rejected: Domain not found']) [('from', 'popeye@spinach.com')]
30 Sep 2009 08:51:42 (GMT -0400) Message 44444444 to user.name@recipientdomain.com pending until Wed Sep 30 08:52:42 2009 as per bounce profile Default.
30 Sep 2009 08:52:43 (GMT -0400) SMTP delivery connection (DCID 77777777) opened from IronPort interface 147.179.184.137 to IP address 204.248.176.91 on port 25.
30 Sep 2009 08:52:43 (GMT -0400) (DCID 77777777) Delivery started for message 44444444 to user.name@recipientdomain.com.
30 Sep 2009 08:52:43 (GMT -0400) (DCID 77777777) Message 44444444 to user.name@recipientdomain.com delayed. Reason: 4.1.0 - Unknown address error ('450', ['<user@local.ourdomain.com>: Sender address rejected: Domain not found']) [('from', 'popeye@spinach.com')]
30 Sep 2009 08:52:43 (GMT -0400) Message 44444444 to user.name@recipientdomain.com pending until Wed Sep 30 08:54:47 2009 as per bounce profile Default.
30 Sep 2009 08:54:50 (GMT -0400) (DCID 53198980) Delivery started for message 44444444 to user.name@recipientdomain.com.
30 Sep 2009 08:54:50 (GMT -0400) (DCID 53198980) Message 44444444 to user.name@recipientdomain.com delayed. Reason: 4.1.0 - Unknown address error ('450', ['4.1.8 <user@local.ourdomain.com>: Sender address rejected: Domain not found']) [('from', 'popeye@spinach.com')]
30 Sep 2009 08:54:50 (GMT -0400) Message 44444444 to user.name@recipientdomain.com pending until Wed Sep 30 09:01:08 2009 as per bounce profile Default.
Thanks for any help you can provide.
# 2  
Old 10-05-2009
Additionally, adding the server address to public DNS is not going to happen for security reasons.

The answer is having sendmail deliver the message with the sender as @spinnach.com (perferably the same as the From: ), instead of the machine address user@local.
# 3  
Old 10-05-2009
if postfix is an option for you, I wrote this tutorial:
http://tech.gate.io/blogpost34


your problem is the "from" field

if you want, I have a sendmail solution too which I can post tomorrow
this one has the advantage, that "from" field is rewritten to

Code:
From: hostname <username@domainyoulike.com>


for AIX, you have to run "newaliases" after postfix the installation, then it'll work fine

Last edited by funksen; 10-05-2009 at 03:29 PM..
# 4  
Old 10-05-2009
Quote:
Originally Posted by funksen
if postfix is an option for you, I wrote this tutorial:
tech.gate.io : Postfix sender address rewriting, changing mails "from" field in header on relay server


your problem is the "from" field

if you want, I have a sendmail solution too which I can post tomorrow
this one has the advantage, that "from" field is rewritten to

Code:
From: hostname <username@domainyoulike.com>

for AIX, you have to run "newaliases" after postfix the installation, then it'll work fine
I'm not sure that the problem is the "From:" field because it is showing the correct address? I don't think I would be allowed to install postfix....
# 5  
Old 10-05-2009
shoudn't it be

from=<user@ourdomain.com
instead of
from=<user@local.ourdomain.com
?
# 6  
Old 10-05-2009
Quote:
Originally Posted by funksen
shoudn't it be

from=<user@ourdomain.com
instead of
from=<user@local.ourdomain.com
?
Yeah... now I'm confused because it shows the correct From: address when it is sent to me (I'm CCing myself).

The sendmail.cf is showing $g's, perhaps changing the $g to $f might help... or maybe I'm going into the totally wrong direction.
H?F?From: $?x$x <$g>$|$g$.
# 7  
Old 10-06-2009
in the mc file:
Code:
FEATURE(masquerade_entire_domain)
FEATURE(masquerade_envelope)
MASQUERADE_AS(`external.domain')
MASQUERADE_DOMAIN(`hostname.domain.local')

in the sendmail.cf file, comment

#CL root
#C{E}root

so that the masquerading works for root too
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Qmail mail delivery problem

Dear Concern, As per below article, we have configured qmail in our system. THE LINUX STUFF: qmail Installation Steps on Linux But when we try to send any mail in own domain, got below error message. Please advise. Apr 17 17:01:20 BLAUDITSCPTEST sendmail: alias database /etc/aliases... (0 Replies)
Discussion started by: makauser
0 Replies

2. Shell Programming and Scripting

Email Format Output issues

Hi Guys, I have written a script, which output information from email notfication. The output works fine in HTML format, but non-html format it is not shown in a human readable format. Can you help with the format *** Script echo " Server Name : $CLIENT_CHECK "... (4 Replies)
Discussion started by: Junes
4 Replies

3. IP Networking

DNS config preventing mail delivery

Hi Please can you help on this: the Net Admins decided to use DNS to resolve names, so this is preventing mail being delivered when using commands like date | mailx -s "test" abc.xyz@asdf.xx.yy. What we were asked was to edit /etc/resolv.confand add 3 entries, in all servers (10 Replies)
Discussion started by: fretagi
10 Replies

4. Shell Programming and Scripting

Smtp dual delivery script

Hello Peoples, I have a problem wrapping my head around a script that I modified, essentially it uses the postfix smtp line in master.cf to send out a message to two or more email servers, It is a nice way to test different email servers and platforms. Problem with the original script is that it... (0 Replies)
Discussion started by: SeSe
0 Replies

5. Programming

TCP/IP, how to verify delivery?

When I successfully write data to a TCP/IP socket, as I understand it, I am only guaranteed the data gets to the TCP/IP stack's buffer. However, a successful write doesn't guarantee that the data actually gets to the recipient. Since data can linger in the TCP/IP stack's buffer "indefinately," it... (7 Replies)
Discussion started by: DreamWarrior
7 Replies

6. Shell Programming and Scripting

Finding a file delivery time and sending it as an email

Hello, i have a requirement where i need to create a script which would check for a file name called XX_YYYY_ZZ in the directory inbound and as soon as the file is delivered in this directory a email needs to be sent to a user abc@yahoo.com The plan is to put script in the core process to run... (8 Replies)
Discussion started by: rajasinn
8 Replies

7. UNIX for Dummies Questions & Answers

Mail delivery confirmation

If I am sending mail with this command: mail .......@whatever.com < filename, is it possible to get delivery confirmation? Thanks (3 Replies)
Discussion started by: CSGUY
3 Replies
Login or Register to Ask a Question