Score:0

POSTFIX: New mail server. Can neither send nor receive mail

cn flag

I am trying to learn about mail servers and have setup one. However neither can I send, nor receive mail. I can login to my email account and I see the folders (Inbox, Sent, Trash, etc) are being populated within the email client. Also /var/log/syslog indicates that my user has successfully logged in via imap-login

When I click on the test button from Thunderbird before logging in, the test always fails with: "Thunderbird failed to find the settings for your email account" I have turned off the firewall on the server completely. My DNS records I believe are properlly set up as an MX lookup returns no errors/warnings. I have verified the mysql user specified within dovecot does have permissions over the database used for mail, the domain, alias and accounts tables have all been created. [email protected] has been imported into the accounts table.

Any ideas?

This is the guide I followed to set it up and I am as well using Debian 9. Thanks!

carlitobrigante avatar
cn flag
OK, so I am trying to send mail to gmail.com. I can ping their mail server and I can also do telnet on :25 to it. However I can't do telnet on 587 to it and this is what my mail server is set to use. Can this be the reason? `root@mail:~# telnet gmail-smtp-in.l.google.com 25 Trying 142.250.102.26... Connected to gmail-smtp-in.l.google.com.` ... `root@mail:~# telnet gmail-smtp-in.l.google.com 587 Trying 142.250.102.26... Trying 2a00:1450:4025:402::1a... telnet: Unable to connect to remote host: Network is unreachable`
jp flag
Port 587 is for *submission* alone and should not be used for SMTP between MTAs.
carlitobrigante avatar
cn flag
Hi Thank you all for the support. As the issue now is different from what it was initially I shall create a new post specific to why postfix isn't sending mail, referencing my smtpd restrictions.
Michael Hampton avatar
cz flag
You entered a domain that doesn't exist. What is the real domain name?
carlitobrigante avatar
cn flag
@anx, apologies which are the logs you are referring to? Is there some sort of thunderbird log or do you want me to pull out something from the OS? Also do you want me to login/run a test/try to send mail or receive before I provide the logs? Sorry as I said I'm new to mail. Thanks
Michael Hampton avatar
cz flag
You need to enter the settings yourself. Thunderbird doesn't actually autodetect anything; it just consults a database of major email providers. It looks like you've done that already, so you should move on to checking the mail server logs.
carlitobrigante avatar
cn flag
Hi, sorry it's late.. so I did the below actions and have provided an output of tail -30 /var/log/syslog over here: https://pastebin.com/efkaPxMp Let me know if this isn't what you guys were referring to. Thanks - ran the thunderbird test (failed) - logged in via thunderbird (successful) - sent mail to my gmail (failed) - sent mail from my gmail (failed)
Michael Hampton avatar
cz flag
Yes, and you should also read the logs yourself. The problem became obvious: `Jul 31 00:58:02 mail postfix/smtpd[2482]: warning: connect to mysql server 127.0.0.1: Access denied for user 'vmail'@'localhost' (using password: YES)`
carlitobrigante avatar
cn flag
I am assuming somewhere I have configured a restriction as to which domains my mail server can send mail.. just not sure where this setting may be
Score:1
cn flag

Looking at the /var/sys/syslog there were mysql access denied errors for the postfix db. One of the files within /etc/postfix/sql/ had a typo in the postfix password.

I can now receive mail without issues, however outgoing mail doesn't work. As the issue now differs from it initially was I am answering this so a new post can be created more specific to the current failures.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.