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

    hi

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

    http://www.howtoforge.com/virtual_postfix_mysql_quota_courier

    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 ?

    Code:
    # 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 = mydomain.net
    myhostname = server.mydomain.net
    mynetworks = 127.0.0.0/8 202.X.X.0/28 192.168.115.0/24 
    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 relays.ordb.org
    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/mysql-virtual_transports.cf
    virtual_alias_domains =
    virtual_alias_maps = 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 = mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_uid_maps = static:5000
     
    Last edited: Oct 9, 2006
  2. falko

    falko Super Moderator Howtoforge Staff

    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

    Code:
    virtual_maps = hash:/etc/postfix/virtusertable
    to /etc/postfix/main.cf. Run
    Code:
    postmap /etc/postfix/virtusertable
    and restart Postfix. The rest is explained here: http://www.howtoforge.com/forums/showthread.php?t=2
     
  3. cccc

    cccc New Member

    thanks,

    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.

    greetings
    cccc
     

Share This Page