Other often asked questions about sendmail
Last Update 2003-02-22
To find out which version of
is installed on your system,
you can try the following commands:
sendmail -d0.4 -bv root
should tell you its version and some basic settings.
telnet localhost 25
Don't use uppercase letters...: man 5 passwd on a SunOS 4 machine:
sendmail should greet you with its welcome message and
tell you the version of its binary and config file.
to leave this mode.
username is the user's login name. This field con-
tains no uppercase characters, and must not
be more than eight characters in length.
If you really need it, set the flag 'u' for the local mailer.
If you don't have
you need to change the flags:
provides a better way to do this:
Sendmail Installation and Operation Guide:
u Upper case should be preserved in user names for
If you use
as local mailer, make sure you define
If you get the error:
name: cannot alias non-local names
there are several possibilities to check:
This is not a sendmail problem, but one of the local delivery agent.
line in your
If you have
you're settled, it obeys quotas.
So you can install quotas on your mailspool
(check with your OS version, e.g.,
and everything should work.
You can also tell
to deliver e-mail into the
directory of the user, so you have solved several problems at once.
There is no simple solution for this.
It might be easy if the sender announces the (correct) size of the
In this case, it would be possible to compare that size against
the allowed size for each recipient when those are specified by
However, if the size isn't given, it can be only determined after
all recipients have been given.
In that case, the mail might be accepted for some but not for others.
Hence the solution to have
quota on mail spool
might be best.
Another (crude) workaround is to define different mails
with different size restrictions and select those accordingly
to the recipients limitations.
Sometimes you want to route all mail for a domain to a single
user. You can do this by a rule like this:
> 3,0 name
resolve to the
Make sure you have the flag
(This applies to
R$+ < @ the.domain. > $#local $: the-user all to one user
This usually goes into ruleset 0.
Another way is to use the
virtual user table
sendmail 8 has a feature to route all mail
which ends up as local on the system but isn't a valid
account (or alias), to another system (the so-called
However, this feature is disrecommended,
since it can break ``working'' addresses if you
introduce new local users.
If you want to route all mail to unknown users to one account
(instead of giving the standard error reply), you can
put in your
file the following:
or in some cases:
Something similar can be accomplished for
sendmail 8.8 and later
includes all local addresses into class
to avoid the well-known
config error: mail loops back to myself.
If this is not intended,
there's an undocumented compile-time-option in 8.8
which is enabled in later version,
which enables the option
Set it to
to keep sendmail from adding
all local addresses to class
sendmail supports several map types.
The main types are:
Make sure the map type you're trying to use is compiled into your
version of sendmail
There are several ways how to do it.
One idea is to select different mailers according to the recipient,
and then change the rewrite rules for the sender for that mailer.
Here's an example:
Make a copy of one of the smtp mailers in cf/mailer:
- requries the compile flag -DNEWDB.
This is the new Berkeley DB package.
If your system does not have this pre-installed, or the version
installed is not version 2.0 or greater (e.g., is Berkeley DB 1.85 or
1.86), get the current version from
- requries the compile flag -DNDBM.
This is the older NDBM implementation.
### MYSMTP Mailer specification ###
VERSIONID(`@(#)mysmtp.m4 0.1 (ca) 1998-09-26')
Mmysmtp, P=[IPC], F=CONCAT(mDFMuX8, SMTP_MAILER_FLAGS), S=mysmtp, R=ifdef(`_ALL_MASQUERADE_', `21/31', `21'), E=\r\n, L=990,
_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,
and add something like this:
Rfriend<@some.domain.>$* $#mysmtp $@ some.domain. $: friend<@some.domain.>$1
# sender rewriting for mysmtp
R$+ $: $>51 $1 sender/recipient common
R$* :; <@> $@ list:; special case
R$* $: $>61 $1 qualify unqual'ed names
R$* < @ *LOCAL* > $* $: $1 < @ Domain.For.Friend . > $2 use full name
(or whatever rewriting you need/want)
file (if you need this for more than one address,
use a class for the match).
An entry like:
NOQUEUE: Null connection from host.domain [IP.AD.DD.RESS]
connected to your MTA but didn't issue any commands.
Unless this happens very often, you can ignore this.
If it happens very often, it's either someone playing around
or it's a network problem.
Please send comments to:
<ca at sendmail.org>
Disclaimer: the information provided may be inaccurate or outdated
if you find an error.