After postfix/dovecot/mysql setup can send but not recieve

I can send mail from my linode but I cannot receive it. I have two Linodes, one for my site and another for mail. I have my mail linode setup with a reverse dns of mail.mydomain.com. I have an MX record of 'mail' on the mydomain.com DNS zone and an A record that points mail to the ip of my mail linode. I can send mail from the server using mutt but when I try to send mail to the server it gets bounced. I have no log entries so this tells me its a routing issue and isn't making it to the server.

I'm not sure why this isn't working, anybody have any ideas?

Thanks

Bryce

12 Replies

What does the bounce message say?

Technical details of permanent failure:

Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 554 554 5.7.1 : Relay access denied (state 14).

Sounds like your MTA thinks it doesn't handle the domain name in question.

For example in exim, it's the local_domains config entry that needs to contain "mydomain.com".

I have all the FQDN set and the hostname set properly. I'm using postfix not exim. I followed the directions in the tutorial to a T. I've gone through and rechecked all my spellings and didn't see any errors. I'm not seeing any incoming activity in my logs, which leads me to believe that the request isn't even making it to my server.

I have an MX record for mail.mydomain.com. I also have an A name for the subdomain mail and it points to my mail linode's IP. Does this all sound correct?

DNS looks to be OK. Postfix is not aware that it's supposed to be accepting mail for wordipity.com, however. There are two different scenarios:

If mail for wordipity.com is supposed to be delivered locally

If mail for wordipity.com is supposed to be relayed to another host

If your mail server's IP address is 192.0.2.36, your DNS is good. You might also want to check your other server's mail log to see if perhaps the messages are ending up there instead. By default, DNS servers will cache answers for up to 24 hours.

If you used the Linode tutorial, fire up MySQL and connect to the mail db and make sure that the following queries return exactly one thing:

SELECT domain AS virtual FROM domains WHERE domain='example.com';

SELECT email FROM users WHERE email='user@example.com';

Also, you should be seeing log messages from postfix in /var/log/mail.log (or thereabouts)… are you getting any log messages at all in there, or in /var/log/syslog? If not, get logging working: that will help out a lot.

I also just sent you a mail and your mail server accepted it, which is a good sign I suppose :-)

Nov  6 15:40:59 framboise postfix/smtp[32743]: ABEB1813C: to=<user@example.com>, relay=mail.example.com[192.0.2.36]:25, delay=0.77, delays=0.35/0.01/0.31/0.1, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 18A27A07C)</user@example.com>

(edit to redact addresses by request)

Hey hoopy,

Yeah, I got your email on my server. So that works alright. Did you sent it from a linode? Did it get routed internally?

I'm going to go check on the other things you mentioned, like my other server's mail logs.

Well it looks like email that I am sending from gmail is going to my wordipity.com linode, not the mail linode. I had previously set up mail on that linode, but I don't think I did it 100% correct.

I see in /var/log/mail.log that it is rejecting the gmail connection. Got any good uninstall references? :)

Wait about 24 hours, and that should correct itself.

You'll probably want some MTA installed on the other machine, just so that it can send you e-mail if something breaks or whatnot. Changing the postfix config on that other machine so that it is only listening on 127.0.0.1 would get it to stop bouncing mail. I believe it's myinterfaces or something like that in main.cf, but I don't have it in front of me right now.

It turns out that it was definitely a cache issue. Thanks to everyone for looking at this.

Hoopy, could you edit out my email address from your post above? Its there twice, you could just do something like I did in my post above that. I already got my first spam message and its only been up a day… sheesh.

No problem… thanks for the heads up. I figure the mydomain.com folks have it bad enough, so I'll let example.com share in the fun. :-)

you do know that the domain example.com is a reserved domain for exactly those purposes? :)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct