Web Hosting Talk







View Full Version : Bounced email & sendmail


alosito
12-12-2002, 01:51 PM
For some reason the email that I send through sendmail and that gets bounced is not forwarded back to me. Below is a script that I use to send email. Does anybody know what might be causing this problem?

#!/usr/bin/perl

$to = "sdgfdgf\@dsfgdaslgf.com";
$from = "my\@email.com";

open(MAIL, "|/usr/sbin/sendmail -t");
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Subject: Test 1\n\n";
print MAIL qq~
Test
~;

close(MAIL);

sasha
12-12-2002, 02:38 PM
try sending an email to yourself and take a look at the Return-path. There might be the answer

alosito
12-12-2002, 02:49 PM
Tried that. Here is the return path:

Return-Path: <my@email.com>

That is the same email address where I want the bounced email be forwarded to.

alosito
12-12-2002, 02:54 PM
Oops, sorry. Actually, the return path is:

Return-Path: <anonymous@server1.control-access5.com>

That email address belongs to my hosting company. So is there any way for me to change it to my email address?

sasha
12-12-2002, 03:39 PM
maybe
open(MAIL, "|/usr/sbin/sendmail -t -fmy\@email.com ");

alosito
12-12-2002, 03:59 PM
Great! It worked. Thank you!