LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-21-2006, 02:52 PM   #1
rush_pl
LQ Newbie
 
Registered: Jul 2003
Posts: 20

Rep: Reputation: 0
Question E-mail FROM domain change -postfix


Switched to a Debian Testing server with Postfix. I used this postfix configuration on a slackware server with no problems before. The problem now is when i send a message from the server, the receiving party displays in the FROM field user@hostname.domain.com instead of the usual user@domain.com. I have the hostname and domain configured in the main.cf file. I am unable to figure out why the server hostname is inserted in the address. Not sure if this is postfix configuration or DNS problem.

Any help is appreciated.

Thanks
 
Old 12-21-2006, 02:56 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Do you have "myorigin" set in main.cf?

Quote:
# The myorigin parameter specifies the domain that locally-posted
# mail appears to come from. The default is to append $myhostname,
# which is fine for small sites. If you run a domain with multiple
# machines, you should (1) change this to $mydomain and (2) set up
# a domain-wide alias database that aliases each user to
# user@that.users.mailhost.
 
Old 12-21-2006, 03:01 PM   #3
rush_pl
LQ Newbie
 
Registered: Jul 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Yes. It is set to myorigin = $mydomain. No matter if it is set to $myhostname or the actual domain.com it still adds the server hostmane to the domain part of the e-mail address.

Last edited by rush_pl; 12-21-2006 at 03:12 PM.
 
Old 12-21-2006, 03:40 PM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
To be honest, I'm not sure if the myorigin works for me as I also use a generic map. This should fix the problem if you want to follow this route, although there must be a simpler explanation and solution.

To /etc/postfix/generic (assuming the path is correct) add

@hostname.domain.com @domain.com

postmap /etc/postfix/generic

and add/uncomment

smtp_generic_maps = hash:/etc/postfix/generic

in main.cf
 
Old 12-22-2006, 07:44 AM   #5
rush_pl
LQ Newbie
 
Registered: Jul 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Did a search for the generic file on the system but no results. I created the file and followed the generic(5) man pages. Basically did what you said billymayday. Tested and works. Thanks For the help.


Last edited by rush_pl; 12-22-2006 at 07:51 AM.
 
Old 12-22-2006, 08:35 AM   #6
kbrede
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Rep: Reputation: 0
IIRC I used to put the name in /etc/mailname on Debian. I haven't had a mail server running on Debian for a while so can't remember for sure, but "man mailname" leads me to believe that's still how it's done.
Kent
 
Old 12-22-2006, 08:41 AM   #7
rush_pl
LQ Newbie
 
Registered: Jul 2003
Posts: 20

Original Poster
Rep: Reputation: 0
had hostname.domainname.com in /etc/mailname. Changing that to just the domain name does the trick. Thanks
 
  


Reply



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
Postfix send mail problem(In RH9, kernal 2.4.20, postfix 2.1.5) minor Linux - General 6 09-23-2019 10:09 PM
Postfix as a mail server for domain LJ151 Linux - Software 3 10-31-2017 04:54 PM
Postfix - how do hosted domains download their mail from my postfix franschoek Linux - Software 1 04-01-2006 09:41 PM
Domain Routing to Postfix from Sendmail = Wrong IP information in Mail Logs! dholingw Linux - Networking 2 05-20-2004 10:06 AM
postfix : sending local mail without domain iainr Linux - Software 2 12-10-2003 03:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:26 PM.

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