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 2nd June 2009, 19:45
dalitso dalitso is offline
Member
 
Join Date: Nov 2008
Location: South Africa
Posts: 43
Thanks: 3
Thanked 4 Times in 3 Posts
Send a message via Skype™ to dalitso
Default Postfix cannot relay emails from other domains

I have a machine running Ubuntu server 8.04 with all the services I configured running ok. I use webmin to do my configurations and also have a dyndns hostname for the server. I can send and receive emails with postfix on the server.

I have a client machine which has Thunderbird setup to send and receive mail through the server. The problem is that, I can only relay emails from my dyndns hostname only. I cannot send other domain emails like gmail ( if I setup the from email in thunderbird as me@mydyndns.com it sends but not me@gmail.com)

Someone told me this is because by default ubuntu server is not an open relay server. Is there a way I can allow certain domains to send emails through?

Your help will be appreciated.
Reply With Quote
Sponsored Links
  #2  
Old 3rd June 2009, 16:46
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,703 Times in 2,546 Posts
Default

Please enable "Server requires 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
  #3  
Old 3rd June 2009, 17:31
dalitso dalitso is offline
Member
 
Join Date: Nov 2008
Location: South Africa
Posts: 43
Thanks: 3
Thanked 4 Times in 3 Posts
Send a message via Skype™ to dalitso
Default

Still not workinh. Here's error from my mail system log

Jun 3 16:55:53 dalitso postfix/smtp[19484]: 73C9E2A58F: to=<martin@martinology.co.za>, relay=smtp.isdsl.net[196.26.208.197]:25, delay=181, delays=0.02/0.01/1/180, dsn=5.0.0, status=bounced (host smtp.isdsl.net[196.26.208.197] said: 550-Service unavailable; Sender address [dalitsomaosa@gmail.com] blocked using 550 sdom.bl.isdsl.net ; Access denied (in reply to RCPT TO command))
Jun 3 16:55:53 dalitso postfix/cleanup[19540]: 939EB2A5C5: message-id=<20090603145553.939EB2A5C5@dalitso.mine.nu>
Jun 3 16:55:53 dalitso postfix/qmgr[6742]: 939EB2A5C5: from=<>, size=2624, nrcpt=1 (queue active)
Jun 3 16:55:53 dalitso postfix/bounce[19539]: 73C9E2A58F: sender non-delivery notification: 939EB2A5C5
Jun 3 16:55:53 dalitso postfix/qmgr[6742]: 73C9E2A58F: removed
Reply With Quote
  #4  
Old 4th June 2009, 17:27
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,703 Times in 2,546 Posts
Default

Quote:
Originally Posted by dalitso View Post
Still not workinh. Here's error from my mail system log

Jun 3 16:55:53 dalitso postfix/smtp[19484]: 73C9E2A58F: to=<martin@martinology.co.za>, relay=smtp.isdsl.net[196.26.208.197]:25, delay=181, delays=0.02/0.01/1/180, dsn=5.0.0, status=bounced (host smtp.isdsl.net[196.26.208.197] said: 550-Service unavailable; Sender address [dalitsomaosa@gmail.com] blocked using 550 sdom.bl.isdsl.net ; Access denied (in reply to RCPT TO command))
Your relay server seems to blacklist Gmail addresses...
__________________
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 4th June 2009, 18:44
dalitso dalitso is offline
Member
 
Join Date: Nov 2008
Location: South Africa
Posts: 43
Thanks: 3
Thanked 4 Times in 3 Posts
Send a message via Skype™ to dalitso
Default

Not only gmail addressess, any address other than my dyndns address. Only my dyndns address can be relayed. I have also tried other relay servers but they are still blocking.

How can I solve this?
Reply With Quote
  #6  
Old 8th June 2009, 13:26
dalitso dalitso is offline
Member
 
Join Date: Nov 2008
Location: South Africa
Posts: 43
Thanks: 3
Thanked 4 Times in 3 Posts
Send a message via Skype™ to dalitso
Default

Here's my postfix main.cf


smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no


# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost.mine.nu., localhost, dalitso.mine.nu
relayhost = smtp.isdsl.net
mailbox_command = procmail -a $EXTENSION
mailbox_size_limit = 0
recipient_delimiter = +
virtual_alias_maps = hash:/etc/postfix/virtual
mail_spool_directory = /var/spool/mail
home_mailbox = Maildir/
mynetworks = 192.168.1.0/24 127.0.0.0/8 192.168.0.0/24
Reply With Quote
  #7  
Old 9th June 2009, 16:29
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,703 Times in 2,546 Posts
Default

You might have to use authentication for the relayhost - see http://www.howtoforge.com/postfix_re...her_mailserver
__________________
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 User Says Thank You to falko For This Useful Post:
dalitso (9th June 2009)
  #8  
Old 9th June 2009, 21:06
dalitso dalitso is offline
Member
 
Join Date: Nov 2008
Location: South Africa
Posts: 43
Thanks: 3
Thanked 4 Times in 3 Posts
Send a message via Skype™ to dalitso
Default

Thanks alot Falko, using authentication for the relayhost works!

I was just wondering though, is this method supposed to make all email addresses relayable or only the one belonging to the authenticated user name and password? I noticed I can now relay my dyndns email address and the one I setup the authentication for but not the gmail address. My email I authenticate belongs to a different ISP from the one my adsl is subscribed to and I don't use my adsl ISP smtp. Can this be the reason?
Reply With Quote
  #9  
Old 10th June 2009, 16:37
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,703 Times in 2,546 Posts
 
Default

Quote:
Originally Posted by dalitso View Post
I was just wondering though, is this method supposed to make all email addresses relayable or only the one belonging to the authenticated user name and password?
All email addresses.
__________________
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
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
Postfix not responding to telnet CarbonCopy Server Operation 6 8th May 2009 05:39
Undelivered Mail Returned to Sender Error202 General 5 7th May 2009 11:14
localhost postfix/master: fatal: bind 127.0.0.1 port 125: Permission denied g18c Installation/Configuration 4 24th March 2009 17:39
Help configure Postfix to use alt port 465 or 587 BoloMarkIII Installation/Configuration 10 16th March 2009 17:57
CentoS doesn't send the emails vaio1 Installation/Configuration 18 5th November 2008 17:51


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


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