简体   繁体   English

我如何让 Plesk 11 服务器接受带有分隔符 (VERP) 的地址的电子邮件?

[英]How do I get a Plesk 11 server to accept email to addresses with delimiter (VERP)?

What I Want我想要什么

We send out bulk renewal notices via email and it would be ideal if we could link any bounce messages with the corresponding record in our database.我们通过电子邮件发送批量续订通知,如果我们可以将任何退回邮件与我们数据库中的相应记录相关联,那将是理想的。 I recently learned about VERP ( wiki ) and thought that would be the perfect solution for us.我最近了解了VERP ( wiki ) 并认为这对我们来说是完美的解决方案。

What I Tried我试过的

I did a test before making any changes and the message is bounced back to sender, as expected.我在进行任何更改之前进行了测试,并且消息按预期退回给发件人。 Then I uncommented this line in /etc/postfix/main.cf and restarted Postfix.然后我在 /etc/postfix/main.cf 中取消注释这一行并重新启动 Postfix。

recipient_delimiter = +

The Problem问题

Unfortunately, I can't seem to get it to work.不幸的是,我似乎无法让它发挥作用。 Messages sent to addresses that include the delimiter are no longer rejected, but they don't appear to be delivered anywhere either.发送到包含分隔符的地址的邮件不再被拒绝,但它们似乎也不会发送到任何地方。 Here's an excerpt from the maillog:这是邮件日志的摘录:

Jul  8 12:14:36 cl-t082-392cl postfix/smtpd[28723]: 6E98A1A404CC: client=mta02.eastlink.ca[24.224.136.13]
Jul  8 12:14:36 cl-t082-392cl postfix/cleanup[28727]: 6E98A1A404CC: message-id=<6.1.2.0.2.20130708131351.24958960@pop.eastlink.ca>
Jul  8 12:14:36 cl-t082-392cl postfix/qmgr[28717]: 6E98A1A404CC: from=<me@example.com>, size=1343, nrcpt=1 (queue active)
Jul  8 12:14:36 cl-t082-392cl postfix/pipe[28752]: 6E98A1A404CC: to=<bounces+test@ourdomain.com>, relay=plesk_virtual, delay=0.22, delays=0.15/0/0/0.07, dsn=2.0.0, status=sent (delivered via plesk_virtual service)
Jul  8 12:14:36 cl-t082-392cl postfix/qmgr[28717]: 6E98A1A404CC: removed

So it appears that Postifx is doing its job, but that the plesk_virtual service is dropping the ball.所以看起来 Postifx 正在做它的工作,但是plesk_virtual服务正在丢球。 No message is returned to sender.没有消息返回给发件人。 No message shows up in bounces/Maildir/cur.在bounces/Maildir/cur 中没有显示任何消息。 If plesk_virtual is writing an error somewhere, I don't know where (I checked /var/log/messages).如果plesk_virtual在某处写入错误,我不知道在哪里(我检查了 /var/log/messages)。

My Search Efforts我的搜索工作

I searched Google, here, and the Parallels forums.我搜索了谷歌、这里和 Parallels 论坛。 I got several hits in Google for the same problem I am having, but they are all for the same message which is dated almost 3 years ago.由于我遇到的同样问题,我在 Google 上获得了几次点击,但它们都是针对几乎 3 年前发布的同一条消息。 And there was no solution given.并且没有给出解决方案。 I posted to the Parallels forums several days ago.几天前我在 Parallels 论坛上发帖。 I've gotten a few views, but zero responses.我得到了一些意见,但零响应。

What I Don't Want想要的

I've seen similar problems where the suggestion was to forward all undelivered mail to a particular address.我见过类似的问题,建议将所有未送达的邮件转发到特定地址。 That's a catch-all.这是一个包罗万象的。 And that is not a realistic solution in today's world of spam.在当今的垃圾邮件世界中,这不是一个现实的解决方案。

Question问题

How do I get Plesk to correctly recognize and deliver messages to addresses with the delimiter?我如何让 Plesk 正确识别消息并将其传送到带有分隔符的地址? I can't imagine that I am the only one who wants to do this on a Plesk server.我无法想象我是唯一一个想要在 Plesk 服务器上执行此操作的人。

I answered this on the Plesk forums.我在 Plesk 论坛上回答了这个问题。 For anyone still interested there is a postfix workaround.对于仍然感兴趣的任何人,都有一个 postfix 解决方法。 Added the following to the main.cf:在 main.cf 中添加了以下内容:

recipient_canonical_classes = envelope_recipient
recipient_canonical_maps = regexp:/etc/postfix/recipient_canonical_map

Created a file /etc/postfix/recipient_canonical_map with this regex:使用此正则表达式创建了一个文件 /etc/postfix/recipient_canonical_map:

/^(.+)\+.+@(.*)/ ${1}@${2}

Granted, it assumes + is the only VERP delimiter but it works.当然,它假设 + 是唯一的 VERP 分隔符,但它有效。 The only caveat is that it does not bounce bad addresses, which may not be a bad thing..唯一需要注意的是它不会反弹坏地址,这可能不是一件坏事。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM