virtual and lmtp for virtual hosting

From: Ethariel (no email)
Date: Fri May 25 2007 - 05:32:54 EDT

  • Next message: Rocco Scappatura: "RE: Still problems.."


    I'm using postfix 2.3.3 on Mandriva 2007.
    I've setup virtual hosting using LDAP.
    All is working fine with postfix+courier-imap+courier-pop+saslauthd

    The transport is set to virtual, postfix receive the message, virtual
    process write in (maildir format) in the correct place.

    Now I need to replace courier-imap with cyrus-imap (to use sieve and to
    integrate EgroupWare full solution).
    cyrus-imap use ltmp.

    I remove transport_map = virtual

    I use ldap request to obtain 'virtual_mailbox_domains' with all my virtual
    virtual_transport is set to 'cyrus', which is defind in as lmtp
    unix socket.

    mydestination is set to 'localhost' only

    Now when I send an email to a virtual user
    smtpd accept the connection, pass it to cleanup, then to qmgr, the to lmtp.
    But then lmtp says :

    status=bounced (Host or domain name not found. Name service error for name= type=A: Host not found)

    (the mail was sent to )

    If I create another virtual domain existing on internet (for example, then LMTP try to connect to the real server.

    It seems LMTP use dns resolution (and only DNS as I use /etc/hosts to
    indicate the real ip (not loopback) for Why doesn't it
    delivery the mail locally ?

    If I go back to 'transport_map=virtual' (even when keeping
    'virtual_transport = cyrus'), then smtpd accepts the connection, passes it
    to cleanup, qmgr, the virtual and the mail is delivered into Maildir.

    Here is a short part of (I've only removed the ldap request to make
    it short) :

    readme_directory = /usr/share/doc/postfix-2.1.0/README_FILES
    sample_directory = /usr/share/doc/postfix-2.1.0/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    command_directory = /usr/sbin
    manpage_directory = /usr/share/man
    daemon_directory = /usr/lib/postfix
    newaliases_path = /usr/bin/newaliases.postfix
    mailq_path = /usr/bin/mailq.postfix
    queue_directory = /var/spool/postfix
    mail_owner = postfix
    mynetworks_style = host
    delay_warning_time = 4h
    smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Mandrake Linux)
    unknown_local_recipient_reject_code = 450
    smtp-filter_destination_concurrency_limit = 2
    lmtp-filter_destination_concurrency_limit = 2
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,
    smtpd_sasl_security_options = noanonymous
    smtpd_sasl_local_domain = $myhostname

    smtpd_use_tls = yes
    smtpd_tls_auth_only = yes
    smtpd_tls_key_file = /etc/postfix/ssl/cert.key
    smtpd_tls_cert_file = /etc/postfix/ssl/cert.crt
    smtpd_tls_CAfile = /etc/postfix/ssl/cert.pem
    smtpd_tls_loglevel = 3
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom

    home_mailbox = Maildir/

    #transport_maps = ldap:transport
    mydestination = localhost

    virtual_mailbox_domains = ldap:domain

    virtual_transport = cyrus

    virtual_uid_maps = static:800
    virtual_gid_maps = static:800
    virtual_mailbox_base = /home/vmail/domains
    virtual_mailbox_maps = ldap:accounts
    virtual_maps = ldap:aliases, ldap:accountsmap

    local_recipient_maps = $alias_maps unix:passwd.byname $virtual_mailbox_maps

    Thsks a lot for any help,
    I'm stuck on that for three full days and really can't find any more hint in
    doc files, or example conf on google.


  • Next message: Rocco Scappatura: "RE: Still problems.."

    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs

    Powered By FreeBSD   Powered By FreeBSD