
|
View Full Version : Sendmail sends from localhost.localdomain no matter what I try?
Tertsi 12-18-2007, 04:46 AM | I have these lines in sendmail.mc and I've compiled the sendmail.cf with them:
LOCAL_DOMAIN(`freesexdoor.com')dnl
MASQUERADE_AS(`freesexdoor.com')dnl
FEATURE(masquerade_envelope)dnl
MASQUERADE_DOMAIN(localhost)dnl
MASQUERADE_DOMAIN(localhost.localdomain)dnl
I have the users daemon, freesexd and root in the trusted_users file. I have restarted sendmail (using service sendmail restart). I have the domains: server.freesexdoor.com, freesexdoor.com and mail.freesexdoor.com in the sendmail's local_hosts file.
In Apache 2's httpd.conf, I have this: php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f freesexd [at} freesexdoor.com'
Yet when I sent an e-mail with php to advertising [at} freesexdoor.com, I got these headers in the e-mail, which don't look good to a spam filter:
Received: from localhost.localdomain (IS-3293 [127.0.0.1])
by localhost.localdomain (8.13.8/8.13.8) with ESMTP id
Received: (from daemon@localhost)
by localhost.localdomain (8.13.8/8.13.8/Submit) id
Message-Id: <200712180935.lBI9ZrRs005480@localhost.localdomain>
Additionally hotmail rejects my e-mails and it is obvious why. (My OpenSPF record is fine btw and on my former server I was able to send e-mails with it fine.)
Naturally I want something like "freesexdoor.com" to replace "localhost.localdomain" in those header lines. So how can I get this working?
The OS is CentOS 5 by the way. |
If you check /etc/sendmail.cf itself I'm sure there is a line in there that sets the hostname though I've not played with sendmail for a while
grep localdomain /etc/sendmail.cf
Might chuck up a clue |
Scott.Mc 12-18-2007, 05:25 AM | Also change your hostname in /etc/sysconfig/network and restart the network service. |
Tertsi 12-18-2007, 05:48 AM I can't tell what to change in the sendmail.cf file. It looks fine to me. I did that hostname change now, thanks. That won't be enough though. :( |
linux-tech 12-18-2007, 08:39 AM Did you restart the network?
/etc/init.d/network restart
Did you restart sendmail?
/etc/init.d/sendmail restart (I think, been ages since I used sm)
If neither of those work,try rebooting the server?
shutdown -r now
Yeah I know the last is a dummy response, but sometimes it's necessary to do. Just make SURE you've added the hostname properly in the network devices (as Scott mentioned), and just for safety's sake change the hostname manually before you do reboot it
hostname my.domain.com |
Tertsi 12-18-2007, 08:52 AM I think I got it almost right this time.
Now the headers say:
Return-Path: <freesexd@freesexdoor.com>
Received: from server.freesexdoor.com (IS-3293 [127.0.0.1])
by server.freesexdoor.com (8.13.8/8.13.8) with ESMTP id lBIDmHCP002760
for <advertising@freesexdoor.com>; Tue, 18 Dec 2007 13:48:17 GMT
Received: (from daemon@localhost)
by server.freesexdoor.com (8.13.8/8.13.8/Submit) id lBIDmG8x002759;
Tue, 18 Dec 2007 13:48:16 GMT
Message-Id: <200712181348.lBIDmG8x002759@server.freesexdoor.com>
I probably still need to get this line changed: Received: (from daemon@localhost) and this one: (IS-3293 [127.0.0.1])
I had to comment the "LOCAL_DOMAIN" line, edit /etc/hosts to have the real hostname as the first line instead of the second line, execute "hostname server.freesexdoor.com", remove the masquerades, reboot etc. |
Tertsi 12-18-2007, 10:14 AM I now got this changed as well: (IS-3293 [127.0.0.1]) to: (freesexdoor.com [127.0.0.1])
My e-mail delivery rate through spam filters is still horrible. Even though those same e-mails were delivered fine on my last DirectAdmin server. (This one is a no control panel server.) |
|