perl sendmail -t adds hostname to To: field!

This is a discussion on perl sendmail -t adds hostname to To: field! within the alt.comp.mail.exim forums, part of the Mail Servers and Related category; Hello, Linux RH9 Exim 4.34 #1 Does anybody know why this is happening? !#/usr/bin/perl open (MAIL, "|...


Go Back   Usenet Forums > Mail Servers and Related > alt.comp.mail.exim

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-14-2004
Chris Fortune
 
Posts: n/a
Default perl sendmail -t adds hostname to To: field!

Hello,
Linux RH9
Exim 4.34 #1

Does anybody know why this is happening?

!#/usr/bin/perl
open (MAIL, "|sendmail -t") or die $!;
print MAIL "To: <joe@blow.com>\n";
print MAIL "blah blah, etc.....

It shows up in the mail queue as

To: joe@blow.com@subdomain.myhostname.com

Thanks in advance.


Reply With Quote
  #2 (permalink)  
Old 08-14-2004
Steve
 
Posts: n/a
Default Re: perl sendmail -t adds hostname to To: field!

On Sat, 14 Aug 2004 08:16:42 +0000, Chris Fortune wrote:

> Hello,
> Linux RH9
> Exim 4.34 #1
>
> Does anybody know why this is happening?
>
> !#/usr/bin/perl
> open (MAIL, "|sendmail -t") or die $!;
> print MAIL "To: <joe@blow.com>\n";
> print MAIL "blah blah, etc.....
>
> It shows up in the mail queue as
>
> To: joe@blow.com@subdomain.myhostname.com
>
> Thanks in advance.


Theres a option line in exim about adding a domain name to unqualified
addresses, you haven't got this turned on have you?

Reply With Quote
  #3 (permalink)  
Old 08-15-2004
Chris Fortune
 
Posts: n/a
Default Re: perl sendmail -t adds hostname to To: field!

> Theres a option line in exim about adding a domain name to unqualified
> addresses, you haven't got this turned on have you?
>


No it is blank and commented out.
# qualify_domain =


What's the preferred way to use perl to send mail with Exim?


Reply With Quote
  #4 (permalink)  
Old 08-15-2004
Wolfgang Meier
 
Posts: n/a
Default Re: perl sendmail -t adds hostname to To: field!

Chris Fortune wrote:
> What's the preferred way to use perl to send mail with Exim?


I use...

open(EXIM, "|exim -bm -i -t -odq") || die "Cannot invoke exim: ".$!;
print EXIM "To: Foo <bar@example.com>\n";
print EXIM "\n";
print EXIM "duh\n";
close(EXIM);

....with

-bm "read message from command line",
-i "ignore single dot, wait for EOF on socket"
-t "get To, CC, BCC from stream"
-odq "queue only, wait for pickup"

Works just perfect. Might be exim doesn't like the missing header/body
seperator char '\n' in your example.

Greets,
Wolf
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:43 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0