Hostname Issues : Linux Gateway
I have a main server(192.168.1.1 + external IP) (running Mandrake 10), this has a static IP, with a registered domain name, running DNS, Apache, etc.
Everything is working fine, mainly, but when I send email from the server they appear as me@whatever.mydomain.com I've recently changed servers (old one running Mandrake 9), the old server worked fine, but i've changed settings on both and can't remember exactly what I've changed on the old server, stupid I know for not keeping backups. I have another Linux box (192.168.1.2), and a Windows machine (192.168.1.3), these 2 machines don't have public IP's. For the sake of this question, let's say I have the following names for my machines... Main Server : myserver.mydomain.com Other Linux Box : oldserver Windows Machine : windowsmachine I need to know what I should have in files such as... /etc/hosts /etc/sysconfig/network and also my sendmail.cf. I've read many HowTo's but can't find anything that answers what I need. Thanks in advance for anyone that can help. Cheers, Rob |
ttt
ttt
|
Quote:
|
I want emails to come from me@mydomain.com, not me@mysubdomain.mydomain.com.
I don't receive mails sent to that address, or to me@mydomain.com, whereas on my old server I did. I'm just after some examples from of what my network config files should look like for my setup. |
could /etc/hosts do the trick?
|
in my /etc/hosts there is a line:
192.168.0.60 scenic.ronsdomain scenic I would guess it should look like this in your case: <external-ip> mydomain.com Hope that helps... Cheers, Ron |
Currently i have...
<my ip> mysub.mydomain.com mysub i'm not sure if that's the problem (wouldn't have thought so), so prob looking into problem with /etc/sysconfig/network Or maybe other config files I've forgotten about. |
I would give it a try... change the your host name to a one without the subdomain, restart sendmail and try... it might work.
|
Quote:
Code:
IP_address canonical_hostname aliases Code:
+-----------+ To verify your systems hostname and domain name are properly configured, type: Code:
[scowles@voyager mail]$ hostname --fqdn Finally, the problem you describe in your post has to do with how sendmail handles a "from" address that is not fully qualified. i.e. From: scowles instead of From: scowles@mydomain.com Sendmail is always going to add the derived FQDN it obtained at startup to any NON-FQDN "from" e-mail address. A NON-FQDN e-mail address usually happens with cronjobs or when using the "mail command. With the above in mind, there are a couple of ways to configure sendmail to NOT add the FQDN to NON-FQDN e-mail addresses. Implement one or the other, not both. 1) Global solution - Enable the sendmail feature "MASQUERADE AS" by... * add the following two lines to your sendmail.mc file. Code:
MASQUERADE_AS(`mydomain.com')dnl Code:
# cd /etc/mail Note: The root account is never masqueraded becuase it should be listed as an "exposed" user (as it should be). So root cronjobs will still have the from address set to root@hostname.mydomain.com, not root@mydomain.com, but all other accounts should now appear as user@mydomain.com when submitted locally. 2) Per user - Enable the sendmail genericstable feature. * add the following two lines to /etc/mail/sendmail.mc. I added them after the "virtusertable" lines. Code:
FEATURE(`genericstable',`hash /etc/mail/genericstable.db')dnl Code:
# cd /etc/mail Code:
# cat /etc/mail/generocs-domains Code:
# cd /etc/mail |
All times are GMT -5. The time now is 10:04 AM. |