[FreeBSD][Newb] How I use sendmail to send mail?
Bjorn Boulder
bornboulder77 at yahoo.com
Mon Jun 11 05:15:07 UTC 2007
ok,
I'll look at that readme.
And....
I nosed around on the box for clues about sendmail.cf
It looks like the previous sysadmin ignored
sendmail.cf
I see this:
bash jake oracle /etc/mail 14 $ pwd
/etc/mail
bash jake oracle /etc/mail 15 $
bash jake oracle /etc/mail 15 $
bash jake oracle /etc/mail 15 $ ls -latr
total 582
-rw-r--r-- 1 root wheel 569 Nov 4 2004
virtusertable.sample
-r--r--r-- 1 root wheel 40449 Nov 4 2004
submit.cf
-rw-r--r-- 1 root wheel 57796 Nov 4 2004
sendmail.cf
-rw-r--r-- 1 root wheel 243 Nov 4 2004
mailertable.sample
-rw-r--r-- 1 root wheel 400 Nov 4 2004
mailer.conf
-r--r--r-- 1 root wheel 5588 Nov 4 2004
helpfile
-r--r--r-- 1 root wheel 40449 Nov 4 2004
freebsd.submit.cf
-rw-r--r-- 1 root wheel 57796 Nov 4 2004
freebsd.cf
-rw-r--r-- 1 root wheel 1606 Nov 4 2004 aliases
-rw-r--r-- 1 root wheel 407 Nov 4 2004
access.sample
-rw-r--r-- 1 root wheel 2896 Nov 4 2004 README
-rw-r--r-- 1 root wheel 6809 Nov 4 2004
Makefile
-rw-r----- 1 root wheel 65536 Oct 31 2005
aliases.db
-rw-r--r-- 1 root wheel 421 Aug 21 2006
motel411.sh
-rw-r--r-- 1 root wheel 40400 Aug 21 2006
motel411.com.submit.cf
-rw-r--r-- 1 root wheel 57747 Aug 21 2006
motel411.com.cf
-r--r--r-- 1 root wheel 894 Aug 21 2006
motel411.com.submit.mc
-rw-r--r-- 1 root wheel 4113 Aug 21 2006
motel411.com.mc
-r--r--r-- 1 root wheel 894 Aug 21 2006
freebsd.submit.mc
-rw-r--r-- 1 root wheel 4113 Aug 21 2006
freebsd.mc
-rw-r--r-- 1 root wheel 52 Aug 21 2006
local-host-names
-rw-r--r-- 1 root wheel 267 Aug 21 2006
virtusertable
drwxr-xr-x 2 root wheel 1024 Aug 21 2006 ./
-rw-r----- 1 root wheel 65536 Aug 21 2006
virtusertable.db
drwxr-xr-x 17 root wheel 2048 Nov 11 2006 ../
bash jake oracle /etc/mail 16 $
bash jake oracle /etc/mail 16 $
bash jake oracle /etc/mail 16 $
It looks like administrative activity was happening on
Aug 21 2006
I looked at motel411.sh...
bash jake oracle /etc/mail 16 $
bash jake oracle /etc/mail 16 $ cat motel411.sh
#! /bin/sh
cp freebsd.mc motel411.com.mc
/usr/bin/m4 -D_CF_DIR_=/usr/share/sendmail/cf/
/usr/share/sendmail/cf/m4/cf.m4 motel411.com.mc >
motel411.com.cf
cp freebsd.submit.mc motel411.com.submit.mc
/usr/bin/m4 -D_CF_DIR_=/usr/share/sendmail/cf/
/usr/share/sendmail/cf/m4/cf.m4 motel411.com.submit.mc
> motel411.com.submit.cf
/usr/sbin/makemap hash virtusertable.db <
virtusertable
chmod 0640 virtusertable.db
bash jake oracle /etc/mail 17 $
bash jake oracle /etc/mail 17 $
bash jake oracle /etc/mail 17 $
I'll search google for info about these files:
freebsd.mc
freebsd.submit.mc
virtusertable
virtusertable.db
And I'll read that readme:
/usr/share/sendmail/cf/readme
-b
--- Doug Hardie <bc979 at lafn.org> wrote:
>
> On Jun 10, 2007, at 21:25, Bjorn Boulder wrote:
>
> > Doug, Mats
> >
> > Your advice is on the money; thanks.
> >
> > I see this:
> >
> > Jun 10 05:43:40 jake sendmail[15068]:
> l5AAhekD015068:
> > to=bornboulder77 at yahoo.com, ctladdr=oracle
> > (1004/1005),
> > delay=00:00:00, xdelay=00:00:00, mailer=relay,
> > pri=30062,
> > relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0,
> > stat=Deferred: Connection
> > refused by [127.0.0.1]
> >
> > Your tip along with that given by Mats suggests
> that
> > I need to learn about /etc/mail/sendmail.cf
> >
> > It appears that the box cannot send mail to
> itself:
> >
> > Jun 10 03:05:44 jake sendmail[14546]:
> l5A84ObZ014546:
> > to=postmaster,
> > delay=00:00:00, xdelay=00:00:00, mailer=relay,
> > pri=154501,
> > relay=[127.0.0.1], dsn=4.0.0, stat=Deferred:
> > Connection refused by
> > [127.0.0.1]
> >
> > Jun 10 03:05:44 jake sendmail[14546]:
> l5485I55093939:
> > to=root,
> > ctladdr=root (0/0), delay=6+00:00:26,
> xdelay=00:00:00,
> > mailer=relay,
> > pri=691450, relay=[127.0.0.1], dsn=4.0.0,
> > stat=Deferred: Connection
> > refused by [127.0.0.1]
> >
> > Jun 10 03:05:44 jake sendmail[14546]:
> l5485I55093939:
> > l5A84Oba014546:
> > sender notify: Cannot send message for 5 days
> >
> > Jun 10 03:05:44 jake sendmail[14546]:
> l5A84Oba014546:
> > to=root,
> > delay=00:00:00, xdelay=00:00:00, mailer=relay,
> > pri=152806,
> > relay=[127.0.0.1], dsn=4.0.0, stat=Deferred:
> > Connection refused by
> > [127.0.0.1]
> >
> > Currently, my main assumption is that
> > /etc/mail/sendmail.cf
> > is the primary administrative interface for
> e-mail.
>
> That is correct, but you don't want to directly mess
> with
> sendmail.cf. You really want to use the mc file and
> then make to
> build the cf file. Its much easier and more
> readable. See /usr/
> share/sendmail/cf/readme for more details. The cf
> files are in
> another directory from there named cf.
>
> You will also want to use
> sendmail -bv email-address
> to have sendmail show you how and where it will
> deliver for the
> address: email-address. That is a useful tool.
>
>
____________________________________________________________________________________
Got a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
More information about the freebsd-questions
mailing list