Archive for April 24th, 2013
So going to webmin > Perl Modules > Suggested Modules shows Authen::Libwrap as a suggested module, but using webmin to install it always fails.
Error: Function definition too short '/ * EOF * /' in Libwrap.xs, line 32
the following may help
apt-get install build-essential gcc libc6-dev libwrap0 libwrap0-dev sudo cpan ExtUtils::MakeMaker sudo cpan Authen::Libwrap
This was writted for Ubuntu Server 12.04.
If all you really want from your Ubuntu Server is to be able to send you email if something goes wrong, or the occasional email to a trusted partner, friend, colleague, etc, then you want a simple solution. Although Postfix or sendmail, etc, will work in a satellite configuration, it’s still too heavy and over-the-top for this type of setup.
apt-get install ssmtp
/etc/ssmtp/ssmtp.conf in your favorite text editor and, to get it working on an example gmail account, set it up like so:
firstname.lastname@example.org mailhub=smtp.gmail.com:587 AuthUser=username AuthPass=password UseTLS=YES UseSTARTTLS=YES AuthMethod=LOGIN
Save the file, and you’re done.
Example for Amazon SES users. Be sure the sending domain is verified or mail will get rejected.:
email@example.com # from SES SMTP settings mailhub=email-smtp.us-east-1.amazonaws.com:587 AuthUser=username AuthPass=password UseTLS=YES AuthMethod=LOGIN
Important: You’re leaving your Gmail account password in a plaintext file. Make sure you’re using strong passwords. Even better, use Google 2-factor authentication so you can use an application-specific password for sSMTP.
UPDATE: Lastly, update the permissions
chown root:mail /etc/ssmtp/ssmtp.conf chmod 640 /etc/ssmtp/ssmtp.conf
Unprivileged users who have a need to send mail using sendmail must be a member of the mail group, or they will receive the following error:
mail: Cannot open mailhub:25
This was written for Ubuntu Server 12.04 64-bit.
- sSMTP- Debian Wiki – http://wiki.debian.org/sSMTP
On Ubuntu Server 12.04:
sudo apt-get install php5-suhosin
/etc/php5/apache2/php.ini and add (this step may not be necessary):
service apache2 restart
This is for Ubuntu Server 12.04 64-bit.
Install the NUT software
sudo apt-get install nut
edit file /etc/nut/ups.conf
Scroll down to the example, uncommenting and configuring. Locate the correct driver to use from this page. (Most USB UPSes using the usbhid-ups driver, and port set to auto). Example:
[myups] driver = usbhid-ups port = auto
Note the tag used in the brackets, you will need this later.
edit file /etc/nut/upsd.users
Find the section entitled “Configuring for upsmon”, uncomment and configure, using the example given.
Next edit upsmon.conf and add the example MONITOR line provided in upsd.users, adjusted for your settings.
Lastly, edit nut.conf and set appropriately.
service nut restart
If you get this error:
* Restarting Network UPS Tools [ OK ] Broadcast Message from nut@userver (somewhere) at 21:52 ... Communications with UPS myups@localhost lost Broadcast Message from nut@userver (somewhere) at 21:52 ... UPS myups@localhost is unavailable
Run the following commands as root:
udevadm control --reload-rule udevadm trigger upsdrvctl start