Sendmail

Abdul Salam. Netsite Ltd abdul at netsite.co.uk
Thu Feb 6 10:10:08 GMT 2003


This is a multi-part message in MIME format.

------=_NextPart_000_0380_01C2CDC7.ED85F380
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi John,

Thanks again. I have tried many tests on the server and everything looks =
fine. I am able to send and receive mail to the different users of the =
server. When I do a "dig" on MX records I am getting the following =
message

; <<>> DiG 8.3 <<>> apache.netsite.co.uk mx=20
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUERY SECTION:
;;	apache.netsite.co.uk, type =3D MX, class =3D IN

;; AUTHORITY SECTION:
netsite.co.uk.		30S IN SOA	ns0.netsite.co.uk. andy.netsite.co.uk. (
					184		; serial
					1H		; refresh
					10M		; retry
					1D		; expiry
					30S )		; minimum


;; Total query time: 1 msec
;; FROM: apache.netsite.co.uk to SERVER: default -- 217.33.114.5
;; WHEN: Thu Feb  6 09:23:08 2003
;; MSG SIZE  sent: 38  rcvd: 83

Which has an MX entry. So, I hope I can rule out any DNS issue now. =
Right..?. I am able to telnet to port 25 aswell. So, I can rule out
the possibility of sendmail daemon not running properly, yes..?.I have =
now added my domains (apache.netsite.co.uk)=20
in /etc/mail/local-host-names aswell as /etc/mail/relay-domains. Still =
it is NOT sending or receiving external mails. Here is
my /etc/log/maillog entry.

Feb  6 09:44:50 apache sendmail[958]: h169inc00956: =
to=3Dabdul at netsite.co.uk, ctladdr=3Dabdul (1001/0),=20
delay=3D00:00:01, xdelay=3D00:00:01, mailer=3Drelay, pri=3D30046, =
relay=3Dsmtp.netsite.co.uk., dsn=3D4.0.0,=20
stat=3DDeferred: Operation timed out with smtp.netsite.co.uk.

Now, since the domain is exposed (apache.netsite.co.uk), you will also =
be able to do some tests on your end, if you wish.
Please let me know, if anything comes up.

Cheers!
-Abdul

----- Original Message -----=20
  From: Jon Mercer=20
  To: Abdul Salam. Netsite Ltd=20
  Cc: freebsd-users at uk.freebsd.org=20
  Sent: Wednesday, February 05, 2003 6:51 PM
  Subject: Re: Sendmail


  Hiya,

  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.

  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.

  There may be a number of files in which mail2 could be configured =
into.

  Cheers,

  Jon

  Abdul Salam. Netsite Ltd wrote:

    Hi John,

    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 sendmail issue. It is not sending mail from =
"mail" command. Even there, it is NOT displaying any errors. I added my =
mail server name 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.

    Thanks,

    -Abdul


      ----- Original Message -----=20
      From: Jon Mercer=20
      To: Abdul Salam. Netsite Ltd=20
      Cc: freebsd-users at uk.freebsd.org=20
      Sent: Tuesday, February 04, 2003 7:36 PM
      Subject: Re: Sendmail


      This sounds like a sendmail configuration error, although I've =
also seen problems myself with php where it always sets the sender to =
me at localhost. 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!

      Abdul Salam. Netsite Ltd wrote:

        Hi there,

        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
      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)



            sendmail[29496] to abdul at netsite.co.uk etc.. etc.... =
relay=3Dmail2.mydomain.co.uk., dsn=3D4.0.0, stat=3DDeffered, Operation =
timed out with mail2.mydomain.co.uk=20

      It's well worth trying:

      $ sendmail -v -bt=20
      > 3,0 abdul at netsite.co.uk

      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.


        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.
      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.



        Cheers!

        -Abdul

      Jon



------=_NextPart_000_0380_01C2CDC7.ED85F380
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR></HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi John,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks again. I have tried many tests =
on the server=20
and everything looks fine. I am able to send and receive mail to the =
different=20
users of the server. When I do a "dig" on MX records I am getting the =
following=20
message</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><PRE>; &lt;&lt;&gt;&gt; DiG 8.3 &lt;&lt;&gt;&gt; =
apache.netsite.co.uk mx=20
;; res options: init recurs defnam dnsrch
;; got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 4
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUERY SECTION:
;;	apache.netsite.co.uk, type =3D MX, class =3D IN

;; AUTHORITY SECTION:
netsite.co.uk.		30S IN SOA	ns0.netsite.co.uk. andy.netsite.co.uk. (
					184		; serial
					1H		; refresh
					10M		; retry
					1D		; expiry
					30S )		; minimum


;; Total query time: 1 msec
;; FROM: apache.netsite.co.uk to SERVER: default -- 217.33.114.5
;; WHEN: Thu Feb  6 09:23:08 2003
;; MSG SIZE  sent: 38  rcvd: 83
</PRE><PRE><FONT face=3DArial>Which has an MX entry. So, I hope I can =
rule out any DNS issue now. Right..?. I am able to telnet to port 25 =
aswell. So, I can rule out</FONT></PRE><PRE><FONT face=3DArial>the =
possibility of sendmail daemon not running properly, yes..?.</FONT><FONT =
face=3DArial>I have now added my domains (apache.netsite.co.uk) =
</FONT></PRE><PRE><FONT face=3DArial>i</FONT><FONT face=3DArial>n =
/etc/mail/local-host-names aswell as /etc/mail/relay-domains. Still it =
is NOT sending or receiving external mails. Here =
is</FONT></PRE><PRE><FONT face=3DArial>my /etc/log/maillog =
entry.</FONT></PRE><PRE>&nbsp;</PRE><PRE>Feb  6 09:44:50 apache =
sendmail[958]: h169inc00956: to=3Dabdul at netsite.co.uk, ctladdr=3Dabdul =
(1001/0), </PRE><PRE>delay=3D00:00:01, xdelay=3D00:00:01, =
mailer=3Drelay, pri=3D30046, relay=3Dsmtp.netsite.co.uk., dsn=3D4.0.0, =
</PRE><PRE><FONT color=3D#ff0000>stat=3DDeferred: Operation timed out =
with smtp.netsite.co.uk.
</FONT><FONT face=3DArial></FONT></PRE><PRE><FONT face=3DArial>Now, =
since the domain is exposed (apache.netsite.co.uk), you will also be =
able to do some tests on your end, if you wish.</FONT></PRE><PRE><FONT =
face=3DArial>Please let me know, if anything comes =
up.</FONT></PRE><PRE>&nbsp;</PRE><PRE>Cheers!</PRE><PRE>-Abdul</PRE><PRE>=
&nbsp;</PRE></DIV>
<DIV><PRE>----- Original Message ----- </PRE></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A title=3Djon at trojan-heroes.co.uk =
href=3D"mailto:jon at trojan-heroes.co.uk">Jon=20
  Mercer</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=3Dabdul at netsite.co.uk=20
  href=3D"mailto:abdul at netsite.co.uk">Abdul Salam. Netsite Ltd</A> =
</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Cc:</B> <A =
title=3Dfreebsd-users at uk.freebsd.org=20
  =
href=3D"mailto:freebsd-users at uk.freebsd.org">freebsd-users at uk.freebsd.org=
</A>=20
  </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Wednesday, February 05, =
2003 6:51=20
  PM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: Sendmail</DIV>
  <DIV><FONT face=3DArial size=3D2></FONT><BR></DIV>Hiya,<BR><BR>Setting =
up a smart=20
  host means that the host you nominate will receive all mail that the =
localhost=20
  doesn't know how to deal with. What you need to find out is why your =
local=20
  host thinks that the mail2 host is the right one to contact. If this =
is a=20
  problem that just exists on the local host, try doing an MX nslookup =
from that=20
  localhost for the domain netsite.co.uk and see what gets sent =
back.<BR><BR>If=20
  that returns the smtp host, you can rule out DNS as a source of the =
error. You=20
  then need to do a rules test to see which rule is deciding that it =
needs to=20
  contact mail2. This might pick up a misconfigured mailer, or similar. =
You=20
  might want to run sendmail -d35.9 to see what macros are being set at =
startup.=20
  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=20
  be configured into.<BR><BR>Cheers,<BR><BR>Jon<BR><BR>Abdul Salam. =
Netsite Ltd=20
  wrote:<BR>
  <BLOCKQUOTE =
cite=3Dmid031501c2cd31$dff82b70$3b01a8c0 at nslocal.netsite.co.uk=20
  type=3D"cite">
    <META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
    <DIV><FONT face=3DArial size=3D2>Hi John,</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
    <DIV><FONT face=3DArial size=3D2>Thanks for the reply. But, I still =
not=20
    succeeded in this. I think this has got nothing to do with either =
apache or=20
    php configurations. Looks like a pure UNIX&nbsp;sendmail =
issue.&nbsp;It is=20
    not sending mail from "mail"&nbsp;command. Even there, it is NOT =
displaying=20
    any errors. I added my mail server name&nbsp;as "Smart" relay host =
in=20
    sendmail.cf and now, it looks like it is using the real mail server =
for=20
    relay, which is smtp.mydomain.com. But, still I could see the same =
error=20
    message in the log file. I have added an entry for the =
"smtp.mydomain.com"=20
    in /etc/hosts aswell. Can anybody help me in this.</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
    <DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
    <DIV><FONT face=3DArial size=3D2>-Abdul</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
    <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
    <BLOCKQUOTE=20
    style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: rgb(0,0,0) 2px solid; MARGIN-RIGHT: 0px">
      <DIV=20
      style=3D"FONT: 10pt arial; font-stretch: normal; font-size-adjust: =
none">-----=20
      Original Message ----- </DIV>
      <DIV=20
      style=3D"BACKGROUND: rgb(228,228,228) 0% 50%; FONT: 10pt arial; =
font-stretch: normal; font-size-adjust: none; moz-background-clip: =
initial; moz-background-origin: initial"><B>From:</B>=20
      <A title=3Djon at trojan-heroes.co.uk =
href=3D"mailto:jon at trojan-heroes.co.uk">Jon=20
      Mercer</A> </DIV>
      <DIV=20
      style=3D"FONT: 10pt arial; font-stretch: normal; font-size-adjust: =
none"><B>To:</B>=20
      <A title=3Dabdul at netsite.co.uk =
href=3D"mailto:abdul at netsite.co.uk">Abdul=20
      Salam. Netsite Ltd</A> </DIV>
      <DIV=20
      style=3D"FONT: 10pt arial; font-stretch: normal; font-size-adjust: =
none"><B>Cc:</B>=20
      <A title=3Dfreebsd-users at uk.freebsd.org=20
      =
href=3D"mailto:freebsd-users at uk.freebsd.org">freebsd-users at uk.freebsd.org=
</A>=20
      </DIV>
      <DIV=20
      style=3D"FONT: 10pt arial; font-stretch: normal; font-size-adjust: =
none"><B>Sent:</B>=20
      Tuesday, February 04, 2003 7:36 PM</DIV>
      <DIV=20
      style=3D"FONT: 10pt arial; font-stretch: normal; font-size-adjust: =
none"><B>Subject:</B>=20
      Re: Sendmail</DIV>
      <DIV><FONT face=3DArial size=3D2></FONT><BR></DIV>This sounds like =
a sendmail=20
      configuration error, although I've also seen problems myself with =
php=20
      where it always sets the sender to <A=20
      href=3D"mailto:me at localhost">me at localhost</A>. That said, DSN =
4.0.0=20
      (persistent transient failure - RFC 1893) isn't that happening, =
just a=20
      result of a perfectly legal relay attempt to a box that doesn't=20
      exist!<BR><BR>Abdul Salam. Netsite Ltd wrote:<BR>
      <BLOCKQUOTE =
cite=3Dmid012801c2cc3d$cd8322f0$3b01a8c0 at nslocal.netsite.co.uk=20
      type=3D"cite">
        <META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
        <STYLE></STYLE>

        <DIV><FONT face=3DArial size=3D2>Hi there,</FONT></DIV>
        <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
        <DIV><FONT face=3DArial size=3D2>I have a FreeBSD running apache =
along with=20
        php. But, when I am not able to send any mails using php, though =
there=20
        is no error displayed on the web page. The php and apache =
configurations=20
        seems to be right. All mails are still available on the queue =
and the=20
        /var/log/maillog has the following =
message</FONT></DIV></BLOCKQUOTE>The=20
      mail() function in php doesn't return errors retrieved from the =
mail=20
      subsystem, which is very annoying. Sendmail thinks the box mail2 =
is down=20
      so will queue the message until it is too old (probably configured =
as 5=20
      days)<BR><BR>
      <BLOCKQUOTE =
cite=3Dmid012801c2cc3d$cd8322f0$3b01a8c0 at nslocal.netsite.co.uk=20
      type=3D"cite">
        <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
        <DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
sendmail[29496] to <A=20
        href=3D"mailto:abdul at netsite.co.uk">abdul at netsite.co.uk</A> =
etc.. etc....=20
        relay=3Dmail2.mydomain.co.uk., dsn=3D4.0.0, stat=3DDeffered, =
Operation timed=20
        out with mail2.mydomain.co.uk </FONT></DIV>
        <DIV><FONT face=3DArial =
size=3D2></FONT>&nbsp;</DIV></BLOCKQUOTE>It's well=20
      worth trying:<BR><BR>$ sendmail -v -bt <BR>&gt; 3,0 <A=20
      class=3Dmoz-txt-link-abbreviated=20
      =
href=3D"mailto:abdul at netsite.co.uk">abdul at netsite.co.uk</A><BR><BR>And=20
      seeing where in the ruleset it is getting in a muddle. It sounds =
like an=20
      attempted (e)smtp to the mail2 host, which will be configured =
somewhere=20
      within sendmail.<BR><BR>
      <BLOCKQUOTE =
cite=3Dmid012801c2cc3d$cd8322f0$3b01a8c0 at nslocal.netsite.co.uk=20
      type=3D"cite">
        <DIV><FONT face=3DArial size=3D2>During set-up I don't remember =
mentioning=20
        mail2.mydomain.co.uk anywhere and our mail server is =
smtp.mydomain.co.uk=20
        rather than mail2. The MX records on the DNS is pointed to this. =
I am=20
        not sure, where should I enter the mail server name, if at all I =
want to=20
        do it. Any help with this will be =
appreciated.</FONT></DIV></BLOCKQUOTE>If=20
      you didn't configure sendmail yourself, there could be a piece of=20
      misconfiguration happening somewhere, and tracking down where can =
be a bit=20
      of a pain in the *rse. Depends on whether sendmail was configured =
with the=20
      m4 macros, or if it was hacked in the sendmail.cf. First things =
first, doa=20
      cheack of all the files in /etc/mail to see if there is something=20
      obvious.<BR><BR>
      <BLOCKQUOTE =
cite=3Dmid012801c2cc3d$cd8322f0$3b01a8c0 at nslocal.netsite.co.uk=20
      type=3D"cite">
        <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
        <DIV><FONT face=3DArial size=3D2>Cheers!</FONT></DIV>
        <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
        <DIV><FONT face=3DArial size=3D2>-Abdul</FONT></DIV>
        <DIV><FONT face=3DArial=20
    =
size=3D2></FONT>&nbsp;</DIV></BLOCKQUOTE>Jon<BR><BR></BLOCKQUOTE></BLOCKQ=
UOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0380_01C2CDC7.ED85F380--





More information about the Ukfreebsd mailing list