1834368 Members
2062 Online
110066 Solutions
New Discussion

needing sendmail errors

 
SOLVED
Go to solution
Rick Garland
Honored Contributor

needing sendmail errors

Hi all:

Got some HPUX 10.20 with sendmail 8.8.6 (PHNE_17135) and HPUX 11.00 (PHNE_18546) that do not acknowledge certain error messages. Example, if I am to send mail to another user and I purposely fat finger the user name, the mail.log will still report that the mail was sent even though the user does not exist (username was fatfingered).

What I am looking for is a way to have mail acknowledge these various error messages and to send an email to the sender saying that "Undeliverable - user unknown"

Even if I am to interact in verbode mode with port 25 the output says that mail was sent - but the user does not exist!

I have the feeling that this setup comes from the MS Exchange (the mail relay) side but what else needs to be done - or am I on the right track?

Many thanks
7 REPLIES 7
Christopher Caldwell
Honored Contributor

Re: needing sendmail errors

I'm not sure exactly what you're looking for, so feel free to steer a bit.

By default, sendmail will accept a message for delivery if the message "looks" right (domain resolves), even if the mail recipient doesn't exist.

Among other things, this technique allows mail front-ends (intermediary boxes that recieve mail) to not have to worry with whether or not an account exists.

In the old days, this used to be okay, because if the recipient didn't exist, sendmail would turn around and generate a bounce to the original sender.

Today, the evil spam folks tend to use reply addresses that are bogus, so you end up queueing any mail that's not deliverable. Eventually, all that mail gets bounce to the postmaster.

To get sendmail to reject mail for users that don't exist, define the virtusertable. virtusertable takes addresses formatted like this

you@yourdomain.com you
firstname.lastname@yourdomain.com first
yourforward@yourdomain.com yourforward@yourotherdomain.com

where the left hand side is a valid visible e-mail address and the right hand site is a
valid terminating account (a username or an alias) or another e-mail account.

If you "close" the domain with

@youdomain.com error:nouser No such user

any addresses that are not defined in the virtusertable will be rejected outright with a 5XX series message.

To enable virtusertable, search for virt in /etc/mail/sendmail.cf. Uncomment the virtusertable rulesets:

Kvirtuser dbm /etc/mail/virtusertable
# handle virtual users
R$+ < @ $=w . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
$: < $(virtuser $1 + * @ $3 $@ $1 $: @ $) > $1 + $2 < @
$3 . >
$: < $(virtuser $1 @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 .
>
R<@> $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . >

Add the virtusertable to /etc/mail. "compile" the virtusertable:

/usr/sbin/makemap dbm /etc/mail/virtusertable < /etc/mail/virtusertable

Restart (or stop/start) sendmail.
V. V. Ravi Kumar_1
Respected Contributor

Re: needing sendmail errors

hi

try sendmail from commandline with debugging switches.

-d11.1 - Trace Delivery
-d13.1 - Show Delivery

then u can identify where exactly it is going.

usage:
sendmail -v -d11.1
(ur message)
. (dot)

regds
ravi
Never Say No
Rick Garland
Honored Contributor

Re: needing sendmail errors

Trying to get the "postmaster" working as well. Does not seen to want to play. Have modified the sendmail.cf file to uncomment the entry and made sure that the alias points to root.

Not working. Any ideas why?
Rick Garland
Honored Contributor

Re: needing sendmail errors

Essentially, why am I not getting the various error messages back from the MS Exchange relay indicating some sort of problem (e.g., user does not exist)?
Christopher Caldwell
Honored Contributor
Solution

Re: needing sendmail errors

>Essentially, why am I not >getting the various error >messages back from the MS >Exchange relay indicating >some sort of problem (e.g., >user does not exist)?

RFC 821 (Simple Mail Transfer Protocol) doesn't require an implementation to say that a user does not exist.

From
http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc0821.html#sec-3.3

The VRFY and EXPN commands are not included in the minimum implementation (Section 4.5.1), and are not required to work across relays when they are implemented.

Many folks turn of VRFY and EXPN to minimize security issues. User virtusertable during the SMTP transaction to cut down on undeliverable mail.

In any case, the short answer is SMTP servers (Exchange, sendmail, other) aren't required to give you the message you're looking for, so they don't.

sendmail will behave like you want if you turn on virtusertable or vrfy. YMMV with Exchange. Search for vrfy in the Exchange documentation to see if you can influence the behavior of Exchange.
Jeff Schussele
Honored Contributor

Re: needing sendmail errors

Hi Rick,

Most mail systems today will not send user unknown msgs back - they simply toss that mail away. You can thank spammers & hackers for that.

As to the postmaster issue:
1) did you bounce sendmail after changes to the .cf file?
2) Did you rebuild the alias DB after pointing postmaster to root?
sendmail -bi
OR
newaliases

As a side note, I generally liked to also point root to a mail account I could check "easier" or at least more frequently.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Animesh Chakraborty
Honored Contributor

Re: needing sendmail errors

Hi Rick,
Are you getting the "failure mesg" now?
Did you take a backup?