howto setup a local domain mail addresses on a postfix with virtual users ?

Discussion in 'HOWTO-Related Questions' started by cccc, Oct 9, 2006.

  1. cccc

    cccc New Member


    I've setuped virtual users and domains with Postfix according to this manual:

    I'm using Squirrelmail version 1.4.4 and it works well for the virtual users, but local domain users cannot access to their mailboxes.

    howto setup a local domain and local domain mail addresses on a postfix with virtual users and domains ?

    # postconf -n
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    broken_sasl_auth_clients = yes
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/lib/postfix
    disable_vrfy_command = yes
    inet_interfaces = all
    mail_owner = postfix
    mailbox_command =
    mydestination = $myhostname, localhost.$mydomain, $mydomain localhost.localdomain
    mydomain =
    myhostname =
    mynetworks = 202.X.X.0/28 
    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
    recipient_delimiter = +
    relayhost =
    smtp_sasl_auth_enable = no
    smtpd_banner = $myhostname ESMTP Mailserver
    smtpd_client_restrictions = reject_invalid_hostname, reject_rbl_client
    smtpd_enforce_tls = no
    smtpd_helo_required = yes
    smtpd_helo_restrictions = reject_invalid_hostname
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain = $myhostname
    smtpd_sasl_security_options = noanonymous
    smtpd_sender_restrictions = reject_unknown_address
    smtpd_tls_auth_only = yes
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_use_tls = yes
    soft_bounce = yes
    strict_rfc821_envelopes = yes
    transport_maps = mysql:/etc/postfix/
    virtual_alias_domains =
    virtual_alias_maps = mysql:/etc/postfix/, mysql:/etc/postfix/
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /home/vmail
    virtual_mailbox_domains = mysql:/etc/postfix/
    virtual_mailbox_maps = mysql:/etc/postfix/
    virtual_uid_maps = static:5000
    Last edited: Oct 9, 2006
  2. falko

    falko Super Moderator ISPConfig Developer

    You must add the domain(s) to the mydestination line (and these domains must not be in the domains table in the MySQL database!), and then you add

    virtual_maps = hash:/etc/postfix/virtusertable
    to /etc/postfix/ Run
    postmap /etc/postfix/virtusertable
    and restart Postfix. The rest is explained here:
  3. cccc

    cccc New Member


    I changed, but was not working.

    anyway it works only if I add these mail addresses to the the forwardings table in the mysql database.


Share This Page