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


In reply to Re: Bloody sendmail by tachyon
in thread Bloody sendmail by £okì

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.