I have setup Postfix on Ubuntu 16.04 and cannot receive mail.
Configuration
- Ubuntu 16.04 LTS
- Postfix
- S-nail client
Problem
I am able to send mail out, but am unable to receive mail. Are there any network filters preventing me from receiving email?
2 Replies
I'm assuming you pointed a hostname at your linode IP - what happens when you try to deliver mail to it? Do you get a bounce at the source?
Can you tail the postfix logs? The file is usually called /var/log/maillog, /var/log/mail, or something similar
Eg: mail.example.com A 192.0.0.1
example.com MX mail.example.com
Are there any network filters preventing me from receiving email?
In general, unless you have been informed otherwise due to special circumstances, there are no network filters in place for your Linode.
You can verify that there are no external filters in place for your Linode by checking the port 25 of your Linode and see that it is responding:
…
telnet 192.0.2.143 25
Trying 192.0.2.143…
Connected to li1###-##.members.linode.com.
Escape character is '^]'.
EHLO
220 example.com ESMTP Postfix (Ubuntu)
501 Syntax: EHLO hostname
QUIT
221 2.0.0 Bye
Connection closed by foreign host.
…
The following is a guide on debugging Postfix, if you have any questions about what you read here, please let us know and we will try to clarify:
We also provide the following guide on a common Postfix setup:
Postfix rarely works alone to provide mail services. Can you describe your setup?
- Was there a guide that you used to setup your mail services?
- Could provide the contents of your
main.cf
file? - What is the domain for which you are trying to receive email
- How have you setup your DNS records, especially your MX records.
Some places to check:
DNS
Ensure that your domain provides MX records that point to your Linode:
$ dig -tMX example.com
...
example.com. 21599 IN MX 10 example.com.
example.com. 21599 IN MX 10 mail.example.com.
$ dig example.com
example.com. 21599 IN A 192.0.2.143
$ dig example.com
mail.example.com. 21599 IN CNAME example.com.
System Mail Name
Make sure your system mail name in your main.cf is your domain for your email and not your hostname. i.e. example.com, not mail.example.com
Mail Users
Make sure you have created the users that will receive mail. For example:
sudo adduser exampleuser
I hope this helps to get you started.