Reputation: 413
I have a VPS server that only deals with email hosting. This server does not have any designated domain name pointing to it. Its only one VPS with one IP address.
I am running CentOS 6.5 Minimal, 32bit with Postfix and Dovecot installed. This is currently what my etc/postfix/main.cf
looks like (for domain/hosting attributes).
# INTERNET HOST AND DOMAIN NAMES
#
# The myhostname parameter specifies the internet hostname of this
# mail system. The default is to use the fully-qualified domain name
# from gethostname(). $myhostname is used as a default value for many
# other configuration parameters.
#
myhostname =
#myhostname =
# The mydomain parameter specifies the local internet domain name.
# The default is to use $myhostname minus the first component.
# $mydomain is used as a default value for many other configuration
# parameters.
#
mydomain =
# SENDING MAIL
#
# 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
# [email protected].
#
# For the sake of consistency between sender and recipient addresses,
# myorigin also specifies the default domain name that is appended
# to recipient addresses that have no @domain part.
#
#myorigin = $myhostname
myorigin = $mydomain
As you might have noticed, both myhostname
& mydomain
fields are empty. The reason for this is, the server doesn't really have a domain or hostname. What should I be doing in this case?
I have an M
record pointing to mail.my-domain.tld
and MX
record pointing to mail.my-domain.tld
Can I use mail.my-domain.tld
for both as mydomain =
and myhostname =
in main.cf
? Because my-domain.tld
is pointing to another VPS with another IP, which takes care of only web hosting.
Upvotes: 0
Views: 1064
Reputation: 3375
myhostname
- The internet hostname of this mail system. Here use mail.my-domain.tld
mydomain
- The internet domain name of this mail system. The default is to use
$myhostname
minus the first component.$mydomain
is used as a default value for many other configuration parameters. So here use my-domain.tld
This VPS (mail server) can just serve your mail traffic and as you said your my-domain.tld
web hosting can be in a different VPS server.
Hope that helps.
Upvotes: 1