LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Need sendmail setup assistance for wordpress (https://www.linuxquestions.org/questions/linux-software-2/need-sendmail-setup-assistance-for-wordpress-615066/)

philwynk 01-20-2008 07:05 PM

Need sendmail setup assistance for wordpress
 
Hi, all,

I had Fedora Core 7 and Wordpress to run my blog site, and things were working pretty well. Included in my features was that I allowed users to post if they registered with a nickname and email address, and wordpress would automatically send them a password.

Then my server crashed. I had to reinstall Fedora and restore mysql and Wordpress from a backup. Then I updated Wordpress to the latest version, and updated Fedora to Core 8.

Now the outgoing email function is broken.

I updated sendmail.mc to recognize my ISP's outgoing mail host as the relay for outgoing mail.
dnl define(`SMART_HOST', `smtp.comcast.net')dnl
I also instructed it to masquerade as my web site and aliased mail user "wordpress" to "webmaster", because I was receiving
<wordpress@plumbbobblog.com>
(reason: 550 User unknown)
Now I'm getting server messages from the ISP saying the outgoing mail request has been blocked, as follows:
----- The following addresses had permanent fatal errors -----
<shellydk@comcast.net>
(reason: 554 IMTA04.emeryville.ca.mail.comcast.net comcast 24.60.244.19 Comc
ast BL001 Blocked. Please see http://www.comcast.net/help/faq/index.jsp?faq=Secu
rityMail_Policy18625)

----- Transcript of session follows -----
... while talking to mx1.comcast.net.:
<<< 554 IMTA23.westchester.pa.mail.comcast.net comcast 24.60.244.19 Comcast BL00
1 Blocked. Please see http://www.comcast.net/help/faq/inde...q=SecurityMail
_Policy18625
... while talking to mx2.comcast.net.:
<<< 554 IMTA04.emeryville.ca.mail.comcast.net comcast 24.60.244.19 Comcast BL001
Blocked. Please see http://www.comcast.net/help/faq/inde...=SecurityMail_
Policy18625
554 5.0.0 Service unavailable
It looks like apache is the one setting up the email header.

Any suggestions?

Thanks in advance.

Phil W.

Oh, PS: When I follow the link in the server error message, I get "content not found." Sweet.

gilead 01-21-2008 12:55 PM

After you updated sendmail.mc did you regenerate your sendmail.cf file? The link in your error messages says this:
Code:

You have been blocked from emailing the Comcast network because we have determined that you are sending email from a dynamic/residential IP address within the Comcast domain.  Comcast does not allow subscribers to send email from a mail server other than smtp.comcast.net
It seems that you're not using a smarthost.

philwynk 01-21-2008 04:18 PM

Quote:

After you updated sendmail.mc did you regenerate your sendmail.cf file?
Yep.

Quote:

It seems that you're not using a smarthost.
Duh... what's a smarthost?

Thanks.

gilead 01-21-2008 06:55 PM

A smarthost is the relay for your mail and it's where sendmail should send your mail through if the setting from your sendmail.mc file was applied to sendmail.cf. If you run the following command, do you get the output I've shown?
Code:

$ grep '^DS' /etc/mail/sendmail.cf
DSsmtp.comcast.net

If not, then the change in sendmail.mc did not get correctly applied to your sendmail.cf (I'm assuming the location is /etc/mail/sendmail.cf). If so, then maybe Wordpress is doing its own SMTP stuff and I'd recommend checking the docs to see how to get it to use your sendmail. If it was working correctly prior to the crash do you have a backup of your previous config?

philwynk 01-22-2008 08:24 AM

My change in sendmail.mc didn't get applied to sendmail.cf.

Here's the line I modified in /etc/mail/sendmail.mc:
dnl define(`SMART_HOST', `smtp.comcast.net')dnl
Here's what I did to apply it:
make -C /etc/mail
The make command DID generate a sendmail.cf in the correct directory; I can tell by the timestamp. However, the generated sendmail.cf contains the DS designator followed by nothing.

I suppose I can simply modify sendmail.cf directly, then stop and restart sendmail. But that kinda breaks the mechanism and leaves me to modify my own sendmail.cf forever (which is ok, if that's what it takes.) Any idea why my sendmail.mc change isn't being applied?

Thanks for your help.

Phil W.

philwynk 01-22-2008 08:57 AM

Ok, I modified sendmail.cf directly to list the relay host after DS, and restarted sendmail. Everything seems to be working now. The only remaining question is, why didn't my change to sendmail.mc generate the correct sendmail.cf?

No urgency here, but I would like to know.

Sendmail.cf is one of those legacy UNIX things that I just never learned, 'cause I never had to, but it doesn't seem all that difficult. If I have to write my own sendmail.cf, I have to, and that's that.

Thanks again for your assistance.

Phil W.

philwynk 01-22-2008 09:12 AM

{Sigh} Ok, never mind. I got it.

Reading the sendmail.cf file, I located the directory /usr/share/sendmail-cf from which the make pulls its stuff, and I read the README file there. It instructed me that the "dnl" I was seeing all over the sendmail.mc file means "delete through new line," and that what I modified in my sendmail.mc file was a COMMENT.

Crap.

Well, I've been in IT in one form or another since 1979, and I've never seen "dnl" as a comment indicator before, so I guess I'm not COMPLETELY stupid...

I got rid of the "dnl"s from the sendmail.mc line I modified, and ran make, and got the correct sendmail.cf.

Pretty damn funny, actually.

Thanks again for your help.

Phil W.

gilead 01-22-2008 01:07 PM

Sorry it took so long to get back - and congratulations on figuring it out. dnl is definitely the most obscure mechanism I've come across. Building a new Sendmail is the only time I ever use m4 so I wouldn't have seen it at all except for that.


All times are GMT -5. The time now is 06:54 AM.