Sendmail

Jon Mercer jon at trojan-heroes.co.uk
Wed Feb 5 18:51:38 GMT 2003


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title></title>
</head>
<body>
Hiya,<br>
<br>
Setting up a smart host means that the host you nominate will receive
all mail that the localhost doesn't know how to deal with. What you
need to find out is why your local host thinks that the mail2 host is
the right one to contact. If this is a problem that just exists on the
local host, try doing an MX nslookup from that localhost for the domain
netsite.co.uk and see what gets sent back.<br>
<br>
If that returns the smtp host, you can rule out DNS as a source of the
error. You then need to do a rules test to see which rule is deciding
that it needs to contact mail2. This might pick up a misconfigured
mailer, or similar. You might want to run sendmail -d35.9 to see what
macros are being set at startup. If a mail2 host can be seen, there is
definitely a misconfiguration of sendmail somewhere.<br>
<br>
There may be a number of files in which mail2 could be configured into.<br>
<br>
Cheers,<br>
<br>
Jon<br>
<br>
Abdul Salam. Netsite Ltd wrote:<br>
<blockquote type="cite"
 cite="mid031501c2cd31$dff82b70$3b01a8c0 at nslocal.netsite.co.uk">
  <title></title>
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta content="MSHTML 6.00.2600.0" name="GENERATOR">
  <div><font face="Arial" size="2">Hi John,</font></div>
  <div>&nbsp;</div>
  <div><font face="Arial" size="2">Thanks for the reply. But, I still
not succeeded in this. I think this has got nothing to do with either
apache or php configurations. Looks like a pure UNIX&nbsp;sendmail
issue.&nbsp;It is not sending mail from "mail"&nbsp;command. Even there, it is
NOT displaying any errors. I added my mail server name&nbsp;as "Smart"
relay host in sendmail.cf and now, it looks like it is using the real
mail server for relay, which is smtp.mydomain.com. But, still I could
see the same error message in the log file. I have added an entry for
the "smtp.mydomain.com" in /etc/hosts aswell. Can anybody help me in
this.</font></div>
  <div>&nbsp;</div>
  <div><font face="Arial" size="2">Thanks,</font></div>
  <div>&nbsp;</div>
  <div><font face="Arial" size="2">-Abdul</font></div>
  <div>&nbsp;</div>
  <div>&nbsp;</div>
  <blockquote
 style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
    <div
 style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none;">-----
Original Message ----- </div>
    <div
 style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none;"><b>From:</b> <a
 title="jon at trojan-heroes.co.uk" href="mailto:jon at trojan-heroes.co.uk">Jon
Mercer</a> </div>
    <div
 style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none;"><b>To:</b> <a
 title="abdul at netsite.co.uk" href="mailto:abdul at netsite.co.uk">Abdul
Salam. Netsite Ltd</a> </div>
    <div
 style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none;"><b>Cc:</b> <a
 title="freebsd-users at uk.freebsd.org"
 href="mailto:freebsd-users at uk.freebsd.org">freebsd-users at uk.freebsd.org</a> </div>
    <div
 style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none;"><b>Sent:</b>
Tuesday, February 04, 2003 7:36   PM</div>
    <div
 style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none;"><b>Subject:</b>
Re: Sendmail</div>
    <div><br>
    </div>
This sounds like a sendmail configuration error, although I've   also
seen problems myself with php where it always sets the sender to <a
 href="mailto:me at localhost">me at localhost</a>. That said, DSN 4.0.0
(persistent   transient failure - RFC 1893) isn't that happening, just
a result of a   perfectly legal relay attempt to a box that doesn't
exist!<br>
    <br>
Abdul Salam.   Netsite Ltd wrote:<br>
    <blockquote
 cite="mid012801c2cc3d$cd8322f0$3b01a8c0 at nslocal.netsite.co.uk"
 type="cite">
      <meta content="MSHTML 6.00.2600.0" name="GENERATOR">
      <style></style>
      <div><font face="Arial" size="2">Hi there,</font></div>
      <div>&nbsp;</div>
      <div><font face="Arial" size="2">I have a FreeBSD running apache
along with php.     But, when I am not able to send any mails using
php, though there is no     error displayed on the web page. The php
and apache configurations seems to     be right. All mails are still
available on the queue and the     /var/log/maillog has the following
message</font></div>
    </blockquote>
The mail()   function in php doesn't return errors retrieved from the
mail subsystem, which   is very annoying. Sendmail thinks the box
mail2 is down so will queue the   message until it is too old
(probably configured as 5 days)<br>
    <br>
    <blockquote
 cite="mid012801c2cc3d$cd8322f0$3b01a8c0 at nslocal.netsite.co.uk"
 type="cite">
      <div>&nbsp;</div>
      <div><font face="Arial" size="2">&nbsp;&nbsp;&nbsp; sendmail[29496] to <a
 href="mailto:abdul at netsite.co.uk">abdul at netsite.co.uk</a> etc.. etc....
relay=mail2.mydomain.co.uk., dsn=4.0.0, stat=Deffered, Operation timed
out     with mail2.mydomain.co.uk </font></div>
      <div>&nbsp;</div>
    </blockquote>
It's well worth trying:<br>
    <br>
$ sendmail -v -bt <br>
&gt; 3,0 <a class="moz-txt-link-abbreviated"
 href="mailto:abdul at netsite.co.uk">abdul at netsite.co.uk</a><br>
    <br>
And seeing   where in the ruleset it is getting in a muddle. It sounds
like an attempted   (e)smtp to the mail2 host, which will be
configured somewhere within   sendmail.<br>
    <br>
    <blockquote
 cite="mid012801c2cc3d$cd8322f0$3b01a8c0 at nslocal.netsite.co.uk"
 type="cite">
      <div><font face="Arial" size="2">During set-up I don't remember
mentioning     mail2.mydomain.co.uk anywhere and our mail server is
smtp.mydomain.co.uk     rather than mail2. The MX records on the DNS
is pointed to this. I am not     sure, where should I enter the mail
server name, if at all I want to do it.     Any help with this will be
appreciated.</font></div>
    </blockquote>
If you didn't   configure sendmail yourself, there could be a piece of
misconfiguration   happening somewhere, and tracking down where can be
a bit of a pain in the   *rse. Depends on whether sendmail was
configured with the m4 macros, or if it   was hacked in the
sendmail.cf. First things first, doa cheack of all the files   in
/etc/mail to see if there is something obvious.<br>
    <br>
    <blockquote
 cite="mid012801c2cc3d$cd8322f0$3b01a8c0 at nslocal.netsite.co.uk"
 type="cite">
      <div>&nbsp;</div>
      <div><font face="Arial" size="2">Cheers!</font></div>
      <div>&nbsp;</div>
      <div><font face="Arial" size="2">-Abdul</font></div>
      <div>&nbsp;</div>
    </blockquote>
Jon<br>
    <br>
  </blockquote>
</blockquote>
</body>
</html>





More information about the Ukfreebsd mailing list