On Fri May 19 2000 at 16:43, Song Jianping wrote:
> Today i find i can send mail to others without running
> sendmail as daemon. It seems sendmail daemon is only in
> charge of receiving mail from other machines.
That is exactly right. For client workstation boxes, there is
absolutely no need to run a mail server to listen on port 25.
For most users with their own linux boxes at home, the usual way
mail comes into a linux box is when they dial up and pop it using
something like fetchmail to collect it from an ISP.
Note that by default (last time I looked), fetchmail will attempt to
deliver it locally using a local port 25 mail server. This is
useful, as will feed it into the local mail subsystem in a way that
mimics as if it was delivered by another mail server directly from
the internet.
PITA tho, to have to run sendmail just for that. But you don't
need to, as you can also tell fetchmail to deliver it using exactly
the same local delivery agent that sendmail uses - procmail. This
is ideal - it is means that you never have to have a mail server
running every time you simply want to collect your email.
For outgoing mail, some (most) mailers are themselves capable of
delivering mail to a local mail server for relay out to the
internet. Others simply look for sendmail and run it directly to
get the mail out.
For a private LAN setup (say, in a small office), it is possible to
have a mail server collect email somehow for users belonging to the
network, and have it managed in any number of possible ways.
> I am wonderring whether i can send thousands of mails by repeatly
> calling sendmail directly. Will sendmail return on successfully
> inserting the mail into mail queue or on delivering the mail to
> remote host?
Yes, of course. What do you think busy mail servers do all day? :)
A low end pentium with a standard linux installation is easily
capable of acting as a full internet mail server out of the box.
That is what it is supposed to be able to do :)
Sendmail will happily accept for further delivery any email from any
local user. But be careful, don't get any ideas about spamming. :)
If sendmail has mail in its mail queue (command: `mailq'), and it is
not running as a daemon, then it will not be delivered anywhere. To
manually invoke sendmail to attempt to immediately attempt to
deliver it:
sendmail -v -q
The `-v' is useful to watch it work verbosely. For dialups, this is
one of the things you want to think about doing in /etc/ppp/ip-up,
and for networked workstations as a cron job every few hours to
catch any mail that wasn't able to get delivered on previous
attempts.
Cheers
Tony