LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-19-2010, 02:26 AM   #1
baps123
LQ Newbie
 
Registered: Apr 2010
Posts: 13

Rep: Reputation: 0
Relay Access Denied, Postfix, RHEL5


we having postfix installed as our smtp server in rhel5, but intermittently my users complaining of getting "Recipient address rejected: Relay access denied" message whenever they try to send mail to outside domains.

Due to unavoidable circumstances I don't know whether my mail server configuration has been changed or nor.

Please help me out in resolving the issue at the earliest

My maillog showing log as shown below
Quote:
Apr 19 11:27:30 smtp1 postfix/smtpd[25560]: NOQUEUE: reject: RCPT from unknown[59.99.50.252]: 554 5.7.1 <xyz@huge.in>: Recipient address rejected: Relay access denied; from=<prabin.bhatta@xyz.com> to=<akumar.cns@hughes.in> proto=ESMTP helo=<Prabin>
Apr 19 11:27:31 smtp1 postfix/smtpd[25560]: NOQUEUE: reject: RCPT from unknown[59.99.50.252]: 554 5.7.1 <xyz@huge.in>: Recipient address rejected: Relay access denied; from=<prabin.bhatta@xyz.com> to=<ayadav.cns@hughes.in> proto=ESMTP helo=<Prabin>
My /etc/postfix/main.cf is given below

Quote:
myhostname = smtp1.xyz.co.in
mydomain = xyz.co.in
local_recipient_maps = $virtual_mailbox_maps


virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = ldap:/etc/postfix/ldap_usr.cf
virtual_uid_maps = static:1000
virtual_gid_maps = static:1000
virtual_minimum_uid = 100
virtual_result_attribute = mailMessageStore
virtual_maildir_extended = yes
mynetworks = 127.0.0.0/8, 192.168.10.0/24, 192.168.1.0/24, 192.168.3.0/25, 192.168.4.0/24, 172.21.10.0/24, 172.21.1.0/24, 172.21.15.0/24, 172.21.16.0/25
relay_domains = xyz.co.in, abc.com
message_size_limit = 15728640
transport_maps = hash:/etc/postfix/transport
virtual_alias_maps = hash:/etc/postfix/virtual
relay_recipient_maps = hash:/etc/postfix/relay_recipients
alias_maps = hash:/etc/aliases
smtpd_client_restrictions = check_client_access hash:/etc/postfix/client_access, permit_sasl_authenticated

smtpd_helo_required = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes

disable_vrfy_command = yes


smtpd_restriction_classes = only_allow_mail, permitted_senders_central_group, permitted_vle_all,permitted_statewise_vle_all, hrto_sabahat_block,permitted_up_
all

only_allow_mail =
check_sender_access hash:/etc/postfix/rest_access
reject

permitted_senders_central_group =

check_sender_access hash:/etc/postfix/permitted_senders_centalgroup
reject


permitted_vle_all =
check_sender_access hash:/etc/postfix/vle_all_access
reject

permitted_statewise_vle_all =
check_sender_access hash:/etc/postfix/statewise_vle_all_access
reject

hrto_sabahat_block =
check_sender_access hash:/etc/postfix/hr_sabahat_blockf
reject

permitted_up_all =
check_sender_access hash:/etc/postfix/permitted_up_all_corporate
reject



smtpd_recipient_restrictions =
hash:/etc/postfix/protected_recipients_central
hash:/etc/postfix/protected_destinations
hash:/etc/postfix/access_vle_all
hash:/etc/postfix/access_statewise_vle_all
hash:/etc/postfix/sabahat_destacl
hash:/etc/postfix/up_all_corporate
permit_mynetworks
check_relay_domains

unknown_client_reject_code = 550
unknown_local_recipient_reject_code = 550
smtpd_hard_error_limit = 3
smtp_connect_timeout = 60s


header_checks = regexp:/etc/postfix/header_checks2, regexp:/etc/postfix/header_checks_porn

sender_bcc_maps = hash:/etc/postfix/sender_bcc


smtpd_data_restrictions = reject_unauth_pipelining
smtp_connect_timeout=15s
smtp_helo_timeout=400s


readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
html_directory = no
setgid_group = postdrop
command_directory = /usr/sbin
manpage_directory = /usr/local/man
daemon_directory = /usr/libexec/postfix
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
queue_directory = /var/spool/postfix
mail_owner = postfix

please
 
Old 04-19-2010, 03:57 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by baps123 View Post
we having postfix installed as our smtp server in rhel5, but intermittently my users complaining of getting "Recipient address rejected: Relay access denied" message whenever they try to send mail to outside domains.

Due to unavoidable circumstances I don't know whether my mail server configuration has been changed or nor.

Please help me out in resolving the issue at the earliest

My maillog showing log as shown below


My /etc/postfix/main.cf is given below




please

read this

Code:
# 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 postconf(5).
#
# You can specify the list of "trusted" network addresses by hand
# or you can let Postfix do it for you (which is the default).

so in theory, you want to specify the addresses that are allowed to relay via this server.


add relevant ip(s) to here.


Code:
mynetworks = 127.0.0.0/8, 192.168.10.0/24, 192.168.1.0/24, 192.168.3.0/25, 192.168.4.0/24, 172.21.10.0/24, 172.21.1.0/24, 172.21.15.0/24, 172.21.16.0/25

restart postfix
 
Old 04-19-2010, 05:30 AM   #3
baps123
LQ Newbie
 
Registered: Apr 2010
Posts: 13

Original Poster
Rep: Reputation: 0
I am not getting you, what ip I should put there.

I tried using below line

Code:
mynetworks = 127.0.0.0/8, 192.168.10.0/24
But to no avail

Please elaborate on this
 
Old 04-19-2010, 07:53 AM   #4
moimel
Member
 
Registered: May 2009
Posts: 30

Rep: Reputation: 15
Do as followes if you want to permit all hosts to be relayed:

Edit main.cf, set relay_domains to:
relay_domains = regexp:/etc/postfix/relay_domains

in /etc/postfix/relay_domains:
/[A-Z0-9.-]+\.[A-Z]{2,4}/ OK

restart
 
  


Reply



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 Relay Access Denied sojelee Linux - Newbie 1 03-30-2009 08:30 AM
postfix: relay access denied cope Linux - Server 1 05-10-2007 01:35 AM
HELP! POSTFIX Relay access denied cozyk1515 Linux - Software 3 07-21-2006 08:56 AM
Postfix as a mail relay (getting relay access denied) hypexr Linux - Software 3 09-13-2005 07:15 PM
Postfix and Relay access denied jamiguel77 Linux - Software 3 03-12-2005 10:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

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