in reply to Bloody sendmail

It would really help if you posted code. When you say you have a linux server set up does this mean you have full shell access to a real server, a virtual server or what?

I am a bit concerned about your understanding of how mail works. IMAP stands for Internet Message Access Protocol. It is a method of *accessing* electronic mail or bulletin board messages that are kept on a mail server. It is an *access protocol* and has nothing to do with sending mail from your server. So to is POP3 an access protocol.

Sendmail is a MTA (Mail Transfer Agent) that can send mail to a mail server where client software can pick it up via POP3 or IMAP or blah. Mail is sent by SMTP (Simple Message Transport Protocol) on port 25. POP3 and IMAP are simply methods of accessing mail sent by SMTP - OK?

In the old days you could send mail to a server running an MTA and that server would typically RELAY it for you to its destination. With the advent of SPAM most servers now refuse to RELAY by default. This typically means they will not send mail that does not come from the local network (or even send any mail at all). You typically need to enable relaying. The /etc/hosts file and DNS works hand in hand with MTA's. Your MTA consult's these to determine what is and is not local, who can relay etc. These need to be right or your MTA will have issues.

I would try some basic debugging. You should be able to telnet into the MTA on port 25:

[root@www root]# telnet localhost 25 # you should see a response like Trying 209.x.x.x... Connected to localhost. Escape character is '^]'. 220 www.foo.bar.com ESMTP Sendmail 8.11.6/8.11.6; Tue, 31 Dec 2002 22: +43:55 -0600 # type this helo localhost 250 www.foo.bar.com Hello www.foo.bar.com[209.x.x.x], pleased to meet +you # type quit to logout quit 221 2.0.0 www.foo.bar.com closing connection Connection closed by foreign host. [root@www root]#

This proves one way or another if you have a functioning mailserver running. If you do you should then be able to send a sendmail message on the command line. Type this:

$ sendmail -t To: me@mysite.com Subject: Sendmail That worked . $

That should send an email to me@mysite. You end the message with a . on a line by itself. If a . does not work to terminate the message then you have the QMAIL SENDMAIL WRAPPER and will need to use Ctl+D

If this works then you are probably down to a permissions problem or a syntax issue with your script so post the code.

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: Re: Bloody sendmail
by £okì (Scribe) on Jan 04, 2003 at 03:50 UTC
    Ok, the basics. I have a linux box server in my basement. Unfortuantly, since yesterday, I have moved 800 miles away. Yet, I have full shell access and can do just about anything that could be done on the prompt of the server. (ie. I am the system admin) Running RHLinux Psyche. The server is running Sendmail 10. I'm familar with the protocol and what it all means along with the basics of how MTA works. My problem is this, I can't figure out why, it's trying to send things from localhost.nycap.rr.com. It shouldn't even KNOW that dns as far as I know. The server should think it's domain is finn.ws and that nycap.rr.com is just a hop. Unless of course it's going out and trying to determine it's dns from the routers. . . I can't "allow" localhost.nycap.rr.com because that just simply doesn't exist (nycap.rr.com is the New York Capital Area Roadrunner domain) localhost would just not fit there. At this point what I really think my problem may be is that it's trying to send from that dns instead of my domain. . I have no idea why it would do this nor why other trials with languages like PHP would do the same. .


    Furthermore. the mail server is functional. I DO send mail from inside my domain and outside with this server using client side applications like IE and Netscape on machines from on internal networks to Chili. . .

    I hope that clears up any ambiguity with my previous messages. I didn't add any code here as I've gotten the same results with PHP, Perl and am not getting any errors on that side. The only place I find errors is in my maillog files. (I don't even have any mail sitting in que). The maillog errors are c/p'd above.

    Thanks for all your advice so far. I have found things that were wrong from your advice unforunatly they had nothing to do with this problem.

    I'm frightened by what I see, but somehow I know that there is much more to come.

      Hi, I asked you to do a couple of simple diagnostic things and report the results. From what you have said in this post it appears you have not done them. Here it is in a nutshell. Your configuration is broken - it does not work. You don't know why. I have suggested you do some things which you appear not to have done. It therefore appears to me that I am wasting my time.

      I would suggest the easiest way for you to learn what you need and get your system working will be to install qmail (2nd most popular MTA after sendmail and much more secure and easy to configure). Life With Qmail will show you how.

      Your name resolution is almost certainly screwed. Name resolution comes from either /etc/hosts or DNS. The order is set in /etc/nsswitch.conf . You can test the results with nslookup or dig. This is a very good tutorial on BIND and DNS applicable to Redhat

      cheers

      tachyon

      s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

        Hi, I didn't need the diagonistics you suggested as I have all the answers I need. If you read my complete message you would be able to see that the config file is not broken as I am able to use the sendmail MTA quite completely. I could probably make it work by opening up to the whole nycap.rr.com domain, however, I don't wish to open up a hole like that.


        Furthermore, I know all about qmail and have decided it's not what I want. I have three years of sendmail under my belt and no wish to convert now to a product I do not think is sendmail's equal. Also, why would I take down a system that is running perfectly in all but ONE case and replace it with an untested one? I shall have to check with nsswitch as my etc/hosts is also correct.

        Finally, I would be nice if you didn't portray an image of superiority to people who post. It comes off as being arrogant and ignorant of what other people are doing. I do take what you have to say to heart and have checked those things but have done so in the past. If the whole thread was read, your questions would have been answered before you asked them. I'm frightened by what I see, but somehow I know that there is much more to come.
Re: Re: Bloody sendmail
by £okì (Scribe) on Jan 04, 2003 at 05:44 UTC
    Hi, I didn't need the diagonistics you suggested as I have all the answers I need. If you read my complete message you would be able to see that the config file is not broken as I am able to use the sendmail MTA quite completely. I could probably make it work by opening up to the whole nycap.rr.com domain, however, I don't wish to open up a hole like that.


    Furthermore, I know all about qmail and have decided it's not what I want. I have three years of sendmail under my belt and no wish to convert now to a product I do not think is sendmail's equal. Also, why would I take down a system that is running perfectly in all but ONE case and replace it with an untested one? I shall have to check with nsswitch as my etc/hosts is also correct.

    Finally, I would be nice if you didn't portray an image of superiority to people who post. It comes off as being arrogant and ignorant of what other people are doing. I do take what you have to say to heart and have checked those things but have done so in the past. If the whole thread was read, your questions would have been answered before you asked them.

    I'm frightened by what I see, but somehow I know that there is much more to come.