我没有设置postfix的经验,并认为virtualmin为我做了一些修改。 不出现。 当我尝试发送邮件到域名(或者是[email protected] [email protected]或者[email protected])
我收到以下消息
This is the mail system at host dedq239.localdomain. I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For further assistance, please send mail to <postmaster> If you do so, please include this problem report. You can delete your own text from the attached returned message. The mail system <[email protected]> (expanded from <[email protected]>): User unknown in virtual alias table Final-Recipient: rfc822; [email protected] Original-Recipient: rfc822;[email protected] Action: failed Status: 5.0.0 Diagnostic-Code: X-Postfix; User unknown in virtual alias table
我怎样才能在这里诊断问题? 看来,邮件到达我的服务器,但服务器无法将本地邮件传递给正确的用户。 (这是一个猜测,如实地我不知道发生了什么)。 我检查了我的虚拟别名表,它似乎设置正确(我可以发布,如果这将是有益的)。 任何人都可以给我一个线索,以下一步?
谢谢
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 html_directory = no local_recipient_maps = $virtual_mailbox_maps mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES sample_directory = /usr/share/doc/postfix-2.3.3/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination smtpd_sasl_auth_enable = yes soft_bounce = no unknown_local_recipient_reject_code = 550 virtual_alias_maps = hash:/etc/postfix/virtual
我的邮件日志文件(最后一项)
Sep 30 15:13:47 dedq239 postfix/cleanup[7237]: 207C6B18158: message-id=<[email protected]> Sep 30 15:13:47 dedq239 postfix/qmgr[7177]: 207C6B18158: from=<[email protected]>, size=1805, nrcpt=1 (queue active) Sep 30 15:13:47 dedq239 postfix/error[7238]: 207C6B18158: to=<[email protected]>, orig_to=<[email protected]>, relay=none, delay=0.64, delays=0.61/0.01/0/0.02, dsn=5.0.0, status=bounced (User unknown in virtual alias table) Sep 30 15:13:47 dedq239 postfix/cleanup[7237]: 8DC13B18169: message-id=<[email protected]> Sep 30 15:13:47 dedq239 postfix/qmgr[7177]: 8DC13B18169: from=<>, size=3691, nrcpt=1 (queue active) Sep 30 15:13:47 dedq239 postfix/bounce[7239]: 207C6B18158: sender non-delivery notification: 8DC13B18169 Sep 30 15:13:47 dedq239 postfix/qmgr[7177]: 207C6B18158: removed Sep 30 15:13:48 dedq239 postfix/smtp[7240]: 8DC13B18169: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[209.85.216.55]:25, delay=1.3, delays=0.02/0.01/0.58/0.75, dsn=2.0.0, status=sent (250 2.0.0 OK 1254348828 36si15082901pxi.91) Sep 30 15:13:48 dedq239 postfix/qmgr[7177]: 8DC13B18169: removed Sep 30 15:14:17 dedq239 postfix/smtpd[7233]: disconnect from mail-bw0-f228.google.com[209.85.218.228]
等等下面的文件我没有触及这个文件 – myvirtualdomain是我的真实域名的替代品
# Aliases in this file will NOT be expanded in the header from # Mail, but WILL be visible over networks or from /bin/mail. # # >>>>>>>>>> The program "newaliases" must be run after # >> NOTE >> this file is updated for any changes to # >>>>>>>>>> show through to sendmail. # # Basic system aliases -- these MUST be present. mailer-daemon: postmaster postmaster: root # General redirections for pseudo accounts. bin: root daemon: root adm: root lp: root sync: root shutdown: root halt: root mail: root news: root uucp: root operator: root games: root gopher: root ftp: root nobody: root radiusd: root nut: root dbus: root vcsa: root canna: root wnn: root rpm: root nscd: root pcap: root apache: root webalizer: root dovecot: root fax: root quagga: root radvd: root pvm: root amanda: root privoxy: root ident: root named: root xfs: root gdm: root mailnull: root postgres: root sshd: root smmsp: root postfix: root netdump: root ldap: root squid: root ntp: root mysql: root desktop: root rpcuser: root rpc: root nfsnobody: root ingres: root system: root toor: root manager: root dumper: root abuse: root newsadm: news newsadmin: news usenet: news ftpadm: ftp ftpadmin: ftp ftp-adm: ftp ftp-admin: ftp www: webmaster webmaster: root noc: root security: root hostmaster: root info: postmaster marketing: postmaster sales: postmaster support: postmaster # trap decode to catch security attacks decode: root # Person who should get root's mail #root: marc abuse-myvirtualdomain.com: [email protected]
我的etc / postfix /虚拟文件如下 – 再次myvirtualdomain是一个替代品。 我觉得这个文件是由Virtualmin生成的,我曾尝试搞乱与没有成功…这是没有我的变化的版本。
myunixusername@myvirtualdomain .com myunixusername myvirtualdomain .com myvirtualdomain.com [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
你需要以某种方式从admin @获取电子邮件给本地用户(root?)。 请注意,它不在/etc/aliases或任何其他文件中。
我认为你的问题在于你的postfix / main.cf文件中的“local_recipient_maps”设置
您可以指定允许接收邮件的电子邮件帐户,如果电子邮件地址没有列出,那么服务器将立即阻止任何请求,我认为这就是你所看到的。
诊断代码:X-Postfix; 虚拟别名表中的用户未知
我有这样的设置
local_recipient_maps = $ virtual_mailbox_maps virtual_mailbox_maps = hash:/ usr / local / etc / postfix / virtual_mailbox_maps
那么virtual_mailbox_map文件包含允许的邮箱/别名的所有条目
“[email protected] dummy”
从后缀/ main.cf文件
一旦你做了这些改变,你将需要有文件
postmap / usr / local / etc / postfix / virtual_mailbox_maps newaliases这个
#如果此参数已定义,则SMTP服务器将拒绝 #未知本地用户的邮件。 这个参数是默认定义的。
尝试挑选一些低悬的水果:
你已经为你的virtual_alias_maps指定了hash:但是你运行了postmap /etc/postfix/virtual
输出是什么: postconf local_recipient_maps
输出是什么: postconf -n
编辑:如果你复制/粘贴文件,那么“myvirtualdomain .com myvirtualdomain.com”有一个额外的空间。 我不相信这条线属于那里。
根据文档, virtual_alias_domains默认为$virtual_alias_maps ,但在你的情况下,实际上应该包含myvirtualdomain.com。 你发布的configuration并不表示它的价值。 可能: postconf -e "virtual_alias_domains = myvirtualdomain.com" && postfix reload
这种有点疯狂的我的理论,你反弹的电子邮件,因为服务器不接受该域名的电子邮件。
以下是Postfix文档中的解释