Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 5th December 2009, 00:06
voltron81 voltron81 is offline
Senior Member
 
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
Default "Relay access denied" when I relay emails from a local mailserver to the main one

Hi to everybody.
When I try to relay emails from a local mailserver to the main mailserver, I have a "Relay access denied" issue...

I've created the local mailserver using this howto: http://www.howtoforge.org/virtual_us...ix_debian_etch and adding as relayhost the main mailserver.

In the main mailserver, created with perfect server ISPConfig 3, I've this parameters of postfix:
Code:
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
and of couse mynetworks is 127.0.0.0/8 [::1]/128
So I guess I need a sasl authenticated, or maybe I've to write some value in the database mail_access.

The local mailserver is not on a static Ip, so I can not just allow to use an IP (and in this case there will be more than one local mailserver, in different locations, that want to relay emails to the main mailserver.

Any suggestion?
Do I need to setup a SASL authentication between the local mailserver and the main mailserver? In this case, how to do it?

Thanks
Michele
Reply With Quote
Sponsored Links
  #2  
Old 5th December 2009, 08:45
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

this should help

http://www.postfix.org/SASL_README.html#client_sasl
http://www.topdog.za.net/tips#postfi...as_a_smarthost
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #3  
Old 7th December 2009, 10:36
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,146
Thanks: 4
Thanked 55 Times in 51 Posts
Default

that's how I setup email relay with a postfix server on a dyn ip:

http://www.simplylinux.ch/relay-emai...postfix-server

with google translate it shouldn't be a big deal to follow it.

I think I could add it also as little howto here.
__________________
"Common sense is not as common as commonly believed" by sjau

Auto-Install Script for ISPConfig and Horde on a Vanilla Debian Stable

Need more Repos for Ubuntu? Repository Generator
Need more Repos for Debian? Debian Repository Generator
Reply With Quote
  #4  
Old 8th December 2009, 11:29
voltron81 voltron81 is offline
Senior Member
 
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
Default

Ok thanks guys, i think I've solved.
Basically I've added in the main.cf this lines:
Code:
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_type = cyrus
smtp_sasl_security_options = noanonymous
The strange thing is that in the sasl_passwd I've write the account details of just an email, like this:
Code:
[mail.domain.com]   test@domain.com:password
And now I can relay also the emails of the other emails of the same domain (like user@domain.com, user1@domain.com, etc...)

Is it normal?

Cheers
Michele
Reply With Quote
  #5  
Old 8th December 2009, 11:31
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
 
Default

Of course that is normal, that is what "relaying" means, "transmitting mail which is not destined for the host running the mta"
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
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 when using SMTP to external recipients Kamran Shah Installation/Configuration 111 14th May 2014 18:10
Need help get mail to work (can't recieve and apperently can't send) omega13a Installation/Configuration 19 20th August 2009 21:06
relay access denied with virtual emails setup in mysql tkaman2 Server Operation 22 2nd January 2008 22:34
Set Up Postfix For Relaying Emails Through Another Mailserver pcotter Installation/Configuration 1 17th July 2007 17:24
postfix Relay access denied Jshel Installation/Configuration 4 30th March 2007 05:15


All times are GMT +2. The time now is 02:54.


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