Page 1 of 1
trouble with comment emails
Posted: Sat Nov 10, 2007 6:22 am
by markw314
I have Serendipity set for unmoderated comments, and it appears that it is trying to send emails to me with blog comments. However the emails do not get sent because the emails appear to be malformed.
In my mailserver log, I have the following:
Code: Select all
from <springfield<at>klomstock.comJob has invalid or illegal from address.
User < "Joe" <springfield<at>klomstock.com>> not known at this site.
Notification discarded - potential loop.
That is a direct copy from the log. The missing > in the first line is really not there.
Joe is a user with a gmail email address. Springfield<at>klomstock.com is my blog's email address, set in the admin section of Serendipity. It is a valid email address and I can successfully email directly to it.
Any ideas why the email is not making it through? Is it a bug in the code, or a problem with my config (most likely)?
All <at> should be replaced by @
Posted: Sat Nov 10, 2007 9:48 am
by carl_galloway
If you don't want to be spammed, really hard, I'd suggest you remove your email address from this thread immediately. Replace it with something similar like
me@myemail.address, this way you can still get support without exposing your email address to scammers.
Re: trouble with comment emails
Posted: Sun Nov 11, 2007 2:35 pm
by garvinhicking
Hi!
Are those email adresses always entered in the format
name@domain.com? Or are those listed like "Joe" <
name@domain.com>? The latter should not be used, because it confuses mail servers quite often...
Regards,Garvin
Posted: Sun Nov 11, 2007 4:04 pm
by markw314
They are entered as
joe@my.domain
Posted: Sun Nov 11, 2007 5:04 pm
by garvinhicking
Hi!
Hm, strange. And I suppose your blog configuration is as well using "
bla@bla.bla"?
Which MTA are you using on your server, do you know that? Postfix, Sendmail, qmail or something like that? It might be that this one's somehow configured to append a default username to mail addresses?!
Regards,
Garvin
Posted: Mon Nov 12, 2007 12:11 am
by markw314
Yup as to the configuration. I only use the basic email format...
The MTA is Mercury Mail. I've been running it for about 8 years with no trouble. It doesn't append anything.
Do you know where mail is sent from in the code for serendipity? I figure maybe I'll output some stuff to a file to see if it's coming from serendipity or eslewhere.
Posted: Mon Nov 12, 2007 12:58 pm
by garvinhicking
Hi!
Phew, I don't have experience with Mercury Mail. Maybe you can check the serendipity_sendMail() function inside the include/functions.inc.php (or include/functions_config.inc.php, I dont't fully remember) and see which raw headers it sends to the PHP mail() function? Maybe this can help in tracing the problem?
Regards,
Garvin
Posted: Mon Nov 12, 2007 4:33 pm
by markw314
Thanks. I'll take a look. Mercury Mail is Windows-only. It's a pretty straight forward MTA. I'm just hoping to figure out where the problem is cropping up.
Thanks again...
Mark
Posted: Mon Nov 12, 2007 5:40 pm
by markw314
I think I see where the problem is for me. This line in serendipity_sendMail:
Code: Select all
if (!empty($maildata['blogMail'])) {
$maildata['headers'][] = 'From: "'. $maildata['fromName'] .'" <'. $maildata['blogMail'] .'>';
}
This changes the From address to the format "Name" <
email@my.domain>.
I changed this so that it does not add the "Name" < > part, and it works. I'll fiddle with it to see how I need to format the From line to get the From name displayed properly.
Thanks for the help.
Mark