Articles of postfix

使用后缀智能主机时处理退回的电子邮件

我正在运行一个高可用性集群,到目前为止,大部分工作都很好。 我有两台作为外发邮件主机(smarthosts)的外部机器。 内部主机被configuration为通过这两个面向外部的主机来中继所有的电子邮件。 我的smarthosts的main.cf看起来像这样: myhostname = lb1.example.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = lb1.example.com, localhost relayhost = mynetworks = 127.0.0.0/8 10.1.248.0/24 我的内部主机的main.cf如下所示: mynetworks = 127.0.0.0/8 myhostname = web1.example.com mydestination = $myhostname, localhost.$mydomain, localhost relayhost = [10.1.248.3] smtp_fallback_relay = [10.1.248.2] lb1的内部IP是10.1.248.2,lb2的内部IP是10.1.248.3。 在外部主机上,root和www-data的电子邮件将通过/ etc / aliases转发到[email protected]。 使用智能主机设置的一个优点是垃圾邮件filter等可以连接回发送发送服务器。 所有的电子邮件发送很好,标题看起来像这样: Received: from lb2.example.com ([198.51.100.3]) by mx.google.com with […]

后缀 – 邮件用户分配不工作

我有分发电子邮件的问题,我需要从域@ cokdeje.cz电子邮件发送给用户forexample 信息 ,从域@ surfujeme.cz到另一个,等等。 /etc/postfix/main.cf中 smtpd_banner = $ myhostname ESMTP $ mail_name(Ubuntu) biff = no append_dot_mydomain = no readme_directory = no smtpd_tls_cert_file =的/ etc / SSL /证书/ SSL-CERT-snakeoil.pem smtpd_tls_key_file =的/ etc / SSL /私人/ 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 myhostname = mail.surfujeme.cz virtual_maps […]

Postfix和amavis在专用的服务器上

我有3台服务器:服务器1和2被列为不同域的MX服务器,服务器3用于服务器1和2的amavis / spamd / clamd过滤。我的计划是“首先通过”端口587和25在服务器1/2上,并通过服务器3端口10024将邮件传递给amavis。 这个想法就是在过滤回原来的端口10025的服务器之后发送邮件,这个端口没有filter指令(在master.cf中定义)。 我认为这样做的最好方法是让smpt客户端(如果可能,postfix)查找收件人域的mxlogging(result = mx_host)并将邮件发送到[mx-host]:10025。 这不会是一个开放的中继,因为我将它configuration为只接受来自环回地址(从amavis)的邮件。 但是,我似乎无法find如何configurationpostfix smtp(或其他)默认提供到端口10025。 简介:1)这个path是远程垃圾邮件/病毒过滤的最佳select吗? 如果不是,还有什么更好的? 2)如果是,我怎样才能把邮件送回正确的服务器上的队列。 提前致谢, 埃德

根据收件人重写发件人地址

我试图设置我的后缀服务器,以改变一个特定的收件人域 (example.com)的传出电子邮件的发件人地址 – 否则,我只是在main.cf中configurationsmtp_generic_maps并完成它。 据我所知,对于这种configuration,有必要build立一个额外的交通工具来处理我想要的交通堵塞。 到目前为止,我已经build立了一个额外的smtp传输: 运输: example.com drewrite: master.cf: smtp unix – – – – – smtp drewrite unix – – – – – smtp -o smtp_generic_maps=hash:/etc/postfix/rewrite_domain rewrite_domain: [email protected] [email protected] 问题是, amavis也被configuration为在该服务器上运行,并且似乎以某种方式阻碍了地址重写,我实际上无法将其包裹起来。 好奇的是,当我绕过传输,并设置main.cf的smtp_generic_maps覆盖所有收件人的发件人地址; 地址被重写OK。 这使我相信,也许交通工具设置不正确; 但后缀日志显示,它实际上正在使用(当我设法把它早些时候我得到延期邮件在队列中)。 我能够得到这个工作的唯一方法是禁用全球amavis。

后缀:LDAP不工作(警告:dict_ldap_lookup:没有findsearch基础:32:没有这样的对象)

我用postfix设置了LDAP访问。 ldapsearch -D "cn=postfix,ou=users,ou=system,[domain]" -w postfix -b "ou=users,ou=people,[domain]" -s sub "(&(objectclass=inetOrgPerson)(mail=[mailaddr]))" 提供正确的条目。 LDAPconfiguration文件看起来像 root@server2:/etc/postfix/ldap# cat mailbox_maps.cf server_host = localhost search_base = ou=users,ou=people,[domain] scope = sub bind = yes bind_dn = cn=postfix,ou=users,ou=system,[domain] bind_pw = postfix query_filter = (&(objectclass=inetOrgPerson)(mail=%s)) result_attribute = uid debug_level = 2 bind_dn和bind_pw应该和我上面用ldapsearch一样。 不过,调用postmap不起作用: root@server2:/etc/postfix/ldap# postmap -q [mailaddr] ldap:/etc/postfix/ldap/mailbox_maps.cf postmap: warning: dict_ldap_lookup: /etc/postfix/ldap/mailbox_maps.cf: Search […]

postfix,dovecot,dovecot-sasl,ldap和用于NFS共享电子邮件存储的静态UID

我正在尝试构build一个Ubuntu 12.04邮件服务器。 必须:对现有的Open-LDAP服务器进行身份validation。 存储在现有NFS服务器上的Maildirs中,所有内容都是8:8(邮件:邮件)。 auth是smtp和imap所必需的。 应该(我认为):Postfix使用Dovecot SASL。 事情工作正常除了,当我使用ldap的userdb: userdb { driver = ldap args = /etc/dovecot/ldap-userdb.conf.ext } …然后将maildir文件作为来自LDAP的UID:GID读取/写入。 但邮件必须由8:8拥有(因为其他邮件服务器)我得到的错误如: Error: open(/var/mail/…) … failed: Permission denied (euid=1193(<…>) egid=555(<…>) missing +r perm …. dir owned by 8:8 … 但如果我使用静态userdb: userdb { driver = static args = uid=8 gid=8 home=/var/mail/%u } …然后当发送邮件从一个LDAP用户到新的邮件服务器上的另一个LDAP用户,然后我得到一个错误:(电子邮件到[email protected]) postfix/local[32371]: C6F7561735: to=<[email protected]>, relay=local, delay=0.04, delays=0.02/0.01/0/0.01, […]

后缀:收件人地址被拒绝:无效的HELO / EHLO

这个问题似乎是微软的Outlook 2007不发送SMTP AUTH的一个奇怪的原因,只有一个特定的域名。 我运行iRedMail服务器(它使用股票debian 7 / wheezy,后缀2.9.6-2)为我的域和几十个客户端域。 问题是我有一个客户端无法发送电子邮件给自己(不只是我的电子邮件,但整个域) – 它被拒绝reject_non_fqdn_helo_hostname但客户端使用SMTP AUTH并正确设置,所以它应该绕过FQDN检查。 它看起来像MUA没有使用SMTP AUTH只为我和我的coleaques电子邮件地址。 有没有人见过这个? 我该如何解决这个问题? 任何input是高度赞赏! 难道它是连接到MUA? 她正在使用Outlook(不是Express)? 看看下面的日志显示不同的情况。 所有被捕获在相同的configuration/相同的MUA / IP的,…: 1)这是好的:我的客户发送电子邮件到第三方服务器; 使用SMTP AUTH 5月28日13:02:13 email2 postfix / smtpd [1191]:连接从<censored> 5月28日13:02:13电子邮件2后缀/ smtpd [1191]:28A5D35E61DC:客户端= <censored>,sasl_method = LOGIN,sasl_username = <[email protected]> May 28 13:02:26 email2 postfix / cleanup [1435]:28A5D35E61DC:message-id = <006c01ce5b92 $ d33805e0 $ 79a811a0 $ @ […]

Postfix – SASLAuthentication问题带有StartTLS的Cram-MD5

最近我configuration了使用Postfix和Courier的邮件服务器。 除了通过Postfix服务器(在端口587上运行)发送邮件时启用了StartTLS并使用SASLAuthentication与虚拟域和地图进行validation时,所有工作都可以正常进行。 日志 当我尝试连接我的电子邮件客户端发送消息时,我收到以下消息,显示在/var/log/mail.log中: postfix/smtpd[5108]: connect from ip domain.com[xxx.xxx.xxx.xxx] postfix/smtpd[5108]: Anonymous TLS connection established from domain.com[xxx.xxx.xxx.xxx]: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits) postfix/smtpd[5108]: warning: domain.com[xxx.xxx.xxx.xxx]: SASL CRAM-MD5 authentication failed: authentication failure postfix/smtpd[5108]: disconnect from domain.com[xxx.xxx.xxx.xxx] 组态 /etc/postfix/main.cf文件: smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no append_dot_mydomain = no readme_directory = no smtpd_use_tls = yes […]

更改用户以调用postfix传输脚本

我正在尝试将收到的电子邮件发送给脚本进行处理。 我有一个定制在master.cf中的自定义Postfix传输,如下所示。 transpire unix – nn – – pipe flags=Rq user=implantd argv=/opt/transpire/bin/implantproc.py $recipient > /dev/null 2>&1 这工作,local_recipient_map中定义的电子邮件被pipe道到脚本,但我有一个权限问题。 似乎脚本(implantproc.py)没有写入文件的权限,需要运行该文件。 例如,显示权限错误的NDR。 <[email protected]>: Command died with status 1: "/opt/transpire/bin/implantproc.py". Command output: Traceback (most recent call last): File "/opt/transpire/bin/implantproc.py", line 11, in <module> open("log.txt", 'a').write("test!") IOError: [Errno 13] Permission denied: 'log.txt' Final-Recipient: rfc822; [email protected] Original-Recipient: rfc822;[email protected] Action: failed Status: […]

postfix opendkim DKIM签名和Domainkey签名

在CentOS 6上运行postfix作为边缘中继已经有一段时间了,所以我们所有的外发邮件都是通过opendkim签名邮件的一个路由点。 这很好。 我最初使用的是dkim-filter/dkim-milter (我相信),但是在几年前转向opendkim 。 但是有一件事我一直想要解决很长一段时间,除了DKIM-Signature以外,还要添加DomainKey-Signature标题。 我意识到, DomainKeys是旧的规范,技术上被DKIM所取代,但我认为还有一些合理的validation系统(例如:Gmail)。 这会涉及多个milters,一个用于DKIM ,另一个用于旧的DomainKeys ? 我不太喜欢维护2组configuration和签名表等的想法,因为我必须频繁地添加/删除中继域。 任何人都知道是否有可能在opendkim添加两个签名?