LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-18-2010, 04:57 PM   #1
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 553

Rep: Reputation: 116Reputation: 116
sendmail masquerading email from address


Hi,
I have my system set up with sendmail (going through my ISP SMTP server) but when I sent an email using sendmail it was defaulting the from address to user.host.domain or something similar. So I read up about masquerading (http://www.cyberciti.biz/tips/sendma...ion-howto.html) and managed to get it to USERNAME@myisp.com however I want to change USERNAME to a different value because my ISP username is different from my machine username.

My aim is just to get the from address to be xxx@myisp.com. This machine is only used by me so I don't need it to be different for different users if that makes things any easier...?


Thanks
 
Old 07-19-2010, 10:05 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,900

Rep: Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611
Hi,

You can change the sender address from the client you're using.
E.g. for thunderbird go to: Edit->Account Settings.., choose your account and change the email address.
For command line tools, use the "-f" option for sendmail and the "-r" option for mail, nail, mailx

Regards
 
Old 07-19-2010, 12:29 PM   #3
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 553

Original Poster
Rep: Reputation: 116Reputation: 116
Hi,
Yes I use that now but I have some old scripts which use mail and I'd prefer not to have to change them. In any case I think it's cleaner to do it via the sendmail settings.
 
Old 07-19-2010, 01:21 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,900

Rep: Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611
You can use the sendmail genericstable feature:
Code:
USERNAME xxx@myisp.com
You have to rebuild the genericstable database for the changes to take effect:
Code:
makemap hash /etc/mail/genericstable < /etc/mail/genericstable
 
Old 07-24-2010, 08:35 AM   #5
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Rep: Reputation: 69
In the sendmail.cf there will be a line that says the following:
Dj$w.FOO.COM

Change that to
Djdomain.com

This way your emails will be sent as domain@host.com instead of domain@user.host.com.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
authorised email address - Sendmail Server shibu_sp Linux - Newbie 3 05-06-2010 10:22 AM
Creating A Second Email Address For Email Account On Sendmail treedstang Linux - Software 1 04-27-2004 11:31 PM
sendmail email address includes localhost name? kevindv10 Linux - Software 0 04-13-2004 02:22 PM
Sending Email to an SMTP address from sendmail guilmetrp Linux - Newbie 6 03-01-2004 09:51 PM
Sending email to a smtp address through sendmail guilmetrp Linux - General 0 02-27-2004 09:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:10 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration