Sendmail installed? - Setting new users and checking emails?

Rick Stevens rstevens at vitalstream.com
Mon May 24 21:20:29 UTC 2004


Dan_MailLists wrote:
>>PLEASE bottom-post on this list.  It makes following the thread SO much
>>easier.
>>
>>First, to find where your "rpm" is, try "which rpm".  It should be in
>>/bin.
>>
>>Second, sendmail can be installed in several different places.  The
>>normal place is /usr/sbin.  It could be in /usr/lib or /usr/bin.  If you
>>find it in /usr/lib, it could be either the real binary or a symlink to
>>the real binary.  "ls -l /usr/lib/sendmail" should show you the
>>destination of the link.
>>
>>Third, to check a user's account, you can do an SMTP dialog to the box:
>>
>>-----------------------------------------------------------------
>># telnet mailserver.domain.tld 25 <--- YOU ENTER THIS
>>Trying xxx.xxx.xxx.xxx...
>>Connected to mailserver.domain.tld (xxx.xxx.xxx.xxx).
>>Escape character is '^]'.
>>220 mailserver.domain.tld ESMTP sendmail MTA; Mon, 24 May 2004 10:38:19
>>-0700
>>helo myhost.mydomain.tld <--- YOU ENTER THIS
>>250 mailserver.domain.tld Hello myhost.mydomain.tld [xxx.xxx.xxx.xxx],
>>pleased to meet you
>>mail from: someone at somedomain.com <--- YOU ENTER THIS
>>250 2.1.0 someone at somedomain.com... Sender ok
>>rcpt to: recipient at recipdomain.tld <--- YOU ENTER THIS
>>250 2.1.5 recipient at recipdomain.tld... Recipient ok
>>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>quit <--- YOU ENTER THIS
>>221 2.0.0 mxin-01-001.root-mail.com closing connection
>>Connection closed by foreign host.
>>-----------------------------------------------------------------
>>
>>If the "rcpt to:" thing gets a "Recipient ok" response (shown above the
>>"^^^^^^^^" line), then the account is there.
>>
> 
> 
> Yep, I'll bottom post from now on.
> 
> I've tried 'which rpm' and it returns nothing at all. To verify, I also
> tried 'which vi' which gave me the path to vi.

That's good.

> 'which sendmail' also returned nothing at all.

Hmmm.  Let me read on...

> 'which mail' comes back with /usr/bin/mail if that's any help?

That's the original command-line mail client for Unix.  You probably
won't ever use it (pine or something like that is better).

It looks as if rpm wasn't installed on your machine.  If it's a managed
system, that's possible as the ISP is supposed to keep it up to date.
They probably have rpm on a floppy or something.

> 'ls -l /usr/lib/sendmail' tells me this -
>  /usr/lib/sendmail -> /usr/sbin/ssmtp
> which I guess means that sendmail points to that file in /usr/sbin/ ?

Yes and that's fairly normal.  /usr/sbin/ssmtp is the outgoing version
of sendmail (only accepts mail from the local host for outgoing).

> Thanks for that Telnet dialog example, I'll hang onto that for future ref as
> it looks pretty useful.
> 
> Anyway, I'm getting the impression that as I chose a managed server they've
> deliberately hidden things from me, and fair enough. Also, I never made it
> clear to you guys what I was trying to do: I'm coding some newsletter
> scripts to run from crontab, pick up data from a MySQL db and pump out
> newsletters via a PHP script (using the CGI version of PHP4). I wanted to
> set up some sort of test account to receive thousands of emails, and I
> thought it would be best dealt with on the server.
> Instead, I'm now going to send out most of the emails to known bad
> addresses, and every so often send one to a real address of my own. The
> theory being that if I get all I'm expecting to, then I'll know that all of
> the emails were sent. This is all to get an idea of what the server can
> handle.

That's possible, but you should ask your ISP.  BTW, you can figure out
what's listening on port 25 (the SMTP port) by doing a "netstat -lpn".
That should list the program name of what's on port 25, e.g.:

# netstat -lpn
(snip)
tcp    0   0   0.0.0.0:25        0.0.0.0:*  LISTEN 13035/sendmail
(snip)

meaning that process 13035 (and named "sendmail") is listening on port
25.  You can then do a "ps -ax | grep 13035" and see the command line
used to launch the program.

> So, I've got a PHP script running from crontab and sending out emails, I
> haven't connected it to a db yet, but I don't think that'll cause any grief.
> 
> So despite the fact I can't directly run sendmail from the command line, I
> can get it working as I need it to, so I'll leave it at that for now, unless
> of course anything I've said leads you guys to think there's something
> seriously wrong with this server config of course!?

It's hard to say.  Your machine may not be using sendmail at all, but
possibly postfix or qmail--both of which are sendmail replacements and
are a bit easier to manage for a novice.  sendmail is far more flexible,
but with flexibility comes complexity.

To give you an idea, the definitive book on sendmail is what we lovingly
call the "Bat Book".  The real name is "sendmail, 3rd edition" by
Costales and Allmam from O'Reilly and Associates.  It is about 1200
pages (yes, 1200!) and lists at $59.95 US.  It is the bible for sendmail
managers.

> Thanks for the time you took to look into this!

No problem.  Wish I could help more.  I could theoretically get into the
machine and snoop around, but I'd need the IP and password.  If you feel
you want me to do this, send me that data privately (off list) and I'll
try to get at it in the next day or so.  If you should wish to scramble
that data for privacy, my GPG key is available here:

	http://www.keyserver.net/en/

Just put my email address in the search box.  If that's too much,
here's the key:

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
 

mQGiBDtlxWARBACk+qhJ6hiwtCQepjNG1QoNpqSfbY0gBmSUIw0CmDBq42GUzCZU
eMzGzumhN/hY0PRJHrNcs/+LvDZrNyEcR5o8wi6rZVSyYZjEEbx0y7f8J0Y8tKhL
nhH4o9Fj/ruLiRAp4O90Rvsc8ZiqPnt8MCswlwh5kmYZ5kMG7Pty9nmwVwCgyR3A
OqGwkhGpf50pJpKA9lAJxhkD/0drjTY30D1oIsIgEIfMhsYKeqS30Onw5Fah5GRe
JAFQpiiNGQ6gIwhUyNj9tNXcS1O3r4Yw0t8LwJ4mjAlpsiV4cWAnsGPl4TTt/zGv
/Ioz+fAo/5fcRYBXELteWcr/TLMd3ioPUjMgIzTZog/MhpJs4hgnr+JvrSBBhsuD
/yJDA/9rWQGiIvUS3WqXJLxVesmvZFKDIVkzzcgsVg87E4bxE5Ag1iKKmYMpo4RT
ZKP+KLjtWTWtcEq0MDGjil9cxXYComU/wtmCbN5HrolFe1P9O2bi/DjEg3LhJIVA
VNuvt/OysIhP+PzYK4bYgGa5UjXaeC7lJaIOyFGz95sLu2RjDrQwUmljayBTdGV2
ZW5zIChPZmZpY2UpIDxyc3RldmVuc0B2aXRhbHN0cmVhbS5jb20+iFcEExECABcF
AjtlxWAFCwcKAwQDFQMCAxYCAQIXgAAKCRAzBJWzyVE6p649AJ9GYII7226v8vmW
auyXx44lwfSBHQCfSxZYDAOm3XLG5npB0LFtbGUkqsG5AQ0EO2XFZBAEAPQDDI6F
DtAVroCYzVJPmQeNnn/z/JvSSTdWpj2EseoIcajjESE7BnX3r5z4rQ9TnxiXA9Ip
CnJBuJc/yFW7x+fpkHbefKpssMjjPduKWETSDFfkF3KbukJm9nL0G1AqltyG+31v
so/O5hwqdFjYb2NBouKtX+mOpj0Tzemk5f3jAAMFA/4uS5A+9V6UXCdBPVOeUydR
NDFYkVUqZlXH187SwyLUTB7tE0m9kWV07xkLCIaTAAZYpUsctPPSixVavDlic5N2
ac48RwokIvXl1jBWxbhod4S2bBlcOEFjUx7djwGCogJwgYdPo79kYJtvHV6fNeKe
5ooRLIF/Jbdw+k/q2qotqohGBBgRAgAGBQI7ZcVkAAoJEDMElbPJUTqn5M0AnjKR
56wPEeMx7oqH3FgUKMVaEXBGAKCZ38mrv9fY3jn1Dn2yC0YRUPAhsQ==
=7W8a
-----END PGP PUBLIC KEY BLOCK-----

> 
> I'm sure I'll be back soon to mither you some more....

"mither"?  Hmmmm.  Never heard that one before.  Well, we'll be here.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-     Veni, Vidi, VISA:  I came, I saw, I did a little shopping.     -
----------------------------------------------------------------------





More information about the Redhat-install-list mailing list