Loading...
 
Architecture / Installation

Architecture / Installation


Re : how to setup sendmail

posts: 1092

I took the liberty to copy / paste a message from redflo publish in the user list . An excellent message - thanks to redflo

Hi,

You should really try to find out why mail does not work. Here's my
receipt:

- check the maillog (/var/log/mail or similar)


- check mails of the sender for Mailer-daemon mails (Non delivery
notifications). Sender is probably owner of the webserver process.


- check the mails of postmaster (root)


- try to send a mail with unix-tools:
* sendmail method:
/usr/lib/sendmail recipient at email.com
some text. End mail with a single dot
.
* mail utility:
mail recipient at email.com
Subject: bla
some text. End mail with a single dot
.
Cc:
These tools have some debug switches: mail -v will show you some
details.


- try to send a mail using telnet:
telnet localhost smtp
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 some.hostname.com ESMTP Sendmail 8.12.11/8.12.11; Sat, 27 Nov 2004 00:53:58 +0100
ehlo bla.de
250-some.hostname.com Hello some.hostname.com 127.0.0.1, pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH CRAM-MD5 PLAIN LOGIN
250-DELIVERBY
250 HELP
mail from: wwwrun at some.hostname.com
250 2.1.0 wwwrun at some.hostname.com... Sender ok
rcpt to: someone at somewhere.com
250 2.1.5 someone at somewhere.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
some text
.
250 2.0.0 iAQNrwjj014061 Message accepted for delivery
quit
221 2.0.0 some.hostname.com closing connection
Connection closed by foreign host.


- next you should find out if php can send a mail. Write a php program:



Note that these are only basic tests. email may not be trivial if there
are mailrouting or relaying problems. Sending mail via a php-webdriven
SMTPserver script is no good idea - it usually breaks rfc's as a
mailserver may temporary reject your mail. Proper MTA's (Mail transfer
agents) retry later. You cannot do that easily with a apache-php script.
Today a growing number of SMTP servers use a feature called greylisting to
avoid spam. The principle is to reject a mail temporary. If the MTA
retries later again, the mail gets delivered. If the MTA does not try
again, he is blacklisted, because most spammer-tools use a fire & forget
mail system do do their job. So: do you want your IP blacklisted? No? Then
use sendmail/postfix/exim/qmail .... even exchange can do the job :-)

Flo

There are no comments at this time.