Mail server without MX record.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
45 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Mail server without MX record.

Jason Long
Hello,
Can I use Postfix without MX record? I installed Postfix and Dovecot via "https://wiki.centos.org/HowTos/postfix" tutorial and I want to know can I use it without MX record?

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

A. Schulze


Am 13.10.20 um 14:09 schrieb Jason Long:
> I want to know can I use it without MX record?
A records are used by default if no MX is available
That's nothing postfix specific - it's an RFC requirement for any MTA

Andreas
Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

Richard-2
In reply to this post by Jason Long


> Date: Tuesday, October 13, 2020 12:09:28 +0000
> From: Jason Long <[hidden email]>
>
> Hello,
> Can I use Postfix without MX record? I installed Postfix
> and Dovecot via "https://wiki.centos.org/HowTos/postfix" tutorial
> and I want to know can I use it without MX record?

Yes. Some mail sites, incorrectly, think that one has to have an
MX-record for a site to be legit, but major ones know better. An
MX-record is related to inbound routing/deliverability, and not
specific to the MTA one is using.

You do need an A-, and for successful outbound deliverability, a
matching Rdns record. As noted in an earlier message chain, there is
a list of other things, e.g., SPF, DKIM, DMARC records, etc., that
will help in deliverability.

By the way, the documentation that you pointed to specifies that it
is written for Centos-5. As Centos-6 is EOL next month, C5 and
earlier are already EOL. So you should be using at least Centos-7,
and relevant documentation. Something in one of your messages
yesterday indicated that you were likely using Centos-6 or earlier.


Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

Wietse Venema
In reply to this post by Jason Long
Jason Long:
> Hello,
> Can I use Postfix without MX record? I installed Postfix and?Dovecot
> via "https://wiki.centos.org/HowTos/postfix" tutorial and I want
> to know can I use it without MX record?

The SMTP standard (RFC 2821) does not *require* MX records. Some
uninformed mail operators may require one, but those are rare.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

Bill Cole-3
In reply to this post by Jason Long
On 13 Oct 2020, at 8:09, Jason Long wrote:

> Hello,
> Can I use Postfix without MX record? I installed Postfix and Dovecot
> via "https://wiki.centos.org/HowTos/postfix" tutorial and I want to
> know can I use it without MX record?

That is entirely dependent on what you intend to use Postfix for.

If you have a domain name for which you want to receive mail directly
from the world at large, it must have either an A record that resolves
to the address of your Postfix server or a MX record that points to a
name that has an A record that resolves to the address of your Postfix
server.


--
Bill Cole
[hidden email] or [hidden email]
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire
Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

Jason Long
In reply to this post by Wietse Venema
Thank you for all of your messages.
With that tutorial, which record or port is needed? 






On Tuesday, October 13, 2020, 04:31:34 PM GMT+3:30, Wietse Venema <[hidden email]> wrote:





Jason Long:

> Hello,
> Can I use Postfix without MX record? I installed Postfix and?Dovecot
> via "https://wiki.centos.org/HowTos/postfix" tutorial and I want
> to know can I use it without MX record?


The SMTP standard (RFC 2821) does not *require* MX records. Some
uninformed mail operators may require one, but those are rare.

    Wietse

Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

ilyak
What are you trying to achieve?

There are alot of scenarios where Postfix may be used:
* "Send only" email server for your website (to give your website ability to send emails). You never receive any emails from the outside.
* Forward only: it just accepts mails from your apps, and sends them via smart host (SMTP server of your provider). Some people run it on their laptops)
* Email hosting: users send and receive emails with your Postfix (as they do with Gmail, for example)
etc

It is important to choose a scenario, because if you only need to send emails from your website, then you do not need dovecot nor MX record and you even do not need to listen for incoming connections to the public port, but you may need DKIM and SPF.

In the "forward only via smart host" scenario you need almost nothing: no MX, no SPF/DKIM, no public port.
If you want to receive emails, then having an MX record is a good idea. 
You would also need to listen public port for incoming connections, and may be one more port for clients (465 or 587)






On Tue, Oct 13, 2020 at 5:19 PM Jason Long <[hidden email]> wrote:
Thank you for all of your messages.
With that tutorial, which record or port is needed? 






On Tuesday, October 13, 2020, 04:31:34 PM GMT+3:30, Wietse Venema <[hidden email]> wrote:





Jason Long:

> Hello,
> Can I use Postfix without MX record? I installed Postfix and?Dovecot
> via "https://wiki.centos.org/HowTos/postfix" tutorial and I want
> to know can I use it without MX record?


The SMTP standard (RFC 2821) does not *require* MX records. Some
uninformed mail operators may require one, but those are rare.

    Wietse

Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

Jason Long
I have an Internet domain name and a Linux server and I want to have an email server for send and receive emails. For example, if my domain is "example.net" then I want to have a "[hidden email]" address for send and receive emails from the Internet.








On Tuesday, October 13, 2020, 06:09:06 PM GMT+3:30, IL Ka <[hidden email]> wrote:





What are you trying to achieve?

There are alot of scenarios where Postfix may be used:
* "Send only" email server for your website (to give your website ability to send emails). You never receive any emails from the outside.
* Forward only: it just accepts mails from your apps, and sends them via smart host (SMTP server of your provider). Some people run it on their laptops)
* Email hosting: users send and receive emails with your Postfix (as they do with Gmail, for example)
etc

It is important to choose a scenario, because if you only need to send emails from your website, then you do not need dovecot nor MX record and you even do not need to listen for incoming connections to the public port, but you may need DKIM and SPF.

In the "forward only via smart host" scenario you need almost nothing: no MX, no SPF/DKIM, no public port.
If you want to receive emails, then having an MX record is a good idea. 
You would also need to listen public port for incoming connections, and may be one more port for clients (465 or 587)






On Tue, Oct 13, 2020 at 5:19 PM Jason Long <[hidden email]> wrote:

> Thank you for all of your messages.
> With that tutorial, which record or port is needed? 
>
>
>
>
>
>
> On Tuesday, October 13, 2020, 04:31:34 PM GMT+3:30, Wietse Venema <[hidden email]> wrote:
>
>
>
>
>
> Jason Long:
>
>> Hello,
>> Can I use Postfix without MX record? I installed Postfix and?Dovecot
>> via "https://wiki.centos.org/HowTos/postfix" tutorial and I want
>> to know can I use it without MX record?
>
>
> The SMTP standard (RFC 2821) does not *require* MX records. Some
> uninformed mail operators may require one, but those are rare.
>
>     Wietse
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

Bernardo Reino
On Tue, 13 Oct 2020, Jason Long wrote:

> I have an Internet domain name and a Linux server and I want to have an
> email server for send and receive emails. For example, if my domain is
> "example.net" then I want to have a "[hidden email]" address for send
> and receive emails from the Internet.

But then why no MX record?

It's absolutely common, normal and expected to have an MX record so that
other MTAs know where you actually want to have your mail delivered.

I'd advise you to first read about postfix (i.e. the manual), rather than
some random outdated tutorials (do you use the same nickname at the Debian
forum? :)

Cheers.

> On Tuesday, October 13, 2020, 06:09:06 PM GMT+3:30, IL Ka <[hidden email]> wrote:
>
>
>
>
>
> What are you trying to achieve?
>
> There are alot of scenarios where Postfix may be used:
> * "Send only" email server for your website (to give your website ability to send emails). You never receive any emails from the outside.
> * Forward only: it just accepts mails from your apps, and sends them via smart host (SMTP server of your provider). Some people run it on their laptops)
> * Email hosting: users send and receive emails with your Postfix (as they do with Gmail, for example)
> etc
>
> It is important to choose a scenario, because if you only need to send emails from your website, then you do not need dovecot nor MX record and you even do not need to listen for incoming connections to the public port, but you may need DKIM and SPF.
>
> In the "forward only via smart host" scenario you need almost nothing: no MX, no SPF/DKIM, no public port.
> If you want to receive emails, then having an MX record is a good idea. 
> You would also need to listen public port for incoming connections, and may be one more port for clients (465 or 587)
>
>
>
>
>
>
> On Tue, Oct 13, 2020 at 5:19 PM Jason Long <[hidden email]> wrote:
>> Thank you for all of your messages.
>> With that tutorial, which record or port is needed? 
>>
>>
>>
>>
>>
>>
>> On Tuesday, October 13, 2020, 04:31:34 PM GMT+3:30, Wietse Venema <[hidden email]> wrote:
>>
>>
>>
>>
>>
>> Jason Long:
>>
>>> Hello,
>>> Can I use Postfix without MX record? I installed Postfix and?Dovecot
>>> via "https://wiki.centos.org/HowTos/postfix" tutorial and I want
>>> to know can I use it without MX record?
>>
>>
>> The SMTP standard (RFC 2821) does not *require* MX records. Some
>> uninformed mail operators may require one, but those are rare.
>>
>>     Wietse
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

@lbutlr
On 13 Oct 2020, at 09:45, Bernardo Reino <[hidden email]> wrote:
> On Tue, 13 Oct 2020, Jason Long wrote:
>
>> I have an Internet domain name and a Linux server and I want to have an email server for send and receive emails. For example, if my domain is "example.net" then I want to have a "[hidden email]" address for send and receive emails from the Internet.
>
> But then why no MX record?
>
> It's absolutely common, normal and expected to have an MX record so that other MTAs know where you actually want to have your mail delivered.

It is also somewhat suspicious to have a mail server without an MX record. Sure, it’s ALLOWED, but it’s still weird.

--
99 percent of police give the rest a bad name.
Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

Jason Long
I can't have MX record because the DNS server have another MX record for other mail server.
I'm thankful if anyone tell me how can I solve my problem without MX record. Is t possible with A record?






On Tuesday, October 13, 2020, 07:19:56 PM GMT+3:30, @lbutlr <[hidden email]> wrote:





On 13 Oct 2020, at 09:45, Bernardo Reino <[hidden email]> wrote:

> On Tue, 13 Oct 2020, Jason Long wrote:
>
>> I have an Internet domain name and a Linux server and I want to have an email server for send and receive emails. For example, if my domain is "example.net" then I want to have a "[hidden email]" address for send and receive emails from the Internet.
>
> But then why no MX record?
>
> It's absolutely common, normal and expected to have an MX record so that other MTAs know where you actually want to have your mail delivered.


It is also somewhat suspicious to have a mail server without an MX record. Sure, it’s ALLOWED, but it’s still weird.

--
99 percent of police give the rest a bad name.
Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

ilyak
> DNS server have another MX record for other mail server.
Then all mail to your domain will go to that mail server. No way to change it. This is how SMTP works:


If one or more MX RRs are found for a given name, SMTP systems MUST NOT utilize any A RRs

https://tools.ietf.org/html/rfc2821#section-5


You need to contact the DNS administrator. You would need DNS anyway, because serious MTAs need SPF and DKIM: both are DNS records.


On Tue, Oct 13, 2020 at 6:53 PM Jason Long <[hidden email]> wrote:
I can't have MX record because the DNS server have another MX record for other mail server.
I'm thankful if anyone tell me how can I solve my problem without MX record. Is t possible with A record?






On Tuesday, October 13, 2020, 07:19:56 PM GMT+3:30, @lbutlr <[hidden email]> wrote:





On 13 Oct 2020, at 09:45, Bernardo Reino <[hidden email]> wrote:

> On Tue, 13 Oct 2020, Jason Long wrote:
>
>> I have an Internet domain name and a Linux server and I want to have an email server for send and receive emails. For example, if my domain is "example.net" then I want to have a "[hidden email]" address for send and receive emails from the Internet.
>
> But then why no MX record?
>
> It's absolutely common, normal and expected to have an MX record so that other MTAs know where you actually want to have your mail delivered.


It is also somewhat suspicious to have a mail server without an MX record. Sure, it’s ALLOWED, but it’s still weird.

--
99 percent of police give the rest a bad name.
Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

Ron Wheeler
In reply to this post by Jason Long
You want an MX record.
Why would you not want an MX record? What is the downside?


Where is your dns?



On 2020-10-13 11:04 a.m., Jason Long wrote:
I have an Internet domain name and a Linux server and I want to have an email server for send and receive emails. For example, if my domain is "example.net" then I want to have a [hidden email] address for send and receive emails from the Internet.








On Tuesday, October 13, 2020, 06:09:06 PM GMT+3:30, IL Ka [hidden email] wrote: 





What are you trying to achieve?

There are alot of scenarios where Postfix may be used:
* "Send only" email server for your website (to give your website ability to send emails). You never receive any emails from the outside.
* Forward only: it just accepts mails from your apps, and sends them via smart host (SMTP server of your provider). Some people run it on their laptops)
* Email hosting: users send and receive emails with your Postfix (as they do with Gmail, for example)
etc

It is important to choose a scenario, because if you only need to send emails from your website, then you do not need dovecot nor MX record and you even do not need to listen for incoming connections to the public port, but you may need DKIM and SPF.

In the "forward only via smart host" scenario you need almost nothing: no MX, no SPF/DKIM, no public port.
If you want to receive emails, then having an MX record is a good idea. 
You would also need to listen public port for incoming connections, and may be one more port for clients (465 or 587)






On Tue, Oct 13, 2020 at 5:19 PM Jason Long [hidden email] wrote:
Thank you for all of your messages.
With that tutorial, which record or port is needed? 






On Tuesday, October 13, 2020, 04:31:34 PM GMT+3:30, Wietse Venema [hidden email] wrote: 





Jason Long:

Hello,
Can I use Postfix without MX record? I installed Postfix and?Dovecot
via "https://wiki.centos.org/HowTos/postfix" tutorial and I want
to know can I use it without MX record?

The SMTP standard (RFC 2821) does not *require* MX records. Some
uninformed mail operators may require one, but those are rare.

    Wietse



-- 
Ron Wheeler
Artifact Software
438-345-3369
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

Richard-2
In reply to this post by Jason Long


> Date: Tuesday, October 13, 2020 15:52:41 +0000
> From: Jason Long <[hidden email]>
>
> I can't have MX record because the DNS server have another MX
> record for other mail server. I'm thankful if anyone tell me how
> can I solve my problem without MX record. Is t possible with A
> record?

Either you misstated the issue or someone has a poor understanding of
DNS.

You might want to step back and get a more complete understanding of
the workings of mail and DNS. Without that, simply following
"cookbooks" will likely not get you where you want to be.

[by the way, while I don't think that this list is hardcore on
posting order, most technical lists frown on top posting.]

Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

Chris Green-11
On Tue, Oct 13, 2020 at 04:42:31PM +0000, Richard wrote:

>
>
> > Date: Tuesday, October 13, 2020 15:52:41 +0000
> > From: Jason Long <[hidden email]>
> >
> > I can't have MX record because the DNS server have another MX
> > record for other mail server. I'm thankful if anyone tell me how
> > can I solve my problem without MX record. Is t possible with A
> > record?
>
> Either you misstated the issue or someone has a poor understanding of
> DNS.
>
> You might want to step back and get a more complete understanding of
> the workings of mail and DNS. Without that, simply following
> "cookbooks" will likely not get you where you want to be.
>
I think it *may* be that the OP doesn't realise he can/should change
the MX record.  If you have a domain hosted at your average hosting
service the A record gets to point at whatever you need (home system,
virtual host, whatever) but the MX record is left pointing at the
hosting company's mail servers.  It's quite a rarity in the general
run of things that the MX record gets changed.


--
Chris Green
Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

Fred Morris
In reply to this post by ilyak
Notwithstanding, any "fully qualified domain name" (FQDN) can have email
sent to it; typically only the FQDN immediately below the zone cut, and
also the subject of SOA and NS records, has MX records.

But any other FQDN in the zone which has an A record should be
deliverable, if it's routable and accepting traffic from the source. If
you have joe.example.com (undelegated) and it has an A or AAAA record and
traffic from the sender can be routed to it nothing in mail or DNS
prevents delivery to it, although senders may choose not to send to it
based on local policy considerations.

On Tue, 13 Oct 2020, IL Ka wrote:

> Date: Tue, 13 Oct 2020 19:06:05 +0300
> From: IL Ka <[hidden email]>
> To: Jason Long <[hidden email]>
> Cc: Postfix users <[hidden email]>, "@lbutlr" <[hidden email]>
> Subject: Re: Mail server without MX record.
>
>> DNS server have another MX record for other mail server.
> Then all mail to your domain will go to that mail server. No way to change
> it. This is how SMTP works:
>
> If one or more MX RRs are found for a given name, SMTP systems MUST
> NOT utilize any A RRs
>
> https://tools.ietf.org/html/rfc2821#section-5
>
> You need to contact the DNS administrator. You would need DNS anyway,
> because serious MTAs need SPF and DKIM: both are DNS records.
>
> On Tue, Oct 13, 2020 at 6:53 PM Jason Long <[hidden email]> wrote:
>
>> I can't have MX record because the DNS server have another MX record for
>> other mail server.
>> I'm thankful if anyone tell me how can I solve my problem without MX
>> record. Is t possible with A record?

See top post.

>> [...]
>> On 13 Oct 2020, at 09:45, Bernardo Reino <[hidden email]> wrote:
>>
>>> On Tue, 13 Oct 2020, Jason Long wrote:
>>>
>>>> I have an Internet domain name and a Linux server and I want to have
>>>> an email server for send and receive emails. For example, if my
>>>> domain is "example.net" then I want to have a "[hidden email]"
>>>> address for send and receive emails from the Internet.

If you have MX for example.net then it overrides A record for example.net
domain name. But please remember that "domain name" in DNS is a
mathematical concept, it does not mean "a domain name having an SOA or
equivalently immediately below a zone cut".

--

Fred Morris
Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

@lbutlr
On 13 Oct 2020, at 12:03, Fred Morris <[hidden email]> wrote:
> Notwithstanding, any "fully qualified domain name" (FQDN) can have email sent to it; typically only the FQDN immediately below the zone cut, and also the subject of SOA and NS records, has MX records.

Pretty sure it is prefect fine to have different MX records for subdomains.

example.com MX 10 mail.example.com.
foo MX 10 mail.sub1.example.com.
Bar MX 10 mail.sub2.example.com.

Universities used to often have different MX servers for different departments/machines, though now it seems they are using external services for MX (maybe lucky, I checked five and all were using google or outlook for MX).

--
"Are you pondering what I'm pondering?"
"I think so, Brain, but Tuesday Weld isn't a complete sentence."

Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

Fred Morris
Hello. Real example of someone with this setup, and all records for the
FQDNs in question, or it didn't happen.

On Tue, 13 Oct 2020, @lbutlr wrote:

> On 13 Oct 2020, at 12:03, Fred Morris <[hidden email]> wrote:
>> Notwithstanding, any "fully qualified domain name" (FQDN) can have
>> email sent to it; typically only the FQDN immediately below the zone
>> cut, and also the subject of SOA and NS records, has MX records.
>
> Pretty sure it is prefect fine to have different MX records for subdomains.
>
> example.com MX 10 mail.example.com.
> foo MX 10 mail.sub1.example.com.
> Bar MX 10 mail.sub2.example.com.
>
> Universities used to often have different MX servers for different
> departments/machines, though now it seems they are using external
> services for MX (maybe lucky, I checked five and all were using google
> or outlook for MX).

Nothing here says that they haven't delegated e.g. foo.example.com.

Here, like this:

MariaDB [DNS]> SELECT name, type FROM Resource WHERE name IN (select name
from Resource where name like '%.washington.edu.' and type = 'MX') GROUP
BY name, type ORDER BY name, type;
+---------------------------+------+
| name                      | type |
+---------------------------+------+
| marge.cac.washington.edu. | A    |
| marge.cac.washington.edu. | MX   |
| marge.cac.washington.edu. | NS   |
| math.washington.edu.      | MX   |
| math.washington.edu.      | NS   |
| staff.washington.edu.     | MX   |
| staff.washington.edu.     | NS   |
| u.washington.edu.         | MX   |
| u.washington.edu.         | NS   |
| www.atmos.washington.edu. | A    |
| www.atmos.washington.edu. | MX   |
| www.atmos.washington.edu. | NS   |
+---------------------------+------+

--

Fred Morris

Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

Jason Long
In reply to this post by @lbutlr
I'm really thankful for all information and help.
Excuse me, I have some questions and I'm thankful if anyone answer to them by number:
1- Each domain can have a MX record?
2- If a company need multi MX record then it must have multi DNS server too?
3- Other methods like forwarding need MX record too?

Thank you.



On Tue, Oct 13, 2020 at 10:12 PM, @lbutlr
On 13 Oct 2020, at 12:03, Fred Morris <[hidden email]> wrote:

> Notwithstanding, any "fully qualified domain name" (FQDN) can have email sent to it; typically only the FQDN immediately below the zone cut, and also the subject of SOA and NS records, has MX records.


Pretty sure it is prefect fine to have different MX records for subdomains.

example.com    MX    10    mail.example.com.
foo        MX    10    mail.sub1.example.com.
Bar        MX    10    mail.sub2.example.com.

Universities used to often have different MX servers for different departments/machines, though now it seems they are using external services for MX (maybe lucky, I checked five and all were using google or outlook for MX).

--
"Are you pondering what I'm pondering?"
"I think so, Brain, but Tuesday Weld isn't a complete sentence."

Reply | Threaded
Open this post in threaded view
|

Re: Mail server without MX record.

ilyak
>1- Each domain can have a MX record?
If you want to receive email for this domain then yes, you should have an MX record for it. Without it  "A" record will be used, but it is better to have MX.


>2- If a company need multi MX record then it must have multi DNS server too?
You can have multiple MX records with different priorities. Sender's MTA will try first one first.
Number of DNS servers doesn't affect the number of MX records: in most cases all public servers must have the same records.

>3- Other methods like forwarding need MX record too?
No, if you only want to send email, you are not required to have an MX record. Some MTAs may decline messages from domains without of MX, but most of them accept such mails.
But if you have no MX, then you can't get replies and non delivery reports. 

There are some books about Postfix: "The book of Postfix", "Postfix: The Definitive Guide". It may be a good idea to read some of them: they cover how postfix works with DNS and MX.



On Tue, Oct 13, 2020 at 10:15 PM Jason Long <[hidden email]> wrote:
I'm really thankful for all information and help.
Excuse me, I have some questions and I'm thankful if anyone answer to them by number:
1- Each domain can have a MX record?
2- If a company need multi MX record then it must have multi DNS server too?
3- Other methods like forwarding need MX record too?

Thank you.



On Tue, Oct 13, 2020 at 10:12 PM, @lbutlr
On 13 Oct 2020, at 12:03, Fred Morris <[hidden email]> wrote:

> Notwithstanding, any "fully qualified domain name" (FQDN) can have email sent to it; typically only the FQDN immediately below the zone cut, and also the subject of SOA and NS records, has MX records.


Pretty sure it is prefect fine to have different MX records for subdomains.

example.com    MX    10    mail.example.com.
foo        MX    10    mail.sub1.example.com.
Bar        MX    10    mail.sub2.example.com.

Universities used to often have different MX servers for different departments/machines, though now it seems they are using external services for MX (maybe lucky, I checked five and all were using google or outlook for MX).

--
"Are you pondering what I'm pondering?"
"I think so, Brain, but Tuesday Weld isn't a complete sentence."

123