Mail problems - Loop & Relay

Discussion in 'Installation/Configuration' started by yap, Nov 12, 2005.

  1. yap

    yap New Member

    Hallo,

    I have Suse 9.2 running on my server a long time. Yesterday I installed ISPConfig and it runs very good. Before I installed ISPConfig I followed the install guide for Suse 9.2. But now I have two problems with my mails:

    Problem 1: I can't send mails from an external pc over SMTP to an external mail address. In the mail program I get an error that Relaying is not allowed. In the mail.log stands this:

    Code:
    Nov 12 18:44:05 linux postfix/smtpd[28079]: connect from x.y.z[x.y.z]
    Nov 12 18:44:05 linux postfix/smtpd[28079]: NOQUEUE: reject: RCPT from x.y.z[x.y.z]: 554 <me@gmx.de>: Relay access denied; from=<info@example.com> to=<me@gmx.de> proto=SMTP helo=<PC1>
    Nov 12 18:44:05 linux postfix/smtpd[28079]: disconnect from x.y.z[x.y.z]
    
    Problem 2: I also installed the webmail interface for testing. Sending to an external mail adress is no problem. If i send an email to my local or to another local mail address then I get this:

    Code:
    Nov 12 18:54:58 linux postfix/smtp[28261]: 6ED992B825: to=<info@example.com>, relay=none, delay=0, status=bounced (mail for example.com loops back to myself)
    Nov 12 18:54:58 linux postfix/cleanup[28260]: B29D92B875: message-id=<20051112175458.B29D92B875@server1.mydomain.de>
    Nov 12 18:54:58 linux postfix/qmgr[26121]: B29D92B875: from=<>, size=2517, nrcpt=1 (queue active)
    Nov 12 18:54:58 linux postfix/qmgr[26121]: 6ED992B825: removed
    Nov 12 18:54:59 linux postfix/smtp[28261]: B29D92B875: to=<info@example.com>, relay=none, delay=1, status=bounced (mail for example.com loops back to myself)
    Nov 12 18:54:59 linux postfix/qmgr[26121]: B29D92B875: removed
    What is wrong?

    Thanks!
     
  2. till

    till Super Moderator

    Problem 1) You have to enable SMTP-Auth in your email client. In outlook this option is named like smtp server needs authentication.

    Problem 2) Put the domain that loops back (example.com) at the end of the

    /etc/postfix/local-host-names

    file and then restart postfix

    /etc/init.d/postfix restart
     
  3. yap

    yap New Member

    Thank you till,

    I tested the sending of mails with Outlook Express and Thunderbird. In Outlook I checked the opton "SMTP server needs authentication". On Thunderbird I use "Use username and password". But the problem is still the same.

    The domain is already in /etc/postfix/local-host-names.

    It's very strange?! Any other ideas? I searched the forum already but I still haven't found anything like that.

    Perhaps it's easier when I show my /etc/postfix/main.cf:

    Code:
    mydomain = anotherdomain.de
    myhostname = server1.$mydomain
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    inet_interfaces = all
    alias_maps = hash:/etc/aliases
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtpd_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
     
  4. falko

    falko Super Moderator

    No, that can't be!:confused:
    Please post the exact error message from your mail log and the contents of /etc/postfix/local-host-names, and don't replace the real domain names with example.com.
     
  5. yap

    yap New Member

    Ok here is my /etc/postfix/local-host-names:

    Code:
    ###################################
    #
    # ISPConfig local-host-names Configuration File
    #         Version 1.0
    #
    ###################################
    localhost
    server1.domain1.de
    localhost.server1.domain1.de
    localhost.domain1.de
    www.domain2.de
    domain2.de
    #### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
    server1
    domain1.de
    
    and here the /etc/postfix/main.cf again:

    Code:
    mydomain = domain1.de
    myhostname = server1.$mydomain
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    inet_interfaces = all
    alias_maps = hash:/etc/aliases
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtpd_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    
    In Yast under network I have server1 as host name and domain1.de as domain name.

    And here the error if I send an email from info(at)domain2.de to mail(at)domain2.de over the webinterface:

    Code:
    Nov 12 20:52:44 linux postfix/smtpd[1697]: connect from localhost[127.0.0.1]
    Nov 12 20:52:44 linux postfix/smtpd[1697]: 580C085FE: client=localhost[127.0.0.1]
    Nov 12 20:52:44 linux postfix/cleanup[1700]: 580C085FE: message-id=<20051112195244.580C085FE@server1.domain1.de>
    Nov 12 20:52:44 linux postfix/qmgr[1454]: 580C085FE: from=<info@domain2.de>, size=793, nrcpt=1 (queue active)
    Nov 12 20:52:44 linux postfix/smtpd[1697]: disconnect from localhost[127.0.0.1]
    Nov 12 20:52:44 linux pop3d: Connection, ip=[::ffff:127.0.0.1]
    Nov 12 20:52:44 linux pop3d: LOGIN, user=web3_domain21, ip=[::ffff:127.0.0.1]
    Nov 12 20:52:44 linux pop3d: LOGOUT, user=web3_domain21, ip=[::ffff:127.0.0.1], top=0, retr=0
    Nov 12 20:52:44 linux postfix/smtp[1701]: 580C085FE: to=<mail@domain2.de>, relay=none, delay=0, status=bounced (mail for domain2.de loops back to myself)
    Nov 12 20:52:44 linux postfix/cleanup[1700]: 8F10E2A0FE: message-id=<20051112195244.8F10E2A0FE@domain1.de>
    Nov 12 20:52:44 linux postfix/qmgr[1454]: 8F10E2A0FE: from=<>, size=2620, nrcpt=1 (queue active)
    Nov 12 20:52:44 linux postfix/qmgr[1454]: 580C085FE: removed
    Nov 12 20:52:44 linux postfix/smtp[1701]: 8F10E2A0FE: to=<info@domain2.de>, relay=none, delay=0, status=bounced (mail for domain2.de loops back to myself)
    Nov 12 20:52:44 linux postfix/qmgr[1454]: 8F10E2A0FE: removed
    And I get this error when I send mail from Outlook (Server need authentication is activated!):

    Code:
    Nov 12 20:55:58 linux postfix/smtpd[1739]: connect from p85.212.28.183.tisdip.tiscali.de[85.212.28.183]
    Nov 12 20:56:00 linux postfix/smtpd[1739]: NOQUEUE: reject: RCPT from p85.212.28.183.tisdip.tiscali.de[85.212.28.183]: 554 <mail@domain2.de>: Relay access denied; from=<info@domain2.de> to=<mail@domain2.de> proto=SMTP helo=<PC1>
    Nov 12 20:56:00 linux postfix/smtpd[1739]: disconnect from p85.212.28.183.tisdip.tiscali.de[85.212.28.183]
     
    Last edited: Dec 20, 2005
  6. falko

    falko Super Moderator

    Please put the following two lines into /etc/postfix/main.cf and restart Postfix:

    Code:
    virtual_maps = hash:/etc/postfix/virtusertable
    mydestination = /etc/postfix/local-host-names
     
  7. yap

    yap New Member

    now it works! :) thank you very much
     

Share This Page