[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Newbie comments & queries



On Fri, Dec 28, 2001 at 12:10:32PM +0200, Ian Balchin wrote:
> /etc hosts shows just me per brenda's email 12/12/01
> 127.0.0.1 hephaestus localhost

Oops, this should be:

127.0.0.1  localhost
192.168.0.1 hephaestus

That second number should be taken from one of the
private ip namespaces:

Class A    10.0.0.0 - 10.255.255.255
Class B    172.16.0.0 - 172.31.255.255
Class C    192.168.0.0 - 192.168.255.255

You should probably take a Class C address (such as the
one given above, 192.168.0.1) for your machine.
Any one will do (except one whose last number is
0 or 255 - See the /usr/share/doc/HOWTO/en-txt/NET3-4-HOWTO.txt.gz
file for explanations (search for 192.168)).

I chose 192.168.110.xxx for my machines.

> I am a member of the groups dialout, dip, staff
> 
> > If you run exim from the shell and enter a message, does it get
> > delivered?  For example :
> > 
> > $ exim fables@imaginet.co.za 
> > From: me <myaddr@myhost>
> > Subject: test message
> > 
> > yo, can I see this?
> > ^D
> 
> No, exim generates a message but it does not get delivered.  From 
> /var/log/exim we find
> 
> time/msg no.... imaginet.co.za [196.15.145.8]: Connection refused
> time/msg no.... imaginet.co.za [196.15.145.5]: Connection refused
> time/msg no.... == fables@imaginet.co.za T=remote_smtp defer (111): 
> Connection refused

So, you should see the message in your /var/spool/exim/input
directory?  The file name will be the message id from the log file.
The message will be in two parts, ...-D and ...-H for the Data and
Header parts of the message respectively.  They are plain text,
you might want to look at the with less, it's interesting.

Probably you thought of this already, but:
You have the ppp connection going while you are trying this?

> Now my primary and secondary dns addresses are in /etc/resov.conf as
> 
> nameserver 196.15.145.5
> nameserver 196.15.145.7
> 
> so where the 196.15.145.8 comes from I do not know.

I guess 196.15.145.8 is a mail server?  DNS is one service,
mail is another.

> In my Win98 setup the pop3 and smtp host is set as
> imail.imaginet.co.za which dig shows as 196.15.145.6 . I
> do not seem to have this set anywhere. Should this not be?

In your $HOME/.fetchmailrc, it should name the machine to
pop from.  But that has nothing to do with what machine
exim delivers to.

Hmm, in my /etc/exim.conf, I have:

    route_list = "* smtp.achilles.net bydns_a"

That looks like the line that tells exim to deliver
outbound mail to the appropriate achilles server.
This is in the ROUTERS CONFIGURATION section.

> I saw in the exim documentation that it either runs at
> start up from initd (something like that) or can run as a
> daemon.  What is the difference, and what should I do.  I
> do not see it listed on the boot up messages at all, and
> cannot see it listed in top so it is not running as far as
> I can see.


Well the first think in the /etc/init.d/exim script is
a check to see if smtp requests are handled by the inetd
server.  In a default Debian installation, they are,
and the script exits immediately.

So, exim gets run on demand in a default Debian
installation.  Demand can happen when you send an email
or when another server wants to deliver mail to you.

Usually things that run from initd are daemons.  There is
also another way to run daemons, and that is from the inetd
service.  inetd is the one daemon that is running, listening
on a bunch of ports, and when something comes on one of those
ports inetd launches the appropriate server to handle that
incoming message.

For outgoing messages, there are two possibilities.
One is that exim is receiving the message from your
mail client (MUA) and wants to forward it to the next
server right away.  The other possibility is that exim
has stored an outgoing message in /var/spool/exim/input
and wants to deliver those stored messages (the mail queue)
externally.

How does exim decide when to deliver queued messages?
The cron program takes care of this.  Cron sits around
waiting for trigger times, and performs actions at those
times.

In /etc/cron.d there is an entry "exim" that tries to
deliver mail every half hour (or whatever).

See cron(8) crontab(1) crontab(5).

More explanations:
If exim is started from the inetd server (usually for incoming
smtp requests - ie mail being delivered to you from outside), then
there should be an entry in your /etc/services and /etc/inetd.conf
files for it:

/etc/services:
  smtp            25/tcp          mail

/etc/inetd.conf
  smtp            stream  tcp     nowait  mail    /usr/sbin/exim exim -bs

see inetd(8), inetd.conf(8), services(5)

When you get around to firewalling, you'll be looking at these files
again, so time spent here is worthwhile.  The cron program is also
a very useful general utility, worth spending time on.

> I suppose the sequence of events should be:
> 
> Dial up and see ppp negotiation.
> $ fetchmail
> exim is running and will kick in to send mail when imaginet appears on 
> the network

Maybe not, see above.  In a default Debian install, exim seems
to be an on-demand thing.

> fetchmail seems to want something else on the command line. If I do
> 
> $ fetchmail imaginet.co.za
> 
> then it wants password for root@imaginet.co.za  -- which is obviously not 
> correct.  I try it with hephaestus and put in my root password, but this 
> is not the solution. In any case the passwords have already been dealt 
> with at ppp negotiation stage - right?
> 
> Next step?

Hmm, you are running this as root or as yourself?
You need a .fetchmailrc file for the user you are running as.

Probably, you should run as ian, and have an ~ian/.fetchmailrc.
passwords etc should be in there.  Permissions should be as you
said, 0600 and ownership of the user:

seal:/etc/cron.d# ls -la ~bjb/.fetchmailrc
-rw-------    1 bjb      bjb            93 Apr  7  2000 /home/bjb/.fetchmailrc
seal:/etc/cron.d# 

Heh, you can see that I am doing the listing from the /etc/cron.d
directory - I was poking around in there researching for the
earlier part of the email.

You are so close... don't give up now!

-- 
bjb@achilles.net
Welcome to the GNU age!   http://www.gnu.org



Reply to: