Postfix cannot relay emails from other domains

Discussion in 'Server Operation' started by dalitso, Jun 2, 2009.

  1. dalitso

    dalitso New Member

    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 [email protected] it sends but not [email protected])

    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.
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Please enable "Server requires authentication" in your email client.
     
  3. dalitso

    dalitso New Member

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

    Jun 3 16:55:53 dalitso postfix/smtp[19484]: 73C9E2A58F: to=<[email protected]>, 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 [[email protected]] 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=<[email protected]>
    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
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Your relay server seems to blacklist Gmail addresses...
     
  5. dalitso

    dalitso New Member

    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?
     
  6. dalitso

    dalitso New Member

    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
     
  7. falko

    falko Super Moderator ISPConfig Developer

  8. dalitso

    dalitso New Member

    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?
     
  9. falko

    falko Super Moderator ISPConfig Developer

    All email addresses.
     

Share This Page