如何设置别名all@example.com表示我的电子邮件中的所有用户都在postfix上

时间:2014-10-12 10:59:42

标签: postfix-mta dovecot

我使用centos 6.5服务器安装邮件服务器。它运行良好。但有两个问题。

  1. 我如何设置all@example.com意味着所有用户。这意味着当我向所有@ example.com发送电子邮件时,所有用户都可以收到。

  2. 如果Dovecot无法在MySQL找到用户,我怎能让dovecot,它可能仍在寻找系统用户。

  3. 这是我的postfix main.cf:

    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/libexec/postfix
    data_directory = /var/lib/postfix
    debug_peer_level = 2
    html_directory = no
    inet_interfaces = all
    inet_protocols = all
    local_recipient_maps = 
    mail_owner = postfix
    mailbox_size_limit = 0
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    mydestination = localhost
    mydomain = example.com
    myhostname = example.com
    mynetworks = 127.0.0.0/8 [::1]/128
    myorigin = /etc/mailname
    newaliases_path = /usr/bin/newaliases.postfix
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
    recipient_delimiter = +
    relayhost = 
    sample_directory = /usr/share/doc/postfix-2.6.6/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    smtpd_recipient_restrictions = permit_sasl_authenticated,          permit_mynetworks,          reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_path = private/auth
    smtpd_sasl_type = dovecot
    smtpd_tls_auth_only = yes
    smtpd_tls_cert_file = /etc/pki/dovecot/certs/dovecot.pem
    smtpd_tls_key_file = /etc/pki/dovecot/private/dovecot.pem
    smtpd_use_tls = yes
    unknown_local_recipient_reject_code = 550
    virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
    virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
    virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
    virtual_transport = dovecot
    

1 个答案:

答案 0 :(得分:0)

您可以像mailman一样使用邮件列表,也可以使用virtual_alias_maps(postfix + mysql)

https://workaround.org/ispmail/lenny/postfix-database-mappings Dovecot有Pigeonhole Dovecot,它有转发邮件限制到4最大值(代码中硬编码,所以你必须编辑源代码并重建dovecot包)

我建议您使用邮件列表的第一个选项。