More fun and games with sendmail/m4

Jeff LaCoursiere jeff at jeff.net
Tue Mar 7 14:17:41 GMT 2006


Haven't really followed this thread, but you might consider dumping
sendmail for exim... :)  I was happy to finally make this switch myself
recently...

Hows bloody england, Alan?

j

On Tue, 7 Mar 2006, CB wrote:

> Thanks for your quick response Alan
>
>
>
> =91mailq =96v=92 gives: /var/spool/mqueue is empty
>
> =91runq=92 not found
>
> =91sendmail =96vq=92 gives: sendmail: option requires an argument =96q
>
> (I gave it /var/spool/mqueue as an argument but it just came back with
> =93Invalid time unit `/=92=94 over and over for each character in the pat=
hname
> string /var/spool/mqueue )
>
>
>
> /var/log/maillog contains:
>
> Mar  7 00:00:00 euclid newsyslog[1035]: logfile turned over
>
> Mar  7 03:02:04 euclid sendmail[1645]: k2732489001645: from=3Droot, size=
=3D345,
> class=3D0, nrcpts=3D1, msgid=3D<200603070302.k2732489001645 at euclid.edcv>,
> relay=3Droot at localhost
>
> Mar  7 03:02:05 euclid sendmail[1693]: k27325Ok001693: from=3Droot, size=
=3D1809,
> class=3D0, nrcpts=3D1, msgid=3D<200603070302.k27325Ok001693 at euclid.edcv>,
> relay=3Droot at localhost
>
> Mar  7 03:02:05 euclid sendmail[1651]: k27324Tg001651:
> from=3D<root at euclid.edcv>, size=3D635, class=3D0, nrcpts=3D1,
> msgid=3D<200603070302.k2732489001645 at euclid.edcv>, proto=3DESMTP, daemon=
=3DIPv4,
> relay=3Dlocalhost.edcv [127.0.0.1]
>
> Mar  7 03:02:05 euclid sendmail[1645]: k2732489001645: to=3Droot, ctladdr=
=3Droot
> (0/0), delay=3D00:00:01, xdelay=3D00:00:01, mailer=3Drelay, pri=3D30345,
> relay=3D[127.0.0.1] [127.0.0.1], dsn=3D2.0.0, stat=3DSent (k27324Tg001651=
 Message
> accepted for delivery)
>
> Mar  7 03:02:05 euclid sendmail[1696]: k27324Tg001651:
> to=3D<root at euclid.edcv>, ctladdr=3D<root at euclid.edcv> (0/0), delay=3D00:0=
0:00,
> xdelay=3D00:00:00, mailer=3Dlocal, pri=3D30874, relay=3Dlocal, dsn=3D2.0.=
0, stat=3DSent
>
> Mar  7 03:02:05 euclid sendmail[1695]: k273256W001695:
> from=3D<root at euclid.edcv>, size=3D2099, class=3D0, nrcpts=3D1,
> msgid=3D<200603070302.k27325Ok001693 at euclid.edcv>, proto=3DESMTP, daemon=
=3DIPv4,
> relay=3Dlocalhost.edcv [127.0.0.1]
>
> Mar  7 03:02:05 euclid sendmail[1693]: k27325Ok001693: to=3Droot, ctladdr=
=3Droot
> (0/0), delay=3D00:00:00, xdelay=3D00:00:00, mailer=3Drelay, pri=3D31809,
> relay=3D[127.0.0.1] [127.0.0.1], dsn=3D2.0.0, stat=3DSent (k273256W001695=
 Message
> accepted for delivery)
>
> Mar  7 03:02:05 euclid sendmail[1698]: k273256W001695:
> to=3D<root at euclid.edcv>, ctladdr=3D<root at euclid.edcv> (0/0), delay=3D00:0=
0:00,
> xdelay=3D00:00:00, mailer=3Dlocal, pri=3D32338, relay=3Dlocal, dsn=3D2.0.=
0, stat=3DSent
>
> Mar  7 10:15:44 euclid sendmail[2585]: k27AFVDt002585: lost input channel
> from [222.161.183.70] to IPv4 after mail
>
> Mar  7 10:15:44 euclid sendmail[2585]: k27AFVDt002585:
> from=3D<cottage at corymore.com>, size=3D0, class=3D0, nrcpts=3D0, proto=3DS=
MTP,
> daemon=3DIPv4, relay=3D[222.161.183.70]
>
> Mar  7 11:55:56 euclid sendmail[2794]: k27Btu7g002794: from=3Droot, size=
=3D46,
> class=3D0, nrcpts=3D1, msgid=3D<200603071155.k27Btu7g002794 at euclid.edcv>,
> relay=3Droot at localhost
>
> Mar  7 11:55:56 euclid sendmail[2795]: k27BtucY002795:
> from=3D<root at euclid.edcv>, size=3D349, class=3D0, nrcpts=3D1,
> msgid=3D<200603071155.k27Btu7g002794 at euclid.edcv>, proto=3DESMTP, daemon=
=3DIPv4,
> relay=3Dlocalhost.edcv [127.0.0.1]
>
> Mar  7 11:55:56 euclid sendmail[2794]: k27Btu7g002794:
> to=3Dcharles-brewster at ntlworld.com, ctladdr=3Droot (0/0), delay=3D00:00:0=
0,
> xdelay=3D00:00:00, mailer=3Drelay, pri=3D30046, relay=3D[127.0.0.1] [127.=
0.0.1],
> dsn=3D2.0.0, stat=3DSent (k27BtucY002795 Message accepted for delivery)
>
> Mar  7 11:55:57 euclid sendmail[2797]: k27BtucY002795:
> to=3D<charles-brewster at ntlworld.com>, ctladdr=3D<root at euclid.edcv> (0/0),
> delay=3D00:00:01, xdelay=3D00:00:01, mailer=3Drelay, pri=3D30349,
> relay=3Dsmtp.adsl4less.com. [62.89.140.251], dsn=3D2.0.0, stat=3DSent (Ok=
: queued
> as 494532B2A65)
>
>
>
> The sendmail daemon is started  from rc.conf with the lines:
>
>
>
> sendmail_enable=3D"YES"
>
> sendmail_flags=3D"-bd -q30m"
>
>
>
> Looking through the above, I=92ll try changing the outgoing mail =93smart=
 host=94
> setting to =91smtp.ntlworld.com=92 (my other ISP mail account) as I have =
that
> working fine for emails sent out from perl scripts on my MS Windows machi=
ne
> on the same LAN.
>
>
>
> Any further suggestions you might have would be much appreciated.
>
>
>
> Best regards
>
> Charles B
>
>
>
>
>
>   _____
>
> From: Edmonds, Alan [mailto:Alan.Edmonds at t-mobile.net]
> Sent: 07 March 2006 12:34
> To: CB
> Subject: RE: More fun and games with sendmail/m4
>
>
>
> is there something in the outbound queue (try mailq -v)?
>
> Try processing the outbound queue (runq or sendmail -vq).
>
> what's in the mail log (/var/log/maillog)?
>
> is the daemon started with -bd -q10m (process outbound queue every 10
> minutes)?
>
> -----Original Message-----
> From: freebsd-users-admin at uk.freebsd.org
> [mailto:freebsd-users-admin at uk.freebsd.org]On Behalf Of CB
> Sent: 07 March 2006 12:09
> To: freebsd-users at uk.freebsd.org
> Subject: More fun and games with sendmail/m4
>
> Hello again
>
>
>
> Using FreeBSD 5.3 I=92ve got sendmail-8.13.5 up and running as a daemon a=
nd am
> able to use the shell prompt to send email to myself on the local machine=
 as
> root using commands like:
>
> /usr/sbin/sendmail =96v root <sendstuff
>
> where sendstuff is a text file with a test message.
>
>
>
> It works also if I send to root at euclid.edcv where =91euclid=92 is the nam=
e of
> the box on the network and =91edcv=92 is the local domain name for my LAN=
=2E
>
>
>
> If I try to send the same message to the outside world, say to
> charles-brewster at ntlworld.com , it looks as if sendmail is sending out, b=
ut
> nothing is arriving. The =91-v=92 output is as follows:
>
>
>
> charles-brewster at ntlworld.com... Connecting to [127.0.0.1] via relay...
>
> 220 euclid.edcv ESMTP Sendmail 8.13.5/8.13.1; Tue, 7 Mar 2006 11:55:56 GM=
T
>
> >>> EHLO euclid.edcv
>
> 250-euclid.edcv Hello localhost.edcv [127.0.0.1], pleased to meet you
>
> 250-ENHANCEDSTATUSCODES
>
> 250-PIPELINING
>
> 250-8BITMIME
>
> 250-SIZE
>
> 250-DSN
>
> 250-ETRN
>
> 250-DELIVERBY
>
> 250 HELP
>
> >>> MAIL From:<root at euclid.edcv> SIZE=3D46
>
> 250 2.1.0 <root at euclid.edcv>... Sender ok
>
> >>> RCPT To:<charles-brewster at ntlworld.com>
>
> >>> DATA
>
> 250 2.1.5 <charles-brewster at ntlworld.com>... Recipient ok
>
> 354 Enter mail, end with "." on a line by itself
>
> >>> .
>
> 250 2.0.0 k27BtucY002795 Message accepted for delivery
>
> charles-brewster at ntlworld.com... Sent (k27BtucY002795 Message accepted fo=
r
> delivery)
>
> Closing connection to [127.0.0.1]
>
> >>> QUIT
>
> 221 2.0.0 euclid.edcv closing connection
>
>
>
>
>
> It looks to me as if sendmail is passing on the message to the local mach=
ine
> but that it is not getting any further.
>
>
>
> I=92ve got this far by editing /etc/mail/sendmail.cf directly by hand, si=
nce I
> can=92t get =91Build =96c=92 to work.
>
>
>
> I=92ve tried with and without a value after the DS in these sendmail.cf l=
ines
>
> # "Smart" relay host (may be null)
>
> DSsmtp.adsl4less.com
>
>
>
> I=92ve got the sendmail source files unpacked in
> /root/install_software/sendmail/sendmail-8.13.5 and I=92m running Build f=
rom
> that directory logged in as root.
>
>
>
> When I try to create sendmail.cf using a .mc file copied to
> /devtools/Site/site.config.m4 (just the standard FreeBSD offering from th=
e
> distro with a couple of edits to properly generate the changes hacked int=
o
> sendmail.cf) it throws up errors on the console beginning as follows:
>
> =93Makefile=94, line 2: Error in archive specification: =93VERSIONID=94
>
>
>
> Line 2 in
> /root/install_software/sendmail/sendmail-8.13.5/obj.FreeBSD.5.3-RELEASE.i=
386
> /libsm/Makefile is:
>
> VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.29 2003/12/24 21:15:=
09
> gshapiro Exp $')
>
>
>
> Sending the console o/p of Build to a text file it looks as follows:
>
>
>
> Making all in:
>
> /root/install_software/sendmail/sendmail-8.13.5/libsm
>
> Configuration: pfx=3D, os=3DFreeBSD, rel=3D5.3-RELEASE, rbase=3D5,
> rroot=3D5.3-RELEASE, arch=3Di386, sfx=3D, variant=3Doptimized
>
> Clearing out existing
> /root/install_software/sendmail/sendmail-8.13.5/obj.FreeBSD.5.3-RELEASE.i=
386
> /libsm tree
>
> Using M4=3D/usr/bin/m4
>
> Creating
> /root/install_software/sendmail/sendmail-8.13.5/obj.FreeBSD.5.3-RELEASE.i=
386
> /libsm using
> /root/install_software/sendmail/sendmail-8.13.5/devtools/OS/FreeBSD
>
> Including
> /root/install_software/sendmail/sendmail-8.13.5/devtools/Site/site.config=
=2Em4
>
>
> Making dependencies in
> /root/install_software/sendmail/sendmail-8.13.5/obj.FreeBSD.5.3-RELEASE.i=
386
> /libsm
>
> No closing parenthesis in archive specification
>
> Making in
> /root/install_software/sendmail/sendmail-8.13.5/obj.FreeBSD.5.3-RELEASE.i=
386
> /libsm
>
> No closing parenthesis in archive specification
>
> *** Error code 1
>
>
>
> Stop in /root/install_software/sendmail/sendmail-8.13.5.
>
>
>
> To see what happened, I tried replacing the FreeBSD VERSIONID line in
> devtools/Site/site.config.m4 with the one for BSD4.4 from the distro if
> cf/cf
>
>
>
> VERSIONID($Id: generic-bsd4.4.mc,v 8.10 1999/02/07 07:26:02 gshapiro Exp =
$)
>
>
>
> but it throws the same error(s).
>
>
>
> Can anyone who is used to looking at these files spot anything
> unusual-looking? Is there some variable or option I should be
> setting/changing to get it to work?
>
>
>
> Does anybody have a sendmail m4 file for FreeBSD 5.3 which works/compiles
> which they would be prepared to share for me to try to modify? Any pointe=
rs
> to something suitable online?
>
>
>
> Needs are simple (I think) =96 to send/receive email across the LAN and
> to/from the outside world. For external email I have two ISP mail account=
s
> which will accept smtp. I also have a couple of internet domain MX record=
s
> pointing to my IP address and would like to use these to set up and servi=
ce
> email addresses on those domains, but not necessarily immediately.
>
>
>
> Apologies for =96v mode.
>
> Many thanks for any help.
>
>
>
> Charles Brewster
>
>
>
>
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Please note: the text below is appended
> automatically by my ISP to any mail routed
> through their SMTP server. It should not
> be interpreted as a personal endorsement.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
>
>
>
>
>
> 512k Broadband =A314.99 per month
> Unlimited Downloads - No extra Costs
> =A314.99 per month (inc. VAT)
> Order Now  <http://www.adsl4less.com/> www.adsl4less.com
>
>
>
>
>
>
>
>
>
> 512k Broadband =A314.99 per month
> Unlimited Downloads - No extra Costs
> =A314.99 per month (inc. VAT)
> Order Now www.adsl4less.com
>
>
> !DSPAM:440d9273355651862415254!
>




More information about the Ukfreebsd mailing list