Problem with MIME::Lite / Sendmail


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problem with MIME::Lite / Sendmail
# 1  
Old 10-25-2010
Problem with MIME::Lite / Sendmail

Hi all,

i'm using the pearl package MIME::Lite zu send eMails via sendmail. I have the problem, that in the "Received From" part oft the email header occure the user and the hostname of my machine. I'd like to have a name or an email address instead of that:

Code:
Received: from MEINSERVER.MEINEDOMAIN.de (MEINEDOMAIN.de [212.78.165.xx])
     by zieldomain.de (Postfix) with ESMTPS id 6C123A385E
     for <empfaenger@email.de>; Thu, 21 Oct 2010 11:43:21 +0200 (CEST)
...
Received: (from USER@localhost)

Actually i'm not sure if it is a perl problem or a sendmail problem...

Here is an extract of my sendmail.mf:

Sendmail.mf

Code:
LOCAL_DOMAIN(`MEINSERVER.MEINEDOMAIN.de')dnl

perl code

Code:
#!/usr/bin/perl

use strict;
use MIME::Lite; 
use Time::localtime; 
use MIME::Words qw(:all);

use open ':utf8';

my $mailtext="";

mail();
sub mail 
{

        my $sendmail = "/usr/sbin/sendmail -t";
        my $from = "me\@email.de";
        my $reply_to = "me\@email.de";
        my $subject  = "Subject";
        my $mail_message = "content";

        my $msg = MIME::Lite->new
        (
                #Subject => $subject,
                Subject => $subject,
                From    => $from,
                To      => 'receptient@email.de',
                Type    => 'multipart/mixed',
        );

        $mailtext=$mail_message;

        my $part = MIME::Lite->new(
                 Type     => 'TEXT',
                 Data     => $mailtext,
        );


        MIME::Lite->send("sendmail", $sendmail);
        $msg->send;
}
exit;

I hope that somebody can help me. I really don't know much about emails :-)

Thank you very much!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Problem with sendmail

We are using web application which is hosted on Solaris server(Solaris OS 5.10). This application contains some feedback form and contact us form, which should trigger email to our web admin once those are submitted by users. This forms are integrated with mailmerge.cgi utility(perl utility)... (0 Replies)
Discussion started by: paventhan
0 Replies

2. Solaris

Problem with sendmail

We are using web application which is hosted on Solaris server(Solaris OS 5.10). This application contains some feedback form and contact us form, which should trigger email to our web admin once those are submitted by users. This forms are integrated with mailmerge.cgi utility(perl utility)... (0 Replies)
Discussion started by: paventhan
0 Replies

3. Shell Programming and Scripting

Sending Attachment using MIME::Lite and Net::SMTP

Hello, I'm a newbie perl scriptor and i'm trying to figure out why i can't send an email using MIME::Lite with Net::SMTP. I keep receiving the following error: SMTP MAIL command failed: 5.7.1 Helo invalid . at attach1.pl line 31 The error keeps coming from the very last line... (2 Replies)
Discussion started by: xmaverick
2 Replies

4. Shell Programming and Scripting

Problem sending excel attachments with MIME::Lite in perl

I am running a perl script that generates an excel doc and then emails it as an attachment. I can generate the excel file fine. I can scp it from the box and open it with no problems. When I send it over email, the file does open properly. The file in email is only 288 B, but on the server it is... (1 Reply)
Discussion started by: Mike_the_Man
1 Replies

5. Shell Programming and Scripting

ambigouity on using Mime::Lite?

Hi Everyone, I have a question related to using MIME::Lite module in perl.Below i mentioned code blocks used for sending mail through MIME::Lite. $msg = MIME::Lite -> new ( From => $from, To => $to, Subject... (0 Replies)
Discussion started by: DILEEP410
0 Replies

6. Linux

Sendmail problem

I am trying to send mail from my CentOS server. I have made nacessory changes required from sendmail. But it is not working. I am getting following messages in maillog- Dec 17 09:25:12 localhost sendmail: mBH3tCTi016891: fps.company.com did not issue MAIL/EXPN/VRFY/ETRN during... (1 Reply)
Discussion started by: kailas.awchar
1 Replies

7. UNIX for Dummies Questions & Answers

sendmail problem

I have a user who's email comes out looking like this: From name@domain.com Wed Aug 6 15:36:39 2008 Return-Path: <name@domain.com> X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on it2 X-Spam-Level: * X-Spam-Status: No, score=1.5 required=5.0 tests=AWL,BAYES_20,MISSING_SUBJECT,... (1 Reply)
Discussion started by: photon
1 Replies

8. Red Hat

sendmail problem

Hi everyone... i'm trying to send mail with attachment using /usr/sbin/sendmail and from some reason it's not working for me only from one computer. the command i'm using is: cat /etc/fstab | /usr/sbin/sendmail -t RECIPIENT@MAIL.COM am i doing something wrong? p.s. the OS is RedHat. (6 Replies)
Discussion started by: eliraza6
6 Replies

9. HP-UX

sendmail problem with HP-UX

Hello, I'm trying to configure sendmail on a HP-UX 11.0 to send a mail from my server to my mailbox. I have changed the macro DS in sendmail.cf with the name of the smtp server. When I try to send a message it is always put in the queue and never sent. In the log, I get : May 29 15:30:53 smmv6... (2 Replies)
Discussion started by: aribault
2 Replies

10. UNIX for Advanced & Expert Users

Sendmail problem

problem: user 1 sends an email thru exchange to a unix box w/ 2 ip's and hostnames running sendmail. Email is marked sent to one address and deffered to the other. any ideas as to how to get them both marked as sent? actual error below. When email is sent to the 2nd host the email is proccessed... (2 Replies)
Discussion started by: Optimus_P
2 Replies
Login or Register to Ask a Question