Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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.
.....
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.