Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 10th October 2005, 13:59
Kamran Shah Kamran Shah is offline
Junior Member
 
Join Date: Oct 2005
Posts: 20
Thanks: 0
Thanked 1 Time in 1 Post
Default Relay access denied when using SMTP to external recipients

Unable to send emails to any domains not hosted locally on this server via SMTP client. If I do the same using SMTP client I receive NDR and below message in my /var/log/maillog.

Oct 10 12:12:12 portal postfix/smtpd[9641]: NOQUEUE: reject: RCPT from gateway[195.xx.xx.xxx]: 554 <me@yahoo.com>: Relay access denied; from=<me@mydomain.com> to=<me@yahoo.com> proto=ESMTP helo=<Inbox>

Everything works fine if I use web mail client UebiMiau except UebiMiau translates internal emails to me@mydomain.com@myserverhostname.com. But at it lets me send emails to me@yahoo.com without any problem, see the log message below which works perfectly.

Oct 10 12:25:32 portal postfix/smtp[9943]: 78FFA485C8E: to=<me@yahoo.com>, relay=mx2.mail.yahoo.com[4.79.181.13], delay=23, status=sent (250 ok dirdel)

I have read few threads where people are facing this error "Relay access denied" but couldn't really find the resolution for my problem.

I have perfectly installed ISPConfig on FC4 without any problems. /etc/postfix/main.cf has following entry as per installation instruction. I have tried check_relay_domains appears same after restarting postfix.

smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
Reply With Quote
Sponsored Links
  #2  
Old 10th October 2005, 14:38
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by Kamran Shah
Everything works fine if I use web mail client UebiMiau except UebiMiau translates internal emails to me@mydomain.com@myserverhostname.com. But at it lets me send emails to me@yahoo.com without any problem, see the log message below which works perfectly.
That's because you're on the system itself when you use webmail (the webmail program is running on the server).

In your email client you have to activate something like "Server needs authentication." for that mailbox.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following 3 Users Say Thank You to falko For This Useful Post:
alexloko (10th November 2011), bswinnerton (1st April 2008), spanish (8th March 2011)
  #3  
Old 10th October 2005, 16:24
Kamran Shah Kamran Shah is offline
Junior Member
 
Join Date: Oct 2005
Posts: 20
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by falko
That's because you're on the system itself when you use webmail (the webmail program is running on the server).

In your email client you have to activate something like "Server needs authentication." for that mailbox.
Any ideas what would be the fix, I have opened a separate thread for this issue as it doesn't relate to relaying http://www.howtoforge.com/forums/sho...=3952#post3952
Reply With Quote
The Following User Says Thank You to Kamran Shah For This Useful Post:
Williamsl (10th July 2014)
  #4  
Old 10th October 2005, 17:39
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Did you enable "Server needs authentication" in your email client?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 11th October 2005, 13:07
Kamran Shah Kamran Shah is offline
Junior Member
 
Join Date: Oct 2005
Posts: 20
Thanks: 0
Thanked 1 Time in 1 Post
Default Server Authentication resolved my issue - hurray

I was using my Pocket PC (Orange M2000 with WM2003SE) Email client and configuration worked for another free pop3/smtp server but not for this one I installed with ISPConfig.

After Falko's reply I realised it could be this client so tried on Outlook Express on my PC which worked perfectly so it is down to the client I have on my PPC.

If I enable Server Authentication on my PPC it would come up with connectivity error while without server authentication it worked for internal mail destinations.

I finally tweaked with my PPC client and found that Server information contains Incoming mail, Outgoing mail and Domain where I was adding the same domain name I wanted to get email working. After deleting domain from these tried again and it worked, not sure what this domain means and why is it here, can't see such thing in Outlook Express.

I was already impressed with Falko's knowledge from previous posts and knew he will fix it.

Although my webmail issue is still there, which is probably down to the UebiMiau settings which I can't find how to fix. I used the package to install from ispconfig.com but might try squirrilmail or any other client some other time.
Reply With Quote
  #6  
Old 10th September 2006, 16:09
caMi caMi is offline
Junior Member
 
Join Date: Sep 2006
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default

I have had the same problems (Debian, also Web-FTP-Tool), here is "my" solution:

remove "localhost" in hosts-File

Greetings
caMi
Reply With Quote
The Following User Says Thank You to caMi For This Useful Post:
AbannyvabVask (22nd December 2013)
  #7  
Old 17th December 2007, 08:32
rusty rusty is offline
Member
 
Join Date: Dec 2007
Posts: 45
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko
Did you enable "Server needs authentication" in your email client?
I have a similar issue. I can send mail from the server using command line (telnet), however using Outlook I get relay access denied. I have Outlook set to use authentication (same settings as incoming mailserver). I receive mail just fine in Outlook.

log: Dec 17 02:13:46 mail postfix/smtpd[10296]: NOQUEUE: reject: RCPT from static-12-134-58-18.verizon.net[12-134-58-18]: 554 5.7.1 <joe@aol.com>: Relay access denied; from=<rusty@domain.com> to=<joe@aol.com> proto=ESMTP helo=<computername>

Would you have any ideas? Thanks!
Reply With Quote
  #8  
Old 18th December 2007, 15:56
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by rusty
I have a similar issue. I can send mail from the server using command line (telnet), however using Outlook I get relay access denied. I have Outlook set to use authentication (same settings as incoming mailserver). I receive mail just fine in Outlook.
Are you absolutely sure you checked the right option in Outlook? If so, what's in /etc/postfix/main.cf, and what's the output of
Code:
telnet localhost 25
and then
Code:
ehlo localhost
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 17th April 2010, 05:08
alexnbk alexnbk is offline
Junior Member
 
Join Date: Apr 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default The same

Hi, i´m having a similar problem, CentOS 5.4 with postfix, i can receive e-mail through the relay, I can send e-mail using telnet localhost 25, but when it com es to the e-mail coming from an exchange server to the world it says Relay ACcess Denied.

Well, it used to work fine till we had to reinstall the system, the owner did not had a backup of things, and i´m not a mail programmer, but they want me to fix it.

Here´s my main.cf and my master.cf

Main.cf

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
local_recipient_maps =
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination =
mydomain = xxxx.org.br
myhostname = xxx.xxx.org.br
mynetworks = 127.0.0.0/8, 201.xxx.xxx.xxx/24
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
parent_domain_matches_subdomains = debug_peer_list, smtpd_access_maps
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
relay_domains = <domain1>, <domain2>, <domain3>
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
smtpd_sender_restrictions = permit_mynetworks, reject_unauth_destination
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550


Master.cf

#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - n - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_enforce_tls=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_mynetworks
-o content_filter=
-o smtpd_delay_reject=no
-o smtpd_helo_restrictions=
-o smtpd_sender_rstrictions=
# -o smtpd_recipient_restrictions=permit_mynetworks, reject
-o smtpd_data_restrictions=reject_unauth_pipelining
-o smtpd_end_of_data_restrictions=
-o smtpd_restriction_classes=
-o mynetworks=127.0.0.0/8
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtpd_client_connection_count_limit=0
-o smtpd_client_connection_rate_limit=0
-o receive_override_options=no_header_body_checks,no_ unknown_recipient_checks,no_milters
-o local_header_rewrite_clients=
-o smtpd_milters=
-o local_recipient_maps=
-o relay_recipient_maps=

#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
#local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
#
# ================================================== ==================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ================================================== ==================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient


None of the previous solutions worked for me. Thanks for any heko I can get.
Reply With Quote
  #10  
Old 17th April 2010, 05:39
alexnbk alexnbk is offline
Junior Member
 
Join Date: Apr 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Solved

there was a configuration error between master and main.cf on the mynetworks
fixed it, now runs fine.

Last edited by alexnbk; 17th April 2010 at 05:43.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Relay access denied maxx Installation/Configuration 17 4th April 2011 12:34
Access denied in phpMyAdmin linuxfast General 1 21st September 2005 16:08
Access Denied on Port: 81 nandhu Installation/Configuration 2 10th August 2005 14:05


All times are GMT +2. The time now is 03:01.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.