Debian Sqeeuze virtual users and domains with postfix... Postfix problem.

Discussion in 'Server Operation' started by knology, Mar 17, 2011.

  1. knology

    knology New Member

    Hello,

    I've just followed this tutorial:

    http://www.howtoforge.com/virtual-u...courier-mysql-and-squirrelmail-debian-squeeze

    Code:
    hostname:
    neptune.domain1.nl
    hostname -f:
    neptune.domain1.nl
    users:
    bknol@domain1.nl
    bknol@domain2.nl

    I've send a welcome mail to these 2 users to create a mailbox, but i won't work for domain1.nl

    Code:
    ls /var/vmail:
    domain2.nl
    Send a testmail:

    Code:
    root@neptune:/home/bknol# mailx bknol@domain1.nl
    Subject: Test
    TESTT
    Cc: 
    cat /var/mail/bknol
    Code:
    From MAILER-DAEMON  Thu Mar 17 14:16:31 2011
    Return-Path: <>
    X-Original-To: root@neptune.domain1.nl
    Delivered-To: root@neptune.domain1.nl
    Received: by neptune.domain1.nl (Postfix)
    	id 450A4CE1CA; Thu, 17 Mar 2011 14:16:31 +0100 (CET)
    Date: Thu, 17 Mar 2011 14:16:31 +0100 (CET)
    From: MAILER-DAEMON@neptune.domain1.nl (Mail Delivery System)
    Subject: Undelivered Mail Returned to Sender
    To: root@neptune.domain1.nl
    Auto-Submitted: auto-replied
    MIME-Version: 1.0
    Content-Type: multipart/report; report-type=delivery-status;
    	boundary="2136BCE14F.1300367791/neptune.domain1.nl"
    Content-Transfer-Encoding: 7bit
    Message-Id: <20110317131631.450A4CE1CA@neptune.domain1.nl>
    
    This is a MIME-encapsulated message.
    
    --2136BCE14F.1300367791/neptune.domain1.nl
    Content-Description: Notification
    Content-Type: text/plain; charset=us-ascii
    
    This is the mail system at host neptune.domain1.nl.
    
    I'm sorry to have to inform you that your message could not
    be 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 can
    delete your own text from the attached returned message.
    
                       The mail system
    
    <bknol@domain1.nl>: mail for smtp.domain2.nl loops back to myself
    
    --2136BCE14F.1300367791/neptune.domain1.nl
    Content-Description: Delivery report
    Content-Type: message/delivery-status
    
    Reporting-MTA: dns; neptune.domain1.nl
    X-Postfix-Queue-ID: 2136BCE14F
    X-Postfix-Sender: rfc822; root@neptune.domain1.nl
    Arrival-Date: Thu, 17 Mar 2011 14:16:31 +0100 (CET)
    
    Final-Recipient: rfc822; bknol@domain1.nl
    Original-Recipient: rfc822;bknol@domain1.nl
    Action: failed
    Status: 5.4.6
    Diagnostic-Code: X-Postfix; mail for smtp.domain2.nl loops back to myself
    
    --2136BCE14F.1300367791/neptune.domain1.nl
    Content-Description: Undelivered Message
    Content-Type: message/rfc822
    Content-Transfer-Encoding: 7bit
    
    Return-Path: <root@neptune.domain1.nl>
    Received: from localhost (localhost.localdomain [127.0.0.1])
    	by neptune.domain1.nl (Postfix) with ESMTP id 2136BCE14F
    	for <bknol@domain1.nl>; Thu, 17 Mar 2011 14:16:31 +0100 (CET)
    X-Virus-Scanned: Debian amavisd-new at neptune.domain1.nl
    Received: from neptune.domain1.nl ([127.0.0.1])
    	by localhost (neptune.domain1.nl [127.0.0.1]) (amavisd-new, port 10024)
    	with ESMTP id Nbgidj12BOkm for <bknol@domain1.nl>;
    	Thu, 17 Mar 2011 14:16:28 +0100 (CET)
    Received: by neptune.domain1.nl (Postfix, from userid 0)
    	id B60D4CE1C9; Thu, 17 Mar 2011 14:16:28 +0100 (CET)
    To: bknol@domain1.nl
    Subject: Test
    Message-Id: <20110317131628.B60D4CE1C9@neptune.domain1.nl>
    Date: Thu, 17 Mar 2011 14:16:28 +0100 (CET)
    From: root@neptune.domain1.nl (root)
    
    TESTT
    
    --2136BCE14F.1300367791/neptune.domain1.nl--
    I think this is the problem:
    mail for smtp.domain2.nl loops back to myself

    In my main.cf from postfix i have the following.
    Code:
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    content_filter = amavis:[127.0.0.1]:10024
    html_directory = /usr/share/doc/postfix/html
    inet_interfaces = all
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    mydestination = neptune.domain1.nl, localhost, localhost.localdomain
    myhostname = neptune.domain1.nl
    mynetworks = 127.0.0.0/8
    myorigin = /etc/mailname
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
    readme_directory = /usr/share/doc/postfix
    receive_override_options = no_address_mappings
    recipient_delimiter = +
    relayhost = smtp.upcmail.nl
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtpd_use_tls = yes
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_alias_domains = 
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /home/vmail
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_uid_maps = static:5000
    so that was a lot of information. By the way, bknol@domain2.nl works good (sending and receiving). Can anyone help me with this problem??

    Bart Knol
     
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Please add smtp.domain2.nl to the mydestination line in /etc/postfix/main.cf and restart Postfix.
     
  3. knology

    knology New Member

    Thank you for support,

    I've solved my problem by removing smtp.domain1.nl from my transport record in my mysql database. Now i have a second problem, when i send a mail, it comes always about one hour later on destination. Can you help me with that?

    Bart Knol
     
  4. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Please check the mail logs on both servers.
     

Share This Page