Postfix
後綴 virtual_alias_maps 不起作用
我在 virtual_alias_maps 中有以下條目:
ttt@works-organizer.ch: tibor.nagy@works-organizer.ch
但是,如果我向 ttt@works-organizer.ch 發送電子郵件,它會失敗,並且虛擬郵箱表中的使用者未知:
Jun 25 21:53:50 zg-3 postfix/smtpd[6071]: NOQUEUE: reject: RCPT from smtp4.enternet.hu[62.112.192.37]: 550 5.1.1 <ttt@works-organizer.ch>: Recipient address rejected: User unknown in virtual mailbox table; from=<nagyt@hu.inter.net> to=<ttt@works-organizer.ch> proto=ESMTP helo=<smtp4.enternet.hu>
如果我向 tibor.nagy@works-organizer.ch 發送電子郵件,它會完美執行。可能是什麼問題?當然,我已經執行 postmap 來更新 virtual.db 並重新啟動了 postfix。
這是我的 main.cf:
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h readme_directory = no myhostname = zg-3.softxs.ch alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = softxs.ch mydestination = zg-3.softxs.ch, localhost.softxs.ch, localhost relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 94.231.88.102 172.16.0.0/16 # 50 MB message_size_limit = 52428800 ### TLS parameters smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache ### Dovecot SMTP authentication smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes # With Postfix version before 2.10, use smtpd_recipient_restrictions #smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination # Milter configuration # OpenDKIM milter_default_action = accept milter_protocol = 6 smtpd_milters = local:/opendkim/opendkim.sock non_smtpd_milters = local:/opendkim/opendkim.sock ### Virtual aliases to push emails into V2 systems: # 1. virtual alias to <system_name>.email_address@localhost # 2. alias <system_name>.email_address@localhost |"/usr/local/v2_mail/v2/script/email_handler.sh..." # See http://www.postfix.org/VIRTUAL_README.html#virtual_alias for virtual aliases virtual_alias_domains = # can be used more than one e.g. for different domains virtual_alias_maps = hash:/etc/postfix/virtual mailbox_size_limit = 0 virtual_mailbox_limit = 0 recipient_delimiter = + inet_interfaces = all ### Configuration for virtual mailboxes home_mailbox = Maildir/ virtual_mailbox_domains = /etc/postfix/vhosts virtual_mailbox_base = /home/vmail virtual_mailbox_maps = hash:/etc/postfix/vmaps virtual_minimum_uid = 1000 virtual_uid_maps = static:1002 virtual_gid_maps = static:1002
virtual_alias_maps 不需要冒號,就像普通別名一樣。所以 virtual_alias_maps 條目正確:
ttt@works-organizer.ch tibor.nagy@works-organizer.ch