Postfix loops back to myself?

Discussion in 'Server Operation' started by PatrickAdrichem, Jul 4, 2008.

  1. PatrickAdrichem

    PatrickAdrichem New Member

    I seem to be getting the following message in my log

    Code:
    /var/log/maillog
    
    Jul  4 18:27:48 www postfix/smtp[2131]: 5A9A980556: to=<****@adrichem.nu>, relay=none, delay=0.02, delays=0.01/0/0.01/0, dsn=5.4.6, status=bounced (mail for mail.adrichem.nu loops back to myself)

    my config says:
    which i thought would be ok since mail.adrichem.nu is within my destination

    i'm running fedora 9, used the fedora 8 guide here, but changed it with fedora 9 stuff, got courier, amavis, spamassasin, postfix mysql setup.

    Code:
    /etc/postfix/main.cf
    
    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/libexec/postfix
    mail_owner = postfix
    myhostname = mail.adrichem.nu
    mydomain = adrichem.nu
    myorigin = $mydomain
    inet_interfaces = all
    mydestination = $myhostname, www.$mydomain, localhost, localhost.localdomain, mail.adrichem.nu
    unknown_local_recipient_reject_code = 550
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    debug_peer_level = 2
    debugger_command =
             PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
             xxgdb $daemon_directory/$process_name $process_id & sleep 5
    sendmail_path = /usr/sbin/sendmail.postfix
    newaliases_path = /usr/bin/newaliases.postfix
    mailq_path = /usr/bin/mailq.postfix
    setgid_group = postdrop
    html_directory = no
    manpage_directory = /usr/share/man
    sample_directory = /usr/share/doc/postfix-2.4.5/samples
    readme_directory = /usr/share/doc/postfix-2.4.5/README_FILES
    mynetworks = 127.0.0.0/8
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /home/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    smtpd_use_tls = yes
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_create_maildirsize = yes
    virtual_mailbox_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_do$
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
     
    Last edited: Jul 4, 2008
  2. Hans

    Hans Moderator Moderator HowtoForge Supporter ISPConfig Developer

    Within ISPConfig, on the basis tab of your web, you must have:

    www for the hostname
    adrichem.nu fot the domainname

    On the co-domain tab you must have adrichem.nu (without www) do you have that?
     
  3. PatrickAdrichem

    PatrickAdrichem New Member

    Where can I confirm that, I don't have a GUI.
    fully text-based.
     
  4. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Set mydomain to mail.adrichem.nu and restart postfix.
     
  5. PatrickAdrichem

    PatrickAdrichem New Member

    Same answers.

    here is the full message report.

    Code:
    Jul  4 22:02:47 www postfix/qmgr[4050]: CA03A8054A: from=<****@hotmail.com>, size=1795, nrcpt=1 (queue active)
    Jul  4 22:02:47 www amavis[2027]: (02027-11) Passed CLEAN, [65.54.246.139] [65.55.154.54] <****@hotmail.com> -> <****@adrichem.nu>, Message-ID: <BAY143-W1989772BC59EB0185B39A8FB9B0@phx.gbl>, $
    Jul  4 22:02:47 www postfix/smtp[4061]: 5630280549: to=<****@adrichem.nu>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.7, delays=0.55/0.01/0/1.1, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as CA03A8054A)
    Jul  4 22:02:47 www postfix/qmgr[4050]: 5630280549: removed
    Jul  4 22:02:47 www postfix/smtp[4067]: CA03A8054A: to=<****@adrichem.nu>, relay=none, delay=0.04, delays=0.02/0.03/0/0, dsn=5.4.6, status=bounced (mail for mail.adrichem.nu loops back to myself)
    Jul  4 22:02:47 www postfix/cleanup[4060]: D6DE98054C: message-id=<20080704200247.D6DE98054C@mail.adrichem.nu>
    Jul  4 22:02:47 www postfix/qmgr[4050]: D6DE98054C: from=<>, size=3666, nrcpt=1 (queue active)
    Jul  4 22:02:47 www postfix/bounce[4068]: CA03A8054A: sender non-delivery notification: D6DE98054C
    Jul  4 22:02:47 www postfix/qmgr[4050]: CA03A8054A: removed
    Jul  4 22:02:49 www postfix/smtp[4067]: D6DE98054C: to=<****@hotmail.com>, relay=mx4.hotmail.com[65.54.244.104]:25, delay=1.3, delays=0/0/0.54/0.75, dsn=2.0.0, status=sent (250  <20080704200247.$
    Jul  4 22:02:49 www postfix/qmgr[4050]: D6DE98054C: removed
    
     
  6. PatrickAdrichem

    PatrickAdrichem New Member

    Btw, my bounce message is as follows:

    Code:
    This is the mail system at host mail.adrichem.nu. I'm sorry to have to inform you that your message could notbe delivered to one or more recipients. It's attached below. For further assistance, please send mail to postmaster. If you do so, please include this problem report. You candelete your own text from the attached returned message.                    The mail system <****@adrichem.nu>: mail for mail.adrichem.nu loops back to myself
    
    attached txt file
    Code:
    Reporting-MTA: dns; mail.adrichem.nu
    X-Postfix-Queue-ID: CA03A8054A
    X-Postfix-Sender: rfc822; ****@hotmail.com
    Arrival-Date: Fri,  4 Jul 2008 22:02:47 +0200 (CEST)
    
    Final-Recipient: rfc822; ****@adrichem.nu
    Original-Recipient: rfc822;****@adrichem.nu
    Action: failed
    Status: 5.4.6
    Diagnostic-Code: X-Postfix; mail for mail.adrichem.nu loops back to myself
    
     
  7. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Please try to add mail.adrichem.nu to the domains table.
     
  8. PatrickAdrichem

    PatrickAdrichem New Member

    Already tried that too.
     
  9. PatrickAdrichem

    PatrickAdrichem New Member

    Fixed it!

    In the guide for fedora 8 it said to enter into the transport table:

    http://www.howtoforge.com/virtual-users-and-domains-postfix-courier-mysql-fedora8-p5

    INSERT INTO `transport` (`domain`, `transport`) VALUES ('example.com', 'smtp:mail.example.com');



    It says it IF you want to fil it, it should look like this, but a fast copyer reader like me missed that part so there it went into an infinite loop. and that made it die.
    figured it out when i was matching my config to my old servers config, and noticed i never used that table!

    My tip to the guide, put a red note with it ;)

    thnx a lot for all your help guys! =)
     
    Last edited: Jul 5, 2008
  10. PatrickAdrichem

    PatrickAdrichem New Member

    Oh btw one more question, or should i make a new topic for this.

    Is it possible to let postfix authenticate users first before allowing to relay e-mails (outside domain)?
    currently its localhost. but it would be nice if i could also add a second security of authenticating
     
  11. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    That's the default for the tutorial you used.
     
  12. PatrickAdrichem

    PatrickAdrichem New Member

    I see, that made me check my log files,
    sasl gives the following error:

    Jul 5 11:26:14 www postfix/smtpd[8858]: warning: SASL authentication failure: could not verify password
    Jul 5 11:26:14 www postfix/smtpd[8858]: warning: j238251.upc-j.chello.nl[my-home-ip]: SASL LOGIN authentication failed: generic failure
     
  13. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Please do this:
    Code:
    adduser postfix sasl
    /etc/init.d/postfix restart
    /etc/init.d/saslauthd start
     
  14. PatrickAdrichem

    PatrickAdrichem New Member

    Code:
    Jul  6 13:20:31 www postfix/smtpd[8104]: disconnect from j238251.upc-j.chello.nl[24.132.238.251]
    Jul  6 13:20:35 www postfix/smtpd[8104]: connect from j238251.upc-j.chello.nl[24.132.238.251]
    Jul  6 13:20:35 www authdaemond: received auth request, service=smtp, authtype=login
    Jul  6 13:20:35 www authdaemond: authmysql: trying this module
    Jul  6 13:20:35 www authdaemond: failed to connect to mysql server (server=localhost, userid=mail_admin): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    Jul  6 13:20:35 www authdaemond: authmysql: TEMPFAIL - no more modules will be tried
    Jul  6 13:20:35 www postfix/smtpd[8104]: warning: SASL authentication failure: could not verify password
    Jul  6 13:20:35 www postfix/smtpd[8104]: warning: j238251.upc-j.chello.nl[24.132.238.251]: SASL LOGIN authentication failed: generic failure
    Jul  6 13:20:35 www postfix/smtpd[8104]: lost connection after AUTH from j238251.upc-j.chello.nl[24.132.238.251]
    Jul  6 13:20:35 www postfix/smtpd[8104]: disconnect from j238251.upc-j.chello.nl[24.132.238.251]
    

    Eventough MySql is running and Pop3 does succesfully auth..

    if i check /var/lib/mysql though it does not exist
    when i say

    Code:
    [root@www p.adrichem]# locate mysql.sock
    /usr/local/mysql/tmp/mysql.socket
    
    should i make a symbolic link to it?
     
  15. PatrickAdrichem

    PatrickAdrichem New Member

    Thnx for the help fixed it added:

    MYSQL_SOCKET to: /etc/authlib/authmysqlrc
     

Share This Page