Help with postfix mail relay
I have a VPS in the cloud running sendmail currently. It's job is to be the public MX for my domain, it receives and sends all email from my domain to the world via esmtp direct to the recipients MX server. Received mail for my domain gets forwarded on a non standard port to my home server for storage. Basically the whole point of this server is mail relay. I have the settings working well with sendmail. I'm keeping out the rif raf, all while allowing my domain to send mail as I please. I thought I had postfix setup properly based on the docs to replicate the settings but I can't get it to work.
I'm attaching my configs, minus hostnames and IPs removed. Please let me know if this is the wrong forum to post in, or if you can point me in the right direction. /etc/postfix/main.cf Code:
queue_directory = /var/spool/postfix Code:
alkain.com DISCARD Code:
2z9yi3cdccr07z8zeu7s@domain.com DISCARD Code:
CANON@domain.com DISCARD Code:
domain.com smtp:mail.domain.com:143 |
What do your smtp logs indicate? Is the traffic being received by your VHS smarthost from your local machine? From google? Does your mix record publicly resolve properly? Is your VHS IP or your registered domain on any black list? You van check at mxtoolbox. If you send and email from a Gmail account do you get an NDR back and if so what does it say? Same with sending mail out. The issue doesn't sound like a postfix configuration issue. I also didn't see anything glaringly wrong with your postfix config.
|
It's a postfix config issue for sure. I'm trying to migrate from a working sendmail setup. My MX/DNS records are good. Traffic is getting there, but it's always being denied(rejected).
You can see the reject here from google to my domain and from my homeserver trying to use the VPS to sendout Code:
Oct 28 18:10:31 vps1 postfix/master[8771]: daemon started -- version 2.6.6, configuration /etc/postfix Code:
Oct 28 18:13:27 vps1 postfix/smtpd[9260]: connect from localhost.localdomain[127.0.0.1] |
For outbound mail to work I'd add your home public IP to the mynetworks, or better use authentication such as this https://blog.bravi.org/?p=1065 for the relay out. Not sure if that would resolve the inbound issue though. Do you have logs for the inbound?
|
Look over this, pretty sure this is where it is bunged up in the smtpd access restrictions. http://www.postfix.org/postconf.5.ht...y_restrictions
|
I updated my smtpd_relay_restrictions
Code:
smtpd_relay_restrictions = permit_mynetworks, permit relay_domains Code:
Nov 3 00:10:38 vps1 postfix/smtpd[2176]: connect from mail-pf0-f172.google.com[209.85.192.172] |
After more screwing around, it appears I have the config correct, going to let it run over night and see if I run into any issues.
Code:
smtpd_client_restrictions = permit_mynetworks, reject_unauth_destination, reject_unknown_recipient_domain, reject_rbl_client zen.spamhaus.org, reject_rbl_client dnsbl.sorbs.net, permit |
Finalized the config, had to slow down mail transmission but otherwise mostly the same, these are just the lines I've added to the main.cf
Code:
transport_maps = hash:/etc/postfix/transport |
All times are GMT -5. The time now is 05:30 AM. |