LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
Search this Thread
Old 07-29-2009, 05:53 PM   #1
speederpro
LQ Newbie
 
Registered: May 2003
Posts: 8

Rep: Reputation: 0
configure sendmail to send using mydomain.com


Hello all,

I want to configure sendmail to send mail as username@mydomain.com on my new freebsd.

When I send an email from command line, the recipient receive the email from username@host.mydomain.com instead of username@mydomain.com

What do I need to change to make the "from" appear as username@mydomain.com?

Thanks in advance.
 
Old 07-31-2009, 04:13 PM   #2
speederpro
LQ Newbie
 
Registered: May 2003
Posts: 8

Original Poster
Rep: Reputation: 0
Yeah, I found the solution.

For those who are looking for the same solution as me.

# cd /etc/mail
# make
# vi host.mydomain.com.mc

Change From: DOMAIN(generic)

Change To: DOMAIN(`mydomain.com')dnl

# cd /usr/share/sendmail/cf/domain
# cp generic.m4 mydomain.com.m4
# vi mydomain.com.m4
# echo "FEATURE(`masquerade_entire_domain')dnl" >> mydomain.com.m4
# echo "FEATURE(`masquerade_envelope')dnl" >> mydomain.com.m4
# cd ../feature
# echo "MASQUERADE_AS(`westsideweekly.com')dnl" >> masquerade_entire_domain.m4
# cd /etc/mail
# make
# make install
# make restart

Voila. You are done. Any mail sent via command line will appear as from username@mydomain.com.

cheers,

Last edited by speederpro; 07-31-2009 at 04:14 PM.
 
  


Reply

Tags
sendmail


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
Configure sendmail to send email out through my ISP rwcooper Linux - Software 5 06-16-2009 06:28 PM
Configure sendmail to send email out through my ISP rwcooper Linux - Software 0 06-16-2009 02:12 PM
how to configure sendmail to just send emails. no recieving. another 1 Linux - Server 9 04-03-2009 10:31 AM
How do I configure sendmail to accept/send mail from outside our network? russmitch Linux - Server 3 12-09-2008 01:11 PM
how do I configure sendmail to be able to send mail outside my network dkscomps Linux - Networking 9 07-04-2004 03:41 PM


All times are GMT -5. The time now is 09:13 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration