Mailinglist Archive: opensuse (2629 mails)

< Previous Next >
[SLE] Send/Fetchmail Configuration for Server
  • From: test2654@xxxxxxxxx (j b)
  • Date: Fri, 12 May 2000 11:04:33 -0700 (PDT)
  • Message-id: <20000512180433.4930.qmail@xxxxxxxxxxxxxxxxxxxxxx>



Thank Jim Dennis for an in-depth answer.
I tried it and read the FAQ, and have a limping mail system.

I had to change the FROM_HEADER to get the ISP to accept the mail
because genericstable was ignored. Also, all incoming mail gets routed
to root! Have added sendmail.cw, used genericstable/virtusertable, and
userdb.

Both fetch and sendmail need a better configuration. I will layout my
ideal system, and hope or the best.

Five local users have seperate ISP accounts (1 on mindspring, 1 on
earthlink, 3 on seeyouonline):

LOCAL ISP ADDRESS
---------------------
jb on service@xxxxxxxxxxxxx
john on johnjjg1@xxxxxxxxxxxxxx
guest1 on guest1rc4@xxxxxxxxxxxxxxxx
guest2 on guest2rc4@xxxxxxxxxxxxxxxx
rc4bob on rc4bob@xxxxxxxxxxxxxxxx

Local machine is heir.sea.com, and all should be able to send/receive
their own mail.

--- "L.U.S.T List" <lust@xxxxxx> wrote:

> Local mail delivery is slow, and causes sendmail to dial up the ISP.
> How do I stop the dial up for local mail?

> I found that sendmail and wvdial.dod (SuSE 6.3) clash: to avoid dial
> up during SMTP restarts, wvdial.dod must be restarted first.

Technically 'sendmail' is not dialing up your ISP. It is
attempting to access some site on the Internet (or on some
non-local address/network) which is causing your system to
call your ISP.

That suggests that you have a copy if 'diald' (a dial-on-demand
utility) installed, or that you've configured your 'pppd'
with it's newer, built-in, dial-on-demand feature.

Below I've included a link that should help with your immediate
problem. However, I'm also going to explain a little bit
about what is going on, based on clues in your question.

I think it's more important that you understand the underlying
principles then that you solve just this particular problem
(since a bit of deeper understanding will help you find answers
to many other questions).

> /var/log/mail says:

``
> gethostbyaddr(192.168.99.1) failed: 2
''

This means that your copy of sendmail is trying to
look for a host name based on its IP address. That
is generally done by "reverse DNS" (DNS queries for
PTR records through the in-addr.arpa domain). (Note:
It's possible for that reverse lookup to be done through
NIS or other protocols depending on your system libraries
and the settings in /etc/nsswitch.conf (glibc a.k.a.
GNU/Linux libc6) and/or /etc/hosts.conf (libc 5).

The 192.168.*.* address here is one of those reserved
for "private and disconnected" networks by RFC1918.
That means that the IANA (Internet Assigned Numbers
Authority) will not issue any such IP address to any
real site on the Internet. These are also known as
"non-routable" addresses since there should never be
any routes to them propagated across the Internet.

Obviously the public DNS system should also NEVER
contain references to these addresses (not in the
A records nor in the reverse PTR records to match
them).

Sites using these RFC1918 addresses should be using
them from behind firewalls (or on completely disconnected
networks). Access to the Internet from hosts with these
addresses (and the 10.0.0.0/8 and 172.16.0.0/12 ranges)
should be done through application layer proxies or through
"IP masquerading" (a particular form of Network Address
Translation or NAT).

> then it mails it localy.

I presume you mean that it "queues it locally."
That is exactly what it should do.

> /etc/hosts has:

``
> 127.0.0.1 localhost
> 127.0.0.2 machine.domain.com machine
''

You should probably just add lines to this file (your
/etc/hosts) to match each of the RFC1918 addresses that
you are using on your LAN. This and having the
"files" entry in your /etc/nsswitch.conf like so:

``
# /etc/nsswitch.conf
hosts: files dns
networks: files
''

Should allow the gethostbyaddr() function to return
reasonable results for local copies of sendmail.

You'll also have to configure you copy of sendmail to
relay its mail to some host that does have a DRIP
(direct routable IP, or "real" address) or to
queue the mail (which it seems to already be doing)
until you dial-up to your ISP.

There are some directions for doing this in the
Linux Administrator's FAQ from the linux-admin
mailing list. Here's a link to that FAQ:

Linux Administrators FAQ List
http://www.kalug.lug.net/linux-admin-FAQ/Linux-Admin-FAQ.html

... and here's the link that you want:

4.2 How do I set up sendmail for off-line use?

http://www.kalug.lug.net/linux-admin-FAQ/Linux-Admin-FAQ-4.html#ss4.2

Hope that helps.

These instructions will should help you configure your system for
queuing all mail. One thing they don't say here is how to
process the queues (to actually attempt delivery of your outbound
mail). Assuming that you are using the Linux PPP daemon (pppd) you
would add the following command to your /etc/ppp/ip-up script:

``
/usr/lib/sendmail -q
''

... You should also define a "smart host" which would be some
system, on the Internet (perhaps your ISP's mail host) which is
reliable, "always connected" and which will relay your mail for
you.

That should allow your MTA (mail transport agent ---
sendmail) to reliably pass all of your outgoing mail of to
another system when you first connect. Otherwise it might be
that you system will try to connect directly to each of your
correspondents --- and that any of them which are unreachable
at the time that you connect will cause some items of outgoing
mail to be deferred (left in your queue). It's much wiser to
pass you mail off to a system which is "always" connected
when you come online so that it can handle the deferments and
retries for you.

It would also be possible for you to create a more elaborate
ip-up script which would fire off a process that would loop
around peforming 'sendmail -q' commands, perhaps sleeping for
a bit, etc. Then you could have a corresponding command in your
ip-down script that would kill your other script as you were
disconnecting from the 'net.

Those might be appropriate for a laptop, without dial-on-demand.

It would also be possible for you to create a 'cron' job (a
regularly scheduled event) which would attempt to process your
MAIL QUEUE AT SOME CONVENIENt time. For example you might
schedule it go off at 3am every morning. You might even
configure it to check for any queued mail and only try to
bring up your link IF you have anything in the queue. There is
a 'mailqueue' command that might help with that.

Note that this is only a few suggestions on how to handle mail
for systems with intermittent Internet connections. There are
many ways of doing this and there are a number of packages
other then 'sendmail' that you can try.

'sendmail' is the most widely used MTA on the Internet. It is
also the most complex and difficult to learn. One of the ongoing
and raging debates among professional system administrators attempts
to answer the question: "which MTA is best?" (to which I generally
append the phrase "... for which purposes and situations?" --- just
to really muddy the waters).

I suppose I will now be inundated with messages from qmail, exim,
and postfix advocates. So I'll just include URLs to them here:

Sendmail (principally by Eric Allman):
http://www.sendmail.org
Qmail (by D.J. Bernstein):
http://www.qmail.org
Postfix (by Wietse Venema):
http://www.postfix.org
Exim (by a cast of thousands at the University of Cambridge):
http://www.exim.org

I'm sure I'll still get flamed for missing someone's favorite and for
not revealing that this is more secure than that and this that one is
the fastest MTA on the Internet, and this the other one violates
RFC such-and-such, etc. {Sigh!}

> /etc/resolv.conf has:

``
> search localhost
> nameserver 207.217.126.81
''

I presume that this is your ISP's nameserver. This tells me
that you are probably an Earthlink subscriber (since I
issue the command:

``
dig -x 207.217.126.81
''

(Domain information groper) which does a reverse (-x) lookup
on this IP address (in much the same way as your copy of
'sendmail' was attempting to do a reverse lookup on your
own IP address).

[Note: I've copied this message to the Linux Gazette "Answer
Guy" editors. I've have been occasionally doing this for about
three years (since I became the "Answer Guy" and approximately
as long as the L.U.S.T. list has existed. However, I'm also
trying to let people know about this, since I've been pretty
laissez faire and cavalier about that in the past. The
email addresses and most other personal information about my
correspondents is never revealed in my column. If you object
to my publication of this --- please let me know. If you mail
"answerguy@xxxxxxx" it is presumed that you are consenting to
publication. So far I've never received any complaint about this
--- and I've answered over a 1000 questions on that forum and
bazillions more over the years. Perhaps a couple dozen were
culled from responses to the L.U.S.T. list]


--
Jim Dennis, The Linux Gazette "Answer Guy"
Linux Gazette is Published under the GPL
http://www.linuxgazette.com
answerguy@xxxxxxx

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

--
To unsubscribe send e-mail to suse-linux-e-unsubscribe@xxxxxxxx
For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/


< Previous Next >
Follow Ups