开发者

Sending account verification email with perl and sendmail/postfix

For my Perl web application, I need account verification via email.

I already have a sub to generate and handle开发者_如何转开发 the unique link and an email composing and sending mechanism (with Email::Sender CPAN module) and it works fine - it sends emails and they get delivered.

The problem is they hit spam filters, I think it's because 'From' is 'noreply@example.org' and the user I run a script as is roman@example.org. If I send email with the same exact script with 'From: roman@example.org', it is delivered properly and does not hit the filter.

I have a root privileges on the server and can add users and configure postfix, but the question is what should I do? Run webapp as a user noreply having permissions to send mail? Changing postfix settings? Should I use MDA at all or it's better to stick with Net::SMTP or Email::Sender for a lightweight application?

I understand that an exact answer for that question might help spammers, so general direction and links to documentation I need to read would be enough.

from    Example robot noreply@example.org
to  myactualaccount[@]gmail.com
date    Mon, Jun 13, 2011 at 9:45 PM
subject test

hide details 9:45 PM (15 hours ago)

This message is short, but at least it's cheap!


Be sure you are setting the envelope information.

Also, maybe configure Email::Sender to use the SMTP transport rather than sendmail and it should set the envelope sender to the same as the From: address without interference from postfix.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜