This is really pretty much OT so feel free to ignore.
I’ve got a group of servers I’m setting up (well a bunch of xen
instances on a dedicated box, to be precise). I’ve set up one of them as
a dedicated MTA (postfix). I don’t need (and don’t want) MTAs on the
other servers, but do want to be emailed cron reports and logs from
logrotate. Is there any good, standard solution to this? Sorry, probably
dead obvious, but I’ve google for an hour or so now and haven’t come up
with anything, and this group has been v helpful in he past.
Thanks
Chris
Chris T wrote, circa 2007-03-28 8:12 AM:
This is really pretty much OT so feel free to ignore.
I’ve got a group of servers I’m setting up (well a bunch of xen
instances on a dedicated box, to be precise). I’ve set up one of them as
a dedicated MTA (postfix). I don’t need (and don’t want) MTAs on the
other servers, but do want to be emailed cron reports and logs from
logrotate. Is there any good, standard solution to this? Sorry, probably
dead obvious, but I’ve google for an hour or so now and haven’t come up
with anything, and this group has been v helpful in he past.
I’ve used ssmtp for that effect in the past. It appears to be part of
the Debian project since its homepage is:
Debian -- Error
I know it’s available out of the box in Gentoo (emerge mail-mta/ssmtp),
and Ubuntu and Debian (apt-get install ssmtp). It’s also available in
Fedora Extras which means it could probably be rebuilt pretty easily for
CentOS, Red Hat Enterprise Linux, or other RHEL derivatives.
All it does is takes mail and foists it off to another host,
configurable in /etc/ssmtp/ssmtp.conf (or possibly
/usr/local/etc/ssmtp/ssmtp.conf if you’ve built from source).
You can also use Postfix to do that, with the relayhost parameter in
main.cf, but that’d probably be overkill for what you’re after. I’m
also positive that Sendmail can do it, too, provided you have high
enough a skill rating in Arcane Sendmail Configuration Black Arts.
Hope that helps,
Jeff
Jeff A. wrote:
dead obvious, but I’ve google for an hour or so now and haven’t come up
Fedora Extras which means it could probably be rebuilt pretty easily for
Hope that helps,
Jeff
Jeff
Yup. That seemed to work fine, although I’m struggling to get the
authentication to work with the postfix relay. Do you happen to know if
you need to compile from source with auth built in if you want
authentication to work. The docs are a little… basic
Thanks for your help
Chris
Jeff A. wrote:
It also looks like it only supports LOGIN and CRAM-MD5 according to
Jeff
Sounds good. Thanks for the suggestions
You can also control authentication from /etc/ssmtp/ssmtp.conf
with the following parameters:
AuthUser=
AuthPass=
AuthMethod=
Chris T wrote:
Yup. That seemed to work fine, although I’m struggling to get the
authentication to work with the postfix relay. Do you happen to know if
you need to compile from source with auth built in if you want
authentication to work. The docs are a little… basic
I honestly do not know, since I’ve never tried to do authN SMTP with it.
It also looks like it only supports LOGIN and CRAM-MD5 according to
the man page, so I can’t really test it as our SMTP server doesn’t do
either of those. Try this, though:
/usr/sbin/ssmtp -auUSERNAME -apPASSWORD root
Enter some data and hit enter twice to end. For me, this spat out the
error:
ssmtp: Server didn’t accept AUTH LOGIN (504 5.3.3 AUTH mechanism
LOGIN not available)
Maybe it’ll give you something equally useful. Hopefully, if it’s
compiled without authN support, it’ll complain about that. You may also
want to do:
export HISTCONTROL=ignorespace
first. If you then put a space before /usr/sbin/ssmtp it won’t save
that command in your shell history, so your password won’t be written in
your history file for anyone with the right perms to see. Mmmmmm.
bash.
Thanks for your help
Sure thing. Sorry I can’t be of more assistance, but I suspect that
ssmtp is supposed to solve a very simple problem and thus doesn’t offer
much in the way of advanced SMTP capabilities. If you can’t get it to
do this, I’d suggest looking into setting up Postfix as a satellite host
and not listening on port 25 for the world to hit.
Thanks,
Jeff
Ah, cool. I figured there was a way to do that, but didn’t know the
directives to use.
Thanks,
Jeff
Scott wrote:
Scott
Thanks for that. For some reason I can get the authentication working
with Cram-MD5, but suspect I’m just being dim. However, checking this
out has led me to a couple of other options, nullmailer and an improved
version of mailx (was nail, now called Heirloom mailx) which skips a
local MTA altogether.
Thanks
Chris
Chris T wrote:
Thanks for that. For some reason I can get the authentication working
with Cram-MD5, but suspect I’m just being dim. However, checking this
out has led me to a couple of other options, nullmailer and an improved
version of mailx (was nail, now called Heirloom mailx) which skips a
local MTA altogether.
Chris,
I hadn’t heard about nullmailer – thanks for bringing it to our
attention. I’ll look into it in the future if I need such a thing. I’m
also glad you found something that met your needs!
Thanks,
Jeff