Postfix virtual hosting

Discussion in 'HOWTO-Related Questions' started by TheRealWaldo, Dec 3, 2007.

  1. TheRealWaldo

    TheRealWaldo New Member

    I've followed the above tutorial and got postfix/dovecot with Mailscanner functioning. I however, have one issue, as this will not be used for local mail only (as the configuration in the howto suggest), and need to be able to allow relaying by authenticated users (on infinite public networks).

    I have sasl working with smtpd, and it will allow me to authenticate with actual unix users (listed in /etc/passwd), but I cannot seem to get it to work with virtual users.

    I have been able to locate plenty of tutorials showing how to get sasl/smtpd to work with mysql based configurations, but none with the flat file system that this tutorial uses. Can anyone make a suggestion as to what needs to be configured to allow these virtual users to authenticate with smtpd, and how?

  2. falko

    falko Super Moderator ISPConfig Developer

    Do you have any errors in your mail log?
  3. TheRealWaldo

    TheRealWaldo New Member

    No errors, just auth failure. As it's checking against actual unix users, and not virtual users like I want it to.

  4. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/postfix/
  5. TheRealWaldo

    TheRealWaldo New Member

    Current is a hodge-podge of attempts and suggestions from other people. I have replaced the domain names with domain1 and domain2

    This currently functions in every respect, other than SMTP authentication only works for actual unix users, instead of the virtual users that I want it to.

    (result of postconf -n follows)
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    broken_sasl_auth_clients = yes
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/libexec/postfix
    debug_peer_level = 2
    header_checks = regexp:/etc/postfix/header_checks
    html_directory = no
    inet_interfaces = $myhostname, localhost
    local_recipient_maps = $virtual_mailbox_maps
    local_transport = local
    mail_owner = postfix
    mail_spool_directory = /var/spool/mail
    mailbox_size_limit = 104857600
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    masquerade_classes = envelope_sender, envelope_recipient, header_sender, header_recipient
    masquerade_domains = domain1 domain2
    message_size_limit = 20971520
    mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost
    mydomain = domain1
    myhostname = mail.domain1
    mynetworks_style = host
    myorigin = $mydomain
    newaliases_path = /usr/bin/newaliases.postfix
    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
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix-2.2.10/README_FILES
    relay_domains = $mydestination
    sample_directory = /usr/share/doc/postfix-2.2.10/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/saslpasswd
    smtp_sasl_security_options = noanonymous
    smtpd_helo_required = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_hostname, reject_rbl_client, reject_rbl_client, reject_rbl_client, reject_rbl_client
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain =
    smtpd_sasl_security_options = noanonymous
    unknown_local_recipient_reject_code = 550
    virtual_alias_domains =
    virtual_alias_maps = hash:/etc/postfix/valias.txt
    virtual_gid_maps = static:1000
    virtual_mailbox_base = /var/spool/vhosts
    virtual_mailbox_domains = hash:/etc/postfix/vhosts.txt
    virtual_mailbox_maps = hash:/etc/postfix/vmaps.txt
    virtual_transport = virtual
    virtual_uid_maps = static:1000
  6. falko

    falko Super Moderator ISPConfig Developer

    In that case I'd try to rebuild the server following the "Virtual Users And Domains With Postfix, Courier And MySQL" tutorials from
  7. TheRealWaldo

    TheRealWaldo New Member

    I don't wish to use mysql at all.


Share This Page