trouble with comment emails

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
markw314
Regular
Posts: 17
Joined: Wed May 30, 2007 5:51 pm

trouble with comment emails

Post 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 @
Last edited by markw314 on Sat Nov 10, 2007 9:27 pm, edited 2 times in total.
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: trouble with comment emails

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
markw314
Regular
Posts: 17
Joined: Wed May 30, 2007 5:51 pm

Post by markw314 »

They are entered as joe@my.domain
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
markw314
Regular
Posts: 17
Joined: Wed May 30, 2007 5:51 pm

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
markw314
Regular
Posts: 17
Joined: Wed May 30, 2007 5:51 pm

Post 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
markw314
Regular
Posts: 17
Joined: Wed May 30, 2007 5:51 pm

Post 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
Post Reply