Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


Closed Thread
  Search this Thread
Old 02-12-2004, 04:16 PM   #1
LQ Newbie
Registered: Feb 2004
Posts: 1

Rep: Reputation: 0
How to allow mail relay of specific IP address

I have set up an anti-spam relay server (RH Linux 8 postfix, amavis, spamAssassin) between my mail server and the Internet. As such, I have enabled relaying from my mail server only in order to avoid becoming an open relay. However, I have an off-site server farm that sends email messages to acknowledge receipt of submissions. These of course fail because I don't allow relaying. So my clients don't get their confirmations. My question is, can I configure a specific public IP address to allow relaying from or will this create an open relay? My CIO says that it will not but I'm not convinced and my tail is on the line if I open one up. I can't use pop before smtp because this process doesn't check for mail.

Can anybody point me in the right direction?

Old 02-12-2004, 09:06 PM   #2
Senior Member
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 75
Have you looked in the /etc/postfix/ file at all?

# The mynetworks parameter specifies the list of "trusted" SMTP
# clients that have more privileges than "strangers".
# In particular, "trusted" SMTP clients are allowed to relay mail
# through Postfix. See the smtpd_recipient_restrictions parameter
# in file
# You can specify the list of "trusted" network addresses by hand
# or you can let Postfix do it for you (which is the default).
# By default (mynetworks_style = subnet), Postfix "trusts" SMTP
# clients in the same IP subnetworks as the local machine.
# On Linux, this does works correctly only with interfaces specified
# with the "ifconfig" command.
# Specify "mynetworks_style = class" when Postfix should "trust" SMTP
# clients in the same IP class A/B/C networks as the local machine.
# Don't do this with a dialup site - it would cause Postfix to "trust"
# your entire provider's network. Instead, specify an explicit
# mynetworks list by hand, as described below.
# Specify "mynetworks_style = host" when Postfix should "trust"
# only the local machine.
#mynetworks_style = class
#mynetworks_style = subnet
#mynetworks_style = host

# Alternatively, you can specify the mynetworks list by hand, in
# which case Postfix ignores the mynetworks_style setting.
# Specify an explicit list of network/netmask patterns, where the
# mask specifies the number of bits in the network part of a host
# address.
# You can also specify the absolute pathname of a pattern file instead
# of listing the patterns here. Specify type:table for table-based lookups
# (the value on the table right-hand side is not used).
#mynetworks =,
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/usr/local/etc/postfix/network_table
Old 02-13-2004, 06:40 AM   #3
Registered: Feb 2004
Posts: 273

Rep: Reputation: 30
I would ask you to take a look at the SMTP AUTH mechanisms before using "POP before SMTP". I use sendmail but I don't believe you can't do that on Postfix.

IP based Relaying can be done on any good mail server.

I personally use SMTP with TLS and PLAIN/LOGIN as AUTH.
Old 03-03-2020, 06:37 AM   #4
LQ Newbie
Registered: Feb 2020
Posts: 5

Rep: Reputation: Disabled
I have face this problem. i have tried this all the ways but i couldn't reach my required output.

i have a two ips like, and i have a only one relayhost []. now i try to send mail via ip its taken [] relay . its working fine . no issues on that. After i try to send mail via ip its also taken same relay only. but i need to configure relay for only one ip .

if i send mail via second ip its need to through error . am using postfix on centos-7. please tell us if anyone know the answer
Old 03-03-2020, 07:24 AM   #5
LQ Veteran
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.8.2003
Posts: 5,405

Rep: Reputation: 2039Reputation: 2039Reputation: 2039Reputation: 2039Reputation: 2039Reputation: 2039Reputation: 2039Reputation: 2039Reputation: 2039Reputation: 2039Reputation: 2039
Duplicating your question on a 16-year-old thread is not going to get you an answer faster or better.
Your other thread is here Please respond to the questions you've been asked in that thread.
This post reported as a duplicate.

Last edited by scasey; 03-03-2020 at 07:26 AM.
1 members found this post helpful.

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix as a mail relay (getting relay access denied) hypexr Linux - Software 3 09-13-2005 07:15 PM
routing mail out on a specific IP address LordFarquad Linux - Networking 0 09-01-2004 07:20 PM
relay mail to sendmail relay server??? lemay_jeff Linux - Newbie 0 07-06-2004 04:54 PM
sendmail configure relay for specific e-mail addresses LeovanBussel Linux - Newbie 1 07-29-2003 03:08 AM
Relay email for specific domains to an external address on a non-standard port BaDaBooM Linux - Networking 2 03-18-2003 10:40 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:39 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration