Forum Replies Created
-
AuthorPosts
-
k12techman
ParticipantDad always said to check the simple stuff first. If the car won’t start, is there gas in it?…….
I was dealing with two issues that were not a configuration problem on the server. As a matter of fact, the server was/is configured correctly.
1st Problem: Piece of Warthog-booger Home Router – My router, while implying that it was performing port forwarding was, in fact, NOT. Used a tool at DynDNS to check open ports from the outside. POP, IMAP and SMTP ports were closed. They were open from the inside, but not the outside. Opened them and magically, mail delivery was working for incoming messages. Outgoing was still a problem.
2nd Problem: SBC/AT&T (a.k.a. 666) Blocks Port 25 by Default – Called them and told them I needed port 25 unblocked. They did it! I know, I couldn’t believe it either.
Lo and behold, with all the necessary ports open, mail works.
On a side note, I did learn that you can force OS X Server to authenticate to an outgoing SMTP relay. While my ISP was kind enough to open Port 25, they did say it might not stay open when my IP changes. How nice. So, I purchased 300 daily outgoing relays from DynDNS for $20. Problem was, I had to find a way to get the server to authenticate with my credentials to their secure relay server.
These instructions assume the postfix config files live in /etc/postfix.
1. In /etc/postfix/main.cf add the lines:
relayhost = desired.relay.xyz
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options=Optionally, also add the lines:
smtp_use_tls = yes
smtp_tls_CAfile = /etc/postfix/cert.pem
smtp_tls_session_cache_database = btree:/var/run/smtp_tls_session_cacheto enable SSL/TLS when sending outgoing mail. Note that the path info in the second command may be different depending on your system and where you have installed your certificates. The last line may be omitted, but should help reduce CPU cycles verifying the certificate chain when sending outgoing E-Mail.
2. Create a file /etc/postfix/sasl_passwd with the contents:
desired.relay.xyz userid:password
where userid and password are your username and password for your relay service.
3. Next, change the ownership and permissions on the sasl_passwd file to protect it from unauthorized access.
chown root:root /etc/postfix/sasl_passwd && chmod 600 /etc/postfix/sasl_passwd
4. Finally, create a database file from the contents of the sasl_passwd file:
postmap hash:/etc/postfix/sasl_passwd
5. OPTIONAL: If you wish to relay only specific domains you will need to do the following:
Remove the relayhost = desired.relay.xyz entry in main.cf, if one exists.
Add the following line to your main.cf file: transport_maps = hash:/etc/postfix/transport
Edit /etc/postfix/transport and update it with something similar to the following:
# Syntax: .domain transport:relay_host
# Specifies specific domains for local delivery
my.domain.com :# Specify all subdomains for local delivery
.my.domain :# Specify domains that need to be relayed through outbound.mailhop.org
aol.com relay:desired.relay.xyz
hotmail.com relay:desired.relay.xyzCreate a database file from the contents of the transport file: postmap hash:/etc/postfix/transport
6. Lastly, reload postfix: postfix reload
I’ve made these instructions generic, but have cabbaged them from here:
https://www.dyndns.com/support/kb/archives/mail_servers_and_mailhop_outbound.html#postfix (you need an account to see it….)
There’s a pretty good guide here, too: http://postfix.state-of-mind.de/patrick.koetter/smtpauth/smtp_auth_mailservers.html
If you need public DNS, I would say you can’t go wrong with DynDNS. They have been supportive, their pricing is reasonable, and they have a cool name.
Postfix WILL do this as long as you don’t mind editing the main.cf file manually.
Now, I’m going out and buying myself chocolate AND booze…..
-
AuthorPosts