Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Sendmail HowTo?

Sendmail HowTo?
Thread Tools
RGB
Mac Elite
Join Date: Jan 2002
Location: College in the Land of Oz
Status: Offline
Reply With Quote
Feb 23, 2003, 06:58 PM
 
I'm hosting my website from my B/W G3 running 10.2. I'm using formmail to send data from fields on my site to my email address, but in order for this to work, I need to first configure Sendmail, and then configure the formmail script to hook up with it.

How do I go about doing this?
     
Mac Elite
Join Date: Jan 2001
Status: Offline
Reply With Quote
Feb 23, 2003, 07:41 PM
 
Originally posted by RGB:
I'm hosting my website from my B/W G3 running 10.2. I'm using formmail to send data from fields on my site to my email address, but in order for this to work, I need to first configure Sendmail, and then configure the formmail script to hook up with it.

How do I go about doing this?
I've been preparing to do something similar myself. I found this webpage that talks about it. I haven't had a chance to test this out myself, but it looks like it might do the trick. HTH.
     
RGB  (op)
Mac Elite
Join Date: Jan 2002
Location: College in the Land of Oz
Status: Offline
Reply With Quote
Feb 23, 2003, 11:35 PM
 
Okay so I have it setup, but when I try to send mail from Apple's Mail client using "localhost" as the outgoing server, it doesn't work. Also, when people try to submit the form at

http://12.248.240.242/newport/index.php?page=contact

the email never gets through to me.
     
Grizzled Veteran
Join Date: Apr 2001
Status: Offline
Reply With Quote
Feb 24, 2003, 09:23 AM
 
Then it's not setup right.

Just saying "it doesn't work" isn't much help.

Try looking at the logs to see what's going on.

Wade
     
RGB  (op)
Mac Elite
Join Date: Jan 2002
Location: College in the Land of Oz
Status: Offline
Reply With Quote
Feb 24, 2003, 05:21 PM
 
Sorry about the "it doesn't work" I always yell at my boss for doing that! I shall go investigate the issue.
     
RGB  (op)
Mac Elite
Join Date: Jan 2002
Location: College in the Land of Oz
Status: Offline
Reply With Quote
Feb 24, 2003, 08:06 PM
 
Here are some errors from my console:

Feb 22 19:26:01 localhost crashdump: Unable to write crash report to /Library/Logs/CrashReporter/sendmail.crash.log for uid: 25 Date/Time: 2003-02-22 19:26:01 -0600 OS Version: 10.2.4 (Build 6I32) Host: localhost Command: sendmail PID: 1102 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000 Thread 0 Crashed: #0 0x9007a1f0 in dns_is_local_name #1 0x9007a4a4 in res_send #2 0x90079610 in res_query #3 0x90079b2c in res_querydomain #4 0x90079980 in res_search #5 0x000204e8 in getmxrr #6 0x0001fe70 in hostsignature #7 0x0004ca4c in sendtoargv #8 0x0004a810 in recipient #9 0x000374e8 in maplocaluser #10 0x0004adb0 in recipient #11 0x0003cfe0 in doworklist #12 0x0003bc54 in dowork #13 0x00041a8c in set_def_queueval #14 0x0003a654 in run_work_group #15 0x00039d30 in runqueue #16 0x00006900 in main #17 0x00001b68 in start #18 0x000019e8 in start PPC Thread State: srr0: 0x9007a1f0 srr1: 0x0000f030

Feb 22 20:26:00 localhost crashdump: Unable to write crash report to /Library/Logs/CrashReporter/sendmail.crash.log for uid: 25 Date/Time: 2003-02-22 20:26:00 -0600 OS Version: 10.2.4 (Build 6I32) Host: localhost Command: sendmail PID: 1106 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000 Thread 0 Crashed: #0 0x9007a1f0 in dns_is_local_name #1 0x9007a4a4 in res_send #2 0x90079610 in res_query #3 0x90079b2c in res_querydomain #4 0x90079980 in res_search #5 0x000204e8 in getmxrr #6 0x0001fe70 in hostsignature #7 0x0004ca4c in sendtoargv #8 0x0004a810 in recipient #9 0x000374e8 in maplocaluser #10 0x0004adb0 in recipient #11 0x0003cfe0 in doworklist #12 0x0003bc54 in dowork #13 0x00041a8c in set_def_queueval #14 0x0003a654 in run_work_group #15 0x00039d30 in runqueue #16 0x00006900 in main #17 0x00001b68 in start #18 0x000019e8 in start PPC Thread State: srr0: 0x9007a1f0 srr1: 0x0000f030
     
Registered User
Join Date: Nov 2002
Location: Far from the internet.
Status: Offline
Reply With Quote
Feb 24, 2003, 09:23 PM
 
I read the first link you posted. I had no idea it would be that hard.

Suggestions: Is sendmail running and listening on port 25? Open the terminal on the machine and type ' telnet 127.0.0.1 25 ' You should see:

220 your.server.name ESMTP

If you dont see this, skip down. If you see this, try sending some mail to yourself with the following (type in terminal, enter after each line):

helo

mail <youremail@yourhost.com>

rcpt <youremail@yourhost.com>

data

--put message here, when done, put a single dot (.) on a line and press enter--

If it fails, where does it? If not, do you get the mail?

If sendmail isnt listening on port 25, check to see if it is indeed activated (as per your instructions).
     
RGB  (op)
Mac Elite
Join Date: Jan 2002
Location: College in the Land of Oz
Status: Offline
Reply With Quote
Feb 24, 2003, 10:09 PM
 
Originally posted by benb:
I read the first link you posted. I had no idea it would be that hard.

Suggestions: Is sendmail running and listening on port 25? Open the terminal on the machine and type ' telnet 127.0.0.1 25 ' You should see:

220 your.server.name ESMTP

If you dont see this, skip down. If you see this, try sending some mail to yourself with the following (type in terminal, enter after each line):

helo

mail <youremail@yourhost.com>

rcpt <youremail@yourhost.com>

data

--put message here, when done, put a single dot (.) on a line and press enter--

If it fails, where does it? If not, do you get the mail?

If sendmail isnt listening on port 25, check to see if it is indeed activated (as per your instructions).
[localhost:~] ryan% telnet 127.0.0.1 25
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host

[localhost:~] ryan% helo
helo: Command not found.

____

So what's the next step?
     
Registered User
Join Date: Nov 2002
Location: Far from the internet.
Status: Offline
Reply With Quote
Feb 24, 2003, 10:33 PM
 
Is sendmail running? In terminal:

ps auxww | grep sendmail

you should see at least 2 processes:

user 560 0.0 0.0 1116 4 std R+ 11:22PM 0:00.00 grep sendmail

which is the process you just ran, and another, which is sendmail. If you do not see at least 2, make sure you turned on sendmail as per the instructions.

If you see 2 or more processes, is your firewall on? Check in System Preferences -> Sharing. If it is, you may need to enable port 25 in the Firewall tab. Click 'New...' and call it whatever you want, but put in 25 as the port.

I hope these help. I have never tried to run SendMail on X, so I am just going on what you have said. I tried SendMail on Linux, but the config files were way too confusing and I ended up using qMail. So if it is a config file issue, I probably won't be able to help too much. But I'll see what I can do. Maybe someone who has done this personally can chime in?
     
RGB  (op)
Mac Elite
Join Date: Jan 2002
Location: College in the Land of Oz
Status: Offline
Reply With Quote
Feb 24, 2003, 10:37 PM
 
Originally posted by benb:
Is sendmail running? In terminal:

ps auxww | grep sendmail

you should see at least 2 processes:

user 560 0.0 0.0 1116 4 std R+ 11:22PM 0:00.00 grep sendmail

which is the process you just ran, and another, which is sendmail. If you do not see at least 2, make sure you turned on sendmail as per the instructions.

If you see 2 or more processes, is your firewall on? Check in System Preferences -> Sharing. If it is, you may need to enable port 25 in the Firewall tab. Click 'New...' and call it whatever you want, but put in 25 as the port.

I hope these help. I have never tried to run SendMail on X, so I am just going on what you have said. I tried SendMail on Linux, but the config files were way too confusing and I ended up using qMail. So if it is a config file issue, I probably won't be able to help too much. But I'll see what I can do. Maybe someone who has done this personally can chime in?
It is running. But you bring up a good point... I never opened up port 25 on my router. I'll go see what happens when i do. Thanks!
     
RGB  (op)
Mac Elite
Join Date: Jan 2002
Location: College in the Land of Oz
Status: Offline
Reply With Quote
Feb 24, 2003, 11:06 PM
 
Okay I routed port 25 to this computer, but I don't think that was an issue. The form at

http://12.248.240.242/newport/index.php?page=contact

And it's slow but it goes through to my (nonexistent) thank you page. The email never gets to me though.

In my FormMail.pl file I have my mailsever set to be at:

$mailprog = '/usr/sbin/sendmail -i -t';

that's the correct location, is it not? If so, then we know the problem is definitely sendmail and not my form/script. I also think it's sendmail not anything else because I can't send an email from Mail with my outgoing server as localhost.
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Feb 24, 2003, 11:20 PM
 
Originally posted by RGB:
Okay I routed port 25 to this computer, but I don't think that was an issue. The form at

http://12.248.240.242/newport/index.php?page=contact

And it's slow but it goes through to my (nonexistent) thank you page. The email never gets to me though.

In my FormMail.pl file I have my mailsever set to be at:

$mailprog = '/usr/sbin/sendmail -i -t';

that's the correct location, is it not? If so, then we know the problem is definitely sendmail and not my form/script. I also think it's sendmail not anything else because I can't send an email from Mail with my outgoing server as localhost.
The console message you opened up was the system log, not mail's. From the console, open a new log from /var/log and open up mail.log. It will show you what it's been up to.

Having said that, there's a lot that can go wrong with a sendmail setup. First, there's the ever-present permissions problem, which can be bypased with the DONTBLAMESENDMAIL directive, or similar permissions hacks.

Then, unless you only want to send mail within your own network, you need to have DNS properly setup to have an MX record to the machine that is running the mail server. I've managed to set up a 'dummy' DNS server that works fine for virtual hosting and local testing, but would give a whole heap of unresolved DNS errors if I tried directly sending mail from that server.

I didn't bother pointing a DNS record to my machine because I only ever wanted to use SendMail for testing internally. The key here is to use masquerading and relays to divert mail from your mailserver to your ISP's mailserver. The extra nice part about this is that you will never expose your own network to spammers if it's not configured as a SMTP server.

Camelot on the Unix forums helped me out a bit - the thread was http://forums.macnn.com/90/mac-os-x/125006/best-solution-local-network-mail-setup/#post1023853

Best of luck. The Sendmail instructions are a bit tecchy but full of interesting stuff.
Computer thez nohhh...
     
Registered User
Join Date: Nov 2002
Location: Far from the internet.
Status: Offline
Reply With Quote
Feb 24, 2003, 11:22 PM
 
Originally posted by RGB:
Okay I routed port 25 to this computer, but I don't think that was an issue.

In my FormMail.pl file I have my mailsever set to be at:

$mailprog = '/usr/sbin/sendmail -i -t';

that's the correct location, is it not? If so, then we know the problem is definitely sendmail and not my form/script. I also think it's sendmail not anything else because I can't send an email from Mail with my outgoing server as localhost.
If the X's built-in firewall is not running, or port 25 is open in it, then I will have to think a bit.

That is the correct location of sendmail, with the correct flags, but that is not the problem. You cannot connect on port 25 (telnet 127.0.0.1 25 showed this). This is either because sendmail is not running, or the port is blocked. Sendmail is running as shown by ps auxww | grep sendmail. I believe that if it was configured wrong, you should be able to telnet in still, which leaves me to think that you might have that port blocked by the firewall in X.

BTW, I use FormMail, but I customized it to send a copy of the form to the email used in the form. If you'd like it, I can send it to you.
     
RGB  (op)
Mac Elite
Join Date: Jan 2002
Location: College in the Land of Oz
Status: Offline
Reply With Quote
Feb 24, 2003, 11:24 PM
 
Alright, here's my mail.log file. Hopefully someone will be able to derive my problem from this.

Feb 23 03:15:03 localhost sendmail[1183]: My unqualified host name (localhost) unknown; sleeping for retry
Feb 23 03:16:03 localhost sendmail[1183]: unable to qualify my own domain name (localhost) -- using short name
Feb 23 03:16:03 localhost sendmail[1183]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 93: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory
Feb 23 03:16:03 localhost sendmail[1183]: gethostbyaddr(192.168.0.2) failed: 3
Feb 23 22:52:57 localhost sendmail[1402]: My unqualified host name (localhost) unknown; sleeping for retry
Feb 23 22:53:15 localhost sendmail[1408]: My unqualified host name (localhost) unknown; sleeping for retry
Feb 23 22:54:15 localhost sendmail[1408]: unable to qualify my own domain name (localhost) -- using short name
Feb 23 22:54:15 localhost sendmail[1408]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 93: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory
Feb 23 22:54:16 localhost sendmail[1408]: gethostbyaddr(192.168.0.2) failed: 3
Feb 23 22:54:16 localhost sendmail[1409]: My unqualified host name (localhost) unknown; sleeping for retry
Feb 23 22:55:16 localhost sendmail[1409]: unable to qualify my own domain name (localhost) -- using short name
Feb 23 22:55:16 localhost sendmail[1410]: starting daemon (8.12.6): queueing@01:00:00
Feb 23 23:10:04 localhost sendmail[1431]: My unqualified host name (localhost) unknown; sleeping for retry
Feb 23 23:10:41 localhost sendmail[1433]: My unqualified host name (localhost) unknown; sleeping for retry
Feb 23 23:11:05 localhost sendmail[1431]: unable to qualify my own domain name (localhost) -- using short name
Feb 23 23:11:05 localhost sendmail[1431]: h1O5B5RQ001431: from=www, size=522, class=0, nrcpts=1, msgid=<200302240511.h1O5B5RQ001431@localhost>, relay=localhost
Feb 23 23:11:06 localhost sendmail[1431]: h1O5B5RQ001431: to=rabidchihuaha@mac.com, ctladdr=www (70/70), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30080, relay=localhost [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by localhost
Feb 23 23:11:42 localhost sendmail[1433]: unable to qualify my own domain name (localhost) -- using short name
Feb 23 23:11:42 localhost sendmail[1433]: h1O5BgeH001433: from=www, size=522, class=0, nrcpts=1, msgid=<200302240511.h1O5BgeH001433@localhost>, relay=localhost
Feb 23 23:11:42 localhost sendmail[1433]: h1O5BgeH001433: to=rabidchihuaha@mac.com, ctladdr=www (70/70), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30080, relay=localhost [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by localhost
Feb 23 23:26:01 localhost sendmail[1435]: h1O5B5RQ001431: to=rabidchihuaha@mac.com, ctladdr=www (70/70), delay=00:14:56, xdelay=00:00:00, mailer=relay, pri=120080, relay=localhost [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by localhost
Feb 23 23:26:01 localhost sendmail[1435]: h1O5BgeH001433: to=rabidchihuaha@mac.com, ctladdr=www (70/70), delay=00:14:19, xdelay=00:00:00, mailer=relay, pri=120080, relay=localhost, dsn=4.0.0, stat=Deferred: Connection refused by localhost
Feb 24 03:15:03 localhost sendmail[1508]: My unqualified host name (localhost) unknown; sleeping for retry
Feb 24 03:16:04 localhost sendmail[1508]: unable to qualify my own domain name (localhost) -- using short name
Feb 24 03:16:04 localhost sendmail[1508]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 93: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory
Feb 24 03:16:04 localhost sendmail[1508]: gethostbyaddr(192.168.0.2) failed: 3
Feb 24 21:28:17 localhost sendmail[388]: My unqualified host name (localhost) unknown; sleeping for retry
Feb 24 21:29:17 localhost sendmail[388]: unable to qualify my own domain name (localhost) -- using short name
Feb 24 21:29:17 localhost sendmail[388]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 93: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory
Feb 24 21:29:17 localhost sendmail[388]: File descriptors missing on startup: stdin, stdout, stderr; Bad file descriptor
Feb 24 21:29:18 localhost sendmail[388]: gethostbyaddr(192.168.0.2) failed: 3
Feb 24 21:29:18 localhost sendmail[429]: My unqualified host name (localhost) unknown; sleeping for retry
Feb 24 21:30:18 localhost sendmail[429]: unable to qualify my own domain name (localhost) -- using short name
Feb 24 21:30:19 localhost sendmail[429]: File descriptors missing on startup: stdin, stdout, stderr; Bad file descriptor
Feb 24 21:30:19 localhost sendmail[436]: starting daemon (8.12.6): queueing@01:00:00
Feb 24 22:53:18 localhost sendmail[518]: My unqualified host name (localhost) unknown; sleeping for retry
Feb 24 22:54:18 localhost sendmail[518]: unable to qualify my own domain name (localhost) -- using short name
Feb 24 22:54:18 localhost sendmail[518]: h1P4sI1t000518: from=www, size=504, class=0, nrcpts=1, msgid=<200302250454.h1P4sI1t000518@localhost>, relay=localhost
Feb 24 22:54:18 localhost sendmail[518]: h1P4sI1t000518: to=rabidchihuaha@mac.com, ctladdr=www (70/70), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30086, relay=localhost [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by localhost
     
Registered User
Join Date: Nov 2002
Location: Far from the internet.
Status: Offline
Reply With Quote
Feb 24, 2003, 11:31 PM
 
Originally posted by Simon Mundy:
Having said that, there's a lot that can go wrong with a sendmail setup. First, there's the ever-present permissions problem, which can be bypased with the DONTBLAMESENDMAIL directive, or similar permissions hacks.

Then, unless you only want to send mail within your own network, you need to have DNS properly setup to have an MX record to the machine that is running the mail server. I've managed to set up a 'dummy' DNS server that works fine for virtual hosting and local testing, but would give a whole heap of unresolved DNS errors if I tried directly sending mail from that server.
Permissions have no impact, because he is only using sendmail to mail form contents. Niether does he need an MX record to send mail. He is just initiating a SMTP connection with another SMTP server, presumably his ISP's. He would need an MX record if he were to recieve mail. I have trouble understanding why you got DNS errors when sending mail from you server. I can only see the trouble if you or he were running an open-relay, and the host was blacklisted.

Regardless, these issues are non-existant, because right now it seems that either port 25 is blocked, or that sendmail is not listening on that port.
     
RGB  (op)
Mac Elite
Join Date: Jan 2002
Location: College in the Land of Oz
Status: Offline
Reply With Quote
Feb 24, 2003, 11:47 PM
 
Okay I followed some instructions from the thread mentioned above

You already have on your machine everything you need to send mail out. It's called Sendmail.

Since you don't have a real dns/domain name, and you're not intending to receive external mail on this server, you need to make one change to /etc/mail/sendmail.cf and you're all set.

Using your favorite text editor (vi, pico, etc.), edit (using sudo) /etc/mail/sendmail.conf.

Scroll down a couple of pages until you see the lines:

# "Smart" relay host (may be null)
DS

Change the second line (DS) to include the name of your ISP's mail server, for example:

DSmail.yourisp.net

(note: no spaces!)

Save the file and restart sendmail and you're all set.

What this change does is tell sendmail not to try to deliver mail itself but instead send it to your ISP's mail server for delivery. They'll accept your mail since it's coming from their IP address space and will relay it to its final destination.
which seemed pretty applicable to me. Still a no go, however.
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Feb 25, 2003, 12:09 AM
 
Originally posted by benb:
Permissions have no impact, because he is only using sendmail to mail form contents.
I beg to differ:

Feb 23 03:16:03 localhost sendmail[1183]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 93: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory

This immediately shows RGB is suffering from that particular problem. There's a whole thread devoted to this at the link Piracy gave up the top of this thread at MacOSXHints.

Originally posted by benb:
Niether does he need an MX record to send mail. He is just initiating a SMTP connection with another SMTP server, presumably his ISP's. He would need an MX record if he were to recieve mail. I have trouble understanding why you got DNS errors when sending mail from you server. I can only see the trouble if you or he were running an open-relay, and the host was blacklisted.
Mail servers won't relay from a non-existent host - if he tried to relay to a mail server that couldn't find his IP via a reverse DNS, then that server will disallow the relay.

Originally posted by benb:
Regardless, these issues are non-existant, because right now it seems that either port 25 is blocked, or that sendmail is not listening on that port.
Mostly because of the group-writable permissions problem. A router won't affect a telnet call to 127.0.0.1.

Let me show you the particular lines I use in my config.mc file:

Code:
VERSIONID(`$Id: generic-darwin.mc,v 1.3 2002/04/12 18:41:47 bbraun Exp $') OSTYPE(darwin)dnl DOMAIN(generic)dnl undefine(`ALIAS_FILE') define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail') define(`confDONT_BLAME_SENDMAIL', `GroupWritableDirPathSafe') define(`LUSER_RELAY', `local:admin') define(`confDOMAIN_NAME', `bigpond.com') define(`SMART_HOST', `mail-hub.vic.bigpond.net.au') FEATURE(`smrsh',`/usr/libexec/smrsh') FEATURE(local_procmail) FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl FEATURE(`genericstable', `hash -o /etc/mail/genericstable')dnl FEATURE(`mailertable',`hash -o /etc/mail/mailertable')dnl FEATURE(`access_db')dnl FEATURE(always_add_domain)dnl FEATURE(`masquerade_entire_domain') FEATURE(`masquerade_envelope') FEATURE(`allmasquerade') MASQUERADE_DOMAIN(`bigpond.com.') MASQUERADE_DOMAIN(`peptolab.dev.') MASQUERADE_AS(peptolab.com) MAILER(smtp) MAILER(procmail)
This lets me send mail using my isp's domain name (bigpond.com) using their mail server (mail-hub.vic.bigpond.net.au), and instead of people receiving emails from 'me@bigpond.com', sendmail masquerades as 'me@peptolab.com'.

To fully understand how to use m4, have a look at oreilly.net where there's an excellent article on running SendMail on OS X. Basically, you use this script to compile a new 'sendmail.cf' the 'proper' way, without manually hacking any of the values.

Keep in mind, this is a very basic config file and I'm sure a sendmail guru would yell at me for including/excluding information
Computer thez nohhh...
     
RGB  (op)
Mac Elite
Join Date: Jan 2002
Location: College in the Land of Oz
Status: Offline
Reply With Quote
Feb 25, 2003, 12:17 AM
 
Originally posted by Simon Mundy:
I beg to differ:

Feb 23 03:16:03 localhost sendmail[1183]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 93: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory

This immediately shows RGB is suffering from that particular problem. There's a whole thread devoted to this at the link Piracy gave up the top of this thread at MacOSXHints.



Mail servers won't relay from a non-existent host - if he tried to relay to a mail server that couldn't find his IP via a reverse DNS, then that server will disallow the relay.



Mostly because of the group-writable permissions problem. A router won't affect a telnet call to 127.0.0.1.

Let me show you the particular lines I use in my config.mc file:

Code:
VERSIONID(`$Id: generic-darwin.mc,v 1.3 2002/04/12 18:41:47 bbraun Exp $') OSTYPE(darwin)dnl DOMAIN(generic)dnl undefine(`ALIAS_FILE') define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail') define(`confDONT_BLAME_SENDMAIL', `GroupWritableDirPathSafe') define(`LUSER_RELAY', `local:admin') define(`confDOMAIN_NAME', `bigpond.com') define(`SMART_HOST', `mail-hub.vic.bigpond.net.au') FEATURE(`smrsh',`/usr/libexec/smrsh') FEATURE(local_procmail) FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl FEATURE(`genericstable', `hash -o /etc/mail/genericstable')dnl FEATURE(`mailertable',`hash -o /etc/mail/mailertable')dnl FEATURE(`access_db')dnl FEATURE(always_add_domain)dnl FEATURE(`masquerade_entire_domain') FEATURE(`masquerade_envelope') FEATURE(`allmasquerade') MASQUERADE_DOMAIN(`bigpond.com.') MASQUERADE_DOMAIN(`peptolab.dev.') MASQUERADE_AS(peptolab.com) MAILER(smtp) MAILER(procmail)
This lets me send mail using my isp's domain name (bigpond.com) using their mail server (mail-hub.vic.bigpond.net.au), and instead of people receiving emails from 'me@bigpond.com', sendmail masquerades as 'me@peptolab.com'.

To fully understand how to use m4, have a look at oreilly.net where there's an excellent article on running SendMail on OS X. Basically, you use this script to compile a new 'sendmail.cf' the 'proper' way, without manually hacking any of the values.

Keep in mind, this is a very basic config file and I'm sure a sendmail guru would yell at me for including/excluding information
Thanks for posting your config file for me to look at, I will apply what that shows me to my own files later in the night or tomorrow, depending on when I finish my schoolwork. I'm also poking around at oreilly.com, seeing what they have to offer.

Thanks again, I'll keep you posted.
     
Registered User
Join Date: Nov 2002
Location: Far from the internet.
Status: Offline
Reply With Quote
Feb 25, 2003, 04:15 PM
 
Originally posted by Simon Mundy:
I beg to differ:

Feb 23 03:16:03 localhost sendmail[1183]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 93: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory

This immediately shows RGB is suffering from that particular problem. There's a whole thread devoted to this at the link Piracy gave up the top of this thread at MacOSXHints.

Mail servers won't relay from a non-existent host - if he tried to relay to a mail server that couldn't find his IP via a reverse DNS, then that server will disallow the relay.
I saw the sendmail log after my original post, tried to post again to say I was wrong, but the forum kept timing out, so I went to bed.

I beleive that the error now might have to do that sendmail cannot find its hostname on its own in reverse dns. I have never set up sendmail, but I know that qMail does this, and when I set that up, I needed to enter the server name manually. I think that is what this is:

Feb 23 03:15:03 localhost sendmail[1183]: My unqualified host name (localhost) unknown; sleeping for retry
Feb 23 03:16:03 localhost sendmail[1183]: unable to qualify my own domain name (localhost) -- using short name
Feb 23 03:16:03 localhost sendmail[1183]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 93: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory
Feb 23 03:16:03 localhost sendmail[1183]: gethostbyaddr(192.168.0.2) failed: 3

sendmail knows localhost is not a real name and cannot get its name by running reverse dns on 192.168.0.2. I think that is what these errors are, but I am no sendmail guru.

I was thinking more about the reverse dns and needing a mx record. I was wrong earlier. Oops.

----

RGB, if you are just going to be using this for the form, and can't get this up and running, you are welcome to use my mail server. Let me know if you would like to.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:29 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2