On Mon, 08 Jul 2002, Tom Kostiainen wrote:
Hi,
I'm trying to set up sendmail. I selected the "Host with temporarily netowork conection"
option in Yast2 because I'm using a modem to connect to the internet. I wasn't asked
the pop and smtp server I'm using (my ISP's server) which, I guess, I need for sending a
email to it's destination. Do I need to set this manually and if so where? And are
there any other settings I would also need to change/set?
Hi,
for receiving mails from your ISP via pop you need to configure
fetchmail (use the tool fetchmailconf) ... to setup sendmail for posting
emails by using smtp you need to do this (/etc/mail/README):
Copyright (c) 1997-2002 SuSE GmbH Nuernberg, Germany.
Author: Florian La Roche
Werner Fink
simple sendmail configurations:
===============================
sendmail is the default mail transfer agent (MTA) for SuSE Linux.
It decides what to do with email: transfer it over the network,
store it on the local disk or hand it over to other transfer-
programs like UUCP.
/etc/sendmail.cf is the main sendmail configuration file. If you have
a simple setup, you can edit /etc/sysconfig/sendmail and
run /sbin/SuSEconfig to have a working /etc/sendmail.cf.
Before setting up sendmail, you should make sure that the DNS (domain name
system) data is correctly configured. DNS maps hostnames to IP-adresses.
For email you should make sure that your wanted email adresse has a valid
MX (mail exchanger) record in the DNS data. Just use "host my.host.com"
to find out about your DNS data:
$ host my.host.com
my.host.com address 192.168.0.14
my.host.com mail is handled (pri=10) by my.host.com
my.host.com mail is handled (pri=100) by mail-relay.host.com
If you don't see anything about mail delivery, please ask your responsible
DNS admin. For dialup connetions all hosts used for mailing, like
the local, the mail hub, the smart, and the mail relay host should
be declared with their IP addresses and the corresponding Full Qualified
Domain Names (FQDN).
These parameters in /etc/sysconfig/sendmail can be used to
configure sendmail:
- SENDMAIL_LOCALHOST="localhost host.domain.com www.domain.com"
sendmail has to decide what email is delivered locally and what has
to be send over the network to another host. Per default only email
to the full hostname (FQDN) is stored in local mail-folders. If you
need to accept additional email names, just add them here.
Example: Your computer is known as "host.domain.com" and is also
WWW server for the additional hostname "www.domain.com". Use the
following parameters in /etc/sysconfig/mail and /etc/sysconfig/sendmail:
MAIL_CREATE_CONFIG=yes
SENDMAIL_LOCALHOST="localhost host.domain.com www.domain.com"
Sometimes it is usefull to add these additional hostnames into
the /etc/hosts. E.g. if SENDMAIL_EXPENSIVE (see below) is set to
yes and dialups should be avoided.
- FROM_HEADER="domain.com" (within /etc/sysconfig/mail)
If you do not want your outgoing email to have your full hostname
as sender address, you can specify any other hostname here.
Example: Your machine is called foo.bar.com and you want your email
sender address to look like hugo@bar.com, you have the following
parameter set in /etc/sysconfig/mail:
FROM_HEADER="bar.com"
- MASQUERADE_DOMAINS="otherdomain.com"
Normally, any hosts decided as locally are masqueraded. If
this feature is given, only the hosts listed in MASQUERADE_DOMAINS
are masqueraded. This is useful if you have several domains with
disjoint namespaces hosted on the same machine.
- SENDMAIL_SMARTHOST="mail-server.provider.com"
For all non-local email, sendmail will contact the destination host
given by DNS. So it will try to establish connections all over the
internet. If you have a dialup-connection or your machine is not
running all the time, you should pass all outgoing email to an email-
server which tries to deliver your email to the destination host.
(This parameter gives a transport method and also the name of the next
destination host.)
Example 1: You have a dialup-connection and your provider has the host
"mail-server.provider.com" as main mail-server. Use the following
parameter in /etc/sysconfig/senamil:
SENDMAIL_SMARTHOST="smtp:mail-server.provider.com"
Example 2: You are a UUCP site and all (non-local) outgoing email
should be sent to your UUCP server called "uucp.server.com":
SENDMAIL_SMARTHOST="uucp-dom:uucp.server.com"
- SENDMAIL_NOCANONIFY=no
sendmail will look at all email hostnames and replace them by their
full hostnames. If you only have a dialup-connection and you always
use full hostnames for sending email, you can disable this "canonification"
of the hostname:
SENDMAIL_NOCANONIFY=yes
- NODNS=no
If set to yes sendmail is not able to do DNS-queries. It requires a
well configured /etc/hosts to help sendmail to do its job. People
using dial on demand should try out SENDMAIL_NOCANONIFY without this
option. With this option the file /etc/mail/service-nodns.switch
is used. Whereas /etc/mail/service.switch is the regular file.
- SENDMAIL_EXPENSIVE=no
sendmail will immediately try to deliver your email to the next
destination host. With SENDMAIL_EXPENSIVE=yes all email that should
be sent with smtp to the next host will be kept in your local
mail-queue.
- DIALUP=no
set to yes sendmail tries to deliver local mails in defer (postpone)
mode. This also sets some entries to avoid dialups. This requires
a correct FQDN for the local host.
- SENDMAIL_GENERICS_DOMAIN=""
this list will cause certain addresses originating locally (i.e. that
are unqualified) or domains to be looked up in a map and turned into
another ("generic") form, which can change both the domain name and
the user name. These domains can additional to the local domains be
changed in /etc/mail/genericstable
- SENDMAIL_ARGS="-L sendmail -Am -bd -q30m -om"
You normally have sendmail runing with these standard parameters:
"-q30m" will look every 30 minutes to re-try sending failed email.
"-bd" will start sendmail in daemon mode and sendmail will accept
email over the network from other hosts.
Dialup-hosts might leave out "-q30m" and run "sendmail -q" e.g.
in the evening as cron-job or as part of your dialup scripts
(Read the comment on SENDMAIL_CLIENT_ARGS).
SENDMAIL_ARGS="-L sendmail -Am -bd -q30m -om" (default setting)
SENDMAIL_ARGS="-L sendmail -Am -bd -q2h -om" (email delivery every 2 hours)
SENDMAIL_ARGS="-L sendmail -Am -bd -om" (no queue runs at all)
- SENDMAIL_CLIENT_ARGS="-L sendmail-client -Ac -q30m"
This is used to start the sendmail client daemon which runs as user
mail and look at /var/spool/clientmqueue/ for any mail which should
put to port 25 (smtp port) of localhost on which the master sendmail
is listen. Note: if there is no master sendmail running all mails
stored by the MTAs (Mail Transfer Agents) like pine or mutt using
`sendmail -oi' will stored in /var/spool/clientmqueue/ for ever.
For more informations see /usr/share/doc/packages/sendmail/SECURITY.
sendmail.cf supports some more external database files. The default
configuration uses /etc/aliases, /etc/mail/mailertable,
/etc/mail/genericstable and /etc/mail/virtusertable.
These files are normal text files that are converted with "makemap"
to the real database files (ending in .db). /sbin/SuSEconfig will
automatically call "makemap" if you have changed one of these files.)
For all outgoing email, sendmail will use the destination hostname
and look into /etc/mail/mailertable to see how this email should
be transported to the next destination. Please read that file for
some examples on email-routing.
If your email is stored locally, then it is normally stored in your
mail-folder in /var/spool/mail/<login-name>.
If sendmail cannot imediately deliver email (e.g. because of network
problems), it will store it in the queue directory /var/spool/mqueue.
Per default sendmail will re-try to deliver the email every 30 minutes.
[...]
Oliver
--
... don't touch the bang-bang fruit