Postfix Relay with mynetworks -- not working
It works with the first IP address (office), but not from home. I'm stumped.
I have this set:
mynetworks = 127.0.0.0/8
The IP in green works just fine. It is my office. The one in red doesn't work.
Can anyone help me with what I might be missing?
4 Replies
@CricketAlley:
I'm trying to setup postfix to allow relaying from two specific IP addresses – office and home.
It works with the first IP address (office), but not from home. I'm stumped.
I have this set:
mynetworks = 127.0.0.0/8
24.12.24.23 24.12.22.17 The IP in green works just fine. It is my office. The one in red doesn't work.
Can anyone help me with what I might be missing?
What error message do you get in /var/log/mail.log or wherever you are logging mail?
Also, post the output of postconf -n
.
The error I'm getting now on my laptop at home is: "Can not connect to SMTP server."
I can take this same laptop, without changing anything, and it works fine at the office.
There isn't a record in the mail log because it isn't connecting. I'm stumped on that.
Here is the postconf - n.
Thanks much.
alias_maps = hash:/etc/aliases
config_directory = /etc/postfix
debugpeerlevel = 2
defaultdestinationconcurrency_limit = 5
defaultdestinationrecipient_limit = 10
home_mailbox = Maildir/
html_directory = no
mailboxsizelimit = 256000000
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
maximalqueuelifetime = 2d
mydestination = hash:/etc/postfix/mydomains
mynetworks = 127.0.0.0/8 24.12.24.23 24.12.22.17
newaliases_path = /usr/bin/newaliases.postfix
queuerundelay = 10000s
readmedirectory = /usr/share/doc/postfix-2.3.3/READMEFILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpsaslsecurity_options = noplaintext
smtpdbanner = $myhostname ESMTP $mailname
smtpdrecipientrestrictions = permitmynetworks, permitsaslauthenticated, rejectunauthpipelining, rejectinvalidhostname, rejectnonfqdnsender, rejectunknownsenderdomain, rejectunauthdestination, rejectunknownrecipientdomain, rejectnonfqdn_recipient
smtpdsaslauth_enable = yes
smtpdsasllocal_domain = $myhostname
smtpd_timeout = 5
unknownlocalrecipientrejectcode = 550
virtualaliasmaps = hash:/etc/postfix/virtual
@CricketAlley:
Thank you for your help.
The error I'm getting now on my laptop at home is: "Can not connect to SMTP server."
I can take this same laptop, without changing anything, and it works fine at the office.
Is your home ISP blocking SMTP traffic? A large number do, these days, to stop spam (use their relay or else). Does your linode have a firewall so only specific IP addresses can connect?
From your laptop at home, what is the result of "telnet your-inode 25" ? What about "telnet your-inode 587" ? It's possible you could run an authenticating SMTP server on the SMTP-submission port (587) if your ISP is blocking port 25.
It was so easy.
I just tested port 25, and yes, it is being blocked by my ISP.
So, I just changed postfix to another port for SMTP and viola….. workslike a charm.
Thank you much.