LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-30-2012, 07:43 AM   #1
SeSoX
LQ Newbie
 
Registered: Aug 2009
Posts: 18

Rep: Reputation: 0
Postfix Virtual Domains header issue


Hi there,

I got the postfix working for two different domains, lets say dom01.org and example01.org. The problem is that when the server sends a mail, in the headers of that mail there is allways a line like:

Received: by vps.dom01.org

And I don't want that domain to appear when I'm sending e-mails from the example01.org domain.

Some config in postfix main.cf:

myhostname = vps.dom01.org
myorigin = dom01.org
mydestination = dom01.org, vps.dom01.org, localhost.dom01.org, localhost
virtual_alias_domains = dom01.org example01.org

I guess the header is being taken from 'myhostname' variable in the config but if I change it to localhost, then some servers don't allow me to send mail trough them.

Does anybody know how to change this ?
 
Old 05-30-2012, 07:57 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
well you can use header_checks to remove or replace that line, but it sounds like you want it to be conditional on the domain being used for the email? If so I can't see anyway to achieve that. I would generally suggest keeping your machines names separate from the higher level functions of the server corporate vs brand name etc., although I can see plenty of real life scenarios that could match your requirements that mean that doesn't really make much sense.
 
Old 05-30-2012, 08:52 AM   #3
SeSoX
LQ Newbie
 
Registered: Aug 2009
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks for the reply

Yes, I wanted it to be dependant on the mail address being used or being something different to both domains but without having to buy another domain just to do so. I thought there may have been some options similar to apache vhost where you could specify different configuration for each domain.

Removing or changing the line could help a bit but the problem would still be there coz when my server delivers the mail to another server, that server shows the ehlo from my server which is allways 'vps.dom01.org'.

I'm not sure what you mean by 'doesn't make much sense', but I'm just looking for a real virtual domain support where each domain takes care of itself as apache vhost do.

Last edited by SeSoX; 05-30-2012 at 08:54 AM.
 
Old 05-30-2012, 09:04 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
Unless one domain is for porn, and the other for baby supplies, i'd wonder if it really matters TBH. There is a good level of separation in postfix, just not in the area you want. Conceptually that header defines what MACHINE the mail passed through, that doesn't need to relate at all to the domain of the email, and would actually be providing the wrong information if it was changed. In apache I am not able to think of a direct equivalent, maybe there isn't one. Certainly any 404 page IS customized with VHost specific data, but then that data is served to actaul end users, who aren't ever meant to look at the SMTP headers at any stage really.
 
Old 05-30-2012, 09:23 AM   #5
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by acid_kewpie View Post
.....
In apache I am not able to think of a direct equivalent, maybe there isn't one. Certainly any 404 page IS customized with VHost specific data, but then that data is served to actaul end users, who aren't ever meant to look at the SMTP headers at any stage really.
Apache equivalent ?
 
Old 05-30-2012, 09:39 AM   #6
SeSoX
LQ Newbie
 
Registered: Aug 2009
Posts: 18

Original Poster
Rep: Reputation: 0
Well, you say users are not meant to be looking at smtp headers ? (that so funny) probably they are not meant to be using fake email systems, or bug detection tools, or exploits, or many other things available but back on earth if the information is there it can be used.

You don't need to have a pornographic site and other with baby supplies, you could just have a personal webpage and a profesional webpage and you may not want your users from one to know about the other, as simple as that.

And about it providing the wrong information I must say that thanks to the dns server we can end up in the same machine using 200 diferent domain names so that shouldn't be a problem at all. In fact, the other way around is the real problem, coz I get a mail from user@example.com but the mail server claims to be dom01.com. Isn't it weird that the mail comes from dom01.com instead of comming from example.com ?

Anyway, I just wanted to know if it was possible to do that and can't really see the point of arguing about it. I think it should be there, you don't. That's fine by me

Cheers
 
Old 05-30-2012, 09:44 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
Who's arguing?

You certainly have a bizarre sense of humor if things like that are apparently funny. Blimey. Does your mother ever see web server error pages? Probably. Does she ever inspect SMTP headers? I would doubt it somehow. This data is equivalent to the HTTP headers, not webpage content, and there'a all sorts of mess in many HTTP header responses.
 
  


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
[SOLVED] Postfix and virtual domains peterson.julia Linux - Server 1 01-28-2012 09:48 PM
[SOLVED] postfix: virtual mailbox domains hydraMax Linux - Server 1 12-03-2011 12:19 AM
How to configure postfix for virtual domains vargadanis Linux - Server 0 12-23-2006 03:54 PM
Postfix and virtual domains nvargas Linux - Software 6 03-12-2004 02:35 PM
Mailman + postfix virtual domains paulten Linux - Networking 0 01-12-2004 06:39 AM

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

All times are GMT -5. The time now is 05:29 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