LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-27-2011, 02:04 AM   #1
golden_boy615
Member
 
Registered: Dec 2008
Distribution: Ubuntu Fedora
Posts: 445

Rep: Reputation: 18
how to set sender information in ssmtp mail client


hello
I am using ssmtp as mail client with this configuration:
Quote:
DEBUG=YES
root=mymail@server.com
mailhub=smtp.server.com:587
AuthUser=mymail@server.com
AuthPass=Pass
and this command:
Quote:
ssmtp myemailingmail@gmail.com < ssmtptest.txt
which is ssmtptest.txt is:
Quote:
[root@localhost ~]# cat ssmtptest.txt
From: mymail@server.com
To: myemailingmail@gmail.com
Subject: test email

test text
fortunately I receive it in my Inbox correctly BUT with wrong sender "FROM:" information as you can see:

Quote:
from root <root@localhost.localdomain>
to myemailingmail@gmail.com
date Mon, Mar 28, 2011 at 11:08 AM
subject test email


test text
what should I do to receive email as I wrote in ssmtptest.txt file with all correct header?
 
Old 03-27-2011, 07:56 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
This might answer your question. The pertinent code is
Code:
# The address where the mail appears to come from for user authentification.
rewriteDomain=gmail.com
 
Old 03-28-2011, 03:08 AM   #3
golden_boy615
Member
 
Registered: Dec 2008
Distribution: Ubuntu Fedora
Posts: 445

Original Poster
Rep: Reputation: 18
unfortunately when I add "rewriteDomain=server.com" in my ssmtp.conf file it retunes :
Quote:
RCPT TO:<myemailingmail@gmail.com> (451 Temporary local problem - please try later)
but when I added this in file it worked:
Quote:
FromLineOverride=yes
rewriteDomain=server.com
and I found that if I put complete sender email address in ssmtptest.txt that I pass to ssmtp command file with "FromLineOverride=yes" in ssmtp.conf file and delete "rewriteDomain=server.com" from config file it works fine too as follows:
Quote:
[root@localhost ~]# cat /etc/ssmtp/ssmtp.conf
DEBUG=YES
mailhub=smtp.server.com:587
AuthUser=mymail@server.com
AuthPass=Pass
FromLineOverride=yes



[root@localhost ~]# cat ssmtptest.txt
From: mymail@server.com
To: myemailingmail@gmail.com
Subject: test email

test text
thank you for your answer that guide me trough complete answer.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set up the client mail for launchmail hemiao00 Linux - Software 0 08-13-2010 04:16 AM
how to set thunderbird mail client biplabbijay SUSE / openSUSE 1 11-23-2009 08:41 AM
Trying to set up E-Mail sender Libra RHR Linux - Software 2 09-07-2008 03:52 PM
Set sender address with /bin/mail philosophia Programming 1 02-06-2008 09:59 PM
Set proxy in evolution mail client for gmail phamtranquocvie Linux - Software 8 06-13-2005 02:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration