Postfix address rewriting...

Howdy yall,
I hope this is the proper forum for this question, admin please move as needed!

My hosting box: CentOS 4.6(updated), Webmin, V-min(GPL).
I host 3 very simple websites and supply DNS/Bind for 1 additional site(hosted on another box).
I was very pleased to see that Jamie and/or Joe decided to add the SpamAssasin plugin for the GPL users, thank you.
After activating the plugin I reaslised that sending mail from one of my virtual domains showed the hostname of the box.
(I don’t believe there is a connection here, only the timing from my tests of the plugin)

So…this is my question. Is it by design that mail coming from one of my <virtualdomains.com> is sent from <servername.hostingbox.net>?
If mail is sent to myuser@virtualdomain.com which is hosted on my servername.hostingbox.net, the reply or sent mails appear to come from servername.hostingbox.net. I was expecting it to show either mail.virtualdomain.com or virtualdomain.com?

I have looked at Postfix settings and cannot seem to grasp what I am missing to get the outgoing mail to appear to be coming from the recieving virtualdomain. Other than this small "glitch", mail is being sent and recieved properly.
Any thoughts or help is greatly appreciated.
Thanks,
Joe

So...this is my question. Is it by design that mail coming from one of my <virtualdomains.com> is sent from <servername.hostingbox.net>?

It’s by law. :wink:

Postfix calls itself by the name of the server it runs on. Always. This is the only sane way to do it, because a large number of recipients base their trust on reputation. If your sending name changed for every message they would have to be suspicious. The idea is that your server sends out messages using it’s One True Name.

Add in reverse resolution, SPF and/or DKIM, and respect for RFCs, and you have a recipe for always getting your messages through. Start screwing around with how your server looks, and the big guys aren’t going to want any truck with your mail.

If mail is sent to myuser@virtualdomain.com which is hosted on my servername.hostingbox.net, the reply or sent mails appear to come from servername.hostingbox.net. I was expecting it to show either mail.virtualdomain.com or virtualdomain.com?

Oh, wait…You’re talking about the From: field or the Received-From: field? Now I’m confused. :wink:

If the From field is wrong, this would be a client issue. You haven’t told us what webmail client you’re using to get this result. Configuring Usermin to use the right address is documented here:

http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,email_troubleshooting/#usermin_webmail_sends_with_incorrect_fromaddress

Hi Joe,
thanks for the help.

Postfix calls itself by the name of the server it run...The idea is that your server sends out messages using it's One True Name.

Yes, of course. I seem to have mixed 2 different issue. The "True Name" of the server is correct, my example(logic error) was flawed.

But…

Oh, wait...You're talking about the From: field or the Received-From: field? Now I'm confused. ;-)
Yes, that is the real issue here! (Sure glad you knew what the hell I was trying to say, LOL)

I will follow up on the link you posted tomorrow.
Thanks,
Joe

Hello again,
To close this issue.
The link Joe(Virtualmin) pointed out in this thread solved the problem.
The setting was configuable within the Usermin module.
Thanks,
Joe