Posts Tagged ‘WordPress’

Fix Wrong Sender on WordPress Comment Notification Emails

Filed under Site ··· Leave a Comment

Since I moved this blog over to a new web host, there’s been a cosmetic — but annoying — problem with my comment notification emails. I finally figured out how to solve it, and because I devised the solution myself after being unable to find a quick answer on the Web, I thought I’d better document the procedure here. You know, for future reference. Or in case anybody else has this problem.

Okay, the backstory: Whenever somebody comments on a post here, I get an email notification. This is a standard WordPress feature. Normally, the email’s “From” name is that of the person who left the comment, which makes it easy for me to see who it was without even opening the email. But since I moved to a new web host, the “From” name on those emails was my hosting account username instead, and the domain was my shared hosting server — something like “box123.host.com.” Really ugly, and irritating as well because I could no longer see at-a-glance who left a comment.

It was obviously a server-related issue, so I did some Googling, but found little of benefit. The only thing that helped was this post, wherein it was suggested to modify the sendmail_path value in your php.ini file so that a fixed “From” email address is used whenever sendmail is invoked. But this was intended to mitigate sender name mismatches with WordPress’ admin emails, such as the spam moderation messages and new user notifications — not the comment notifications. I didn’t want all of my comment emails coming from my own email address, I wanted them to come from the person who commented. Even so, this solution was better than “username@box123.host.com”, so I gave it a try.

The custom php.ini took care of the admin emails, as expected, but my comment emails were still screwed up. I delved into the logic of this issue a bit further, and compared the headers of comment notification emails from my old host as well as my new host. Apparently, when WordPress sends those comment notifications, it tacks the comment author’s name onto the email, but doesn’t use their email address — it uses a dummy email address called “wordpress” that it doesn’t expect will exist. As a result, the email appears to come from: “Comment Author <wordpress@mydomain.com>”.

Well, that dummy email address was the source of the problem. My server will not allow this type of email header to be created if the “From” email address specified does not actually exist. It does some kind of check to see if <wordpress@mydomain.com> is a valid address, and if it is not, it will show “username@box123.host.com” as the sender instead. All I had to do to mitigate this was create an email forwarder — not even a real account, just a forwarder — called “wordpress” so that the dummy address would be seen as valid. Voila! Now my comment emails are back to normal: They appear to come from the comment’s author.

In addition, this solution makes the aforementioned php.ini hack unnecessary.

By the way, in case you’re wondering, I just blackhole anything sent to that “wordpress” address so that I’ll never see it. Not that I expect anybody to hit “reply” on those notifications and try talking to me, but given that “wordpress” is a known word, random spam attacks might otherwise stumble across it and start bombarding me with crap.

Hope this helps somebody. Or me, in the future. You never know.

Comments (0)

Some Sanity Restored

Filed under Journal ··· 2 Comments

In the last few days, my crushing burden of side work has largely fallen away. In fact, this whole week has wound up being less hectic, more manageable, yet productive at the same time. And, I’ve had the time — and peace of mind — necessary to accomplish a few personal things on my lengthy list of stuff to get done before our big Road Trip to Motown™, scheduled to kick off in just one more week.

Of my two side jobs, one of them is done, and the money is in the bank. (There will be a little more to do once I get back from my trip, but for now, all is well.) On the other, I’ve gotten completely caught up — and while I haven’t heard back from the client about anything else they might need, I’m in no mood to remind them, if you know what I mean. At my day job, things are proceeding on schedule, and the launch of our redesigned website nears. Things are going well, and there’s just enough work to keep my schedule full for the foreseeable future, without going insane.

So, Apple and I have started making plans and doing prep work in the final days leading up to our trip. Last night I changed the oil in GTO, for example. After entering the work in my maintenance log, I had a chuckle at the realization that although the recommended time interval had gone by, there were probably only about 600-700 miles on the oil I disposed of. Oh well — if it weren’t for our little journey northward, I’d have left it in longer…but I like to start a 3,000 round trip on fresh fluids!

I updated the firmware on our Garmin nĂ¼vi GPS, then copied about six hours of audio books to its built-in 700 MB of memory. I also entered some “Favorite Locations” into its address book, including my home in Michigan, the Korean restaurant Apple and I always visit up north, and some other locales. The Garmin has a cool feature whereby you can search for food, shopping, lodging, etc. within the vicinity of any city you choose, so I looked for Asian restaurants around my home in Michigan. I couldn’t believe how many results came back — most of them for Thai restaurants, like a place called “Siam Spicy” near one of our favorite shopping malls. Hmmm, it looks like we might have some more restaurants we can try.

Continue Reading…

Comments (2)