HOWTO
blog.devhen.com
Quicksearch
Categories
Links
Photography, Marketing and Web Design. Salt Lake City, Provo, and Park City, Utah
High Quality Utah Photography - Mountains, Parks, Temples and more
The Crew from Green Acres. Be warned.
Syndicate This Blog
Using PulseAudio sound server on Fedora 8
One of the great new features in Fedora 8 is the inclusion of the PulseAudio sound server. PulseAudio allows multiple streams of audio to be played at once, eliminating the worry of having your sound card locked up by another running program. There's also a handy volume control applet that will let you set the volume of each audio stream independently. That's right folks, listen to your MP3s, watch (and listen!) to a YouTube video, and voice chat with your IM buddies, all at the same time and with independent control over each program's volume. Setting up PulseAudio is very easy. Read on for instructions.
Continue reading "Using PulseAudio sound server on Fedora 8"
Continue reading "Using PulseAudio sound server on Fedora 8"
Posted by Devin Henderson on Friday, March 14. 2008 at 02:27 in Fedora, HOWTO, Linux
1 Comment Trackback (1)
1 Comment Trackback (1)
Setup a Spam-Proof Vacation Autoresponder with Procmail + Sendmail
The problem with vacation auto responders like 'vacation' for sendmail is that spammers often fake the From: address. Auto responding to these addresses can get your mail server blacklisted. To avoid this you can setup your autoresponder with procmail and, if you are running a spam filter on your machine, you can tell procmail to auto respond only if the X Spam Status header is 'No.' To accomplish this copy the following into ~/.procmailrc in the home directory of the user you want auto responses for. Make sure to make any neccessary changes to MAILDIR, SENDMAIL and the three instances of 'you@yourdomain.com':
Continue reading "Setup a Spam-Proof Vacation Autoresponder with Procmail + Sendmail"
Continue reading "Setup a Spam-Proof Vacation Autoresponder with Procmail + Sendmail"
Posted by devhen on Tuesday, January 8. 2008 at 23:09 in CentOS, Fedora, HOWTO, Linux, sendmail
no comments yet, be the first! Trackback (1)
no comments yet, be the first! Trackback (1)
HOWTO: Run Internet Explorer on Linux
The IEs4Linux project makes installing and running Internet Explorer on Linux a cinch. Just follow these simple instructions. Their script will download and install IE6 and, optionally, IE5 and IE5.5 as well. Everything is automated and extremely easy. You can also install Internet Explorer 7 by following these instructions. I was able to get all four versions of IE running on both my CentOS and Fedora machines in no time. There are non distro-specific instructions as well as instructions for the Ubuntu/Xubuntu/Kubuntu, Fedora, Gentoo and Debian distributions. Basically, if you're running Linux with Wine and cabextract installed you're good to go. Many thanks to the IEs4Linux project for making this so easy for us. We should all seriously consider donating to the project.
Posted by devhen on Monday, January 8. 2007 at 17:06 in HOWTO, Linux
no comments yet, be the first! Trackbacks (0)
no comments yet, be the first! Trackbacks (0)
HOWTO: Install Firefox 2.0 on Fedora Core 6
UPDATED: Mar-21-2007
Due to the popularity of this post I've decided to include instructions for all three of the most popular methods for installing Firefox 2 on Fedora Core 6. Read through the three options to decide which works best for you.
Option 1: Via yum with the 'development' repo
This command will allow you to upgrade to Firefox 2 via the Fedora Development repo. This is the most commonly recommended option.
Instructions (as root):
Pros: Uses "official" Fedora packages
Cons: Doesn't include the (optional) bonuses of option 2
Option 2: Via yum with the 'remi' repo
Remi Collet, an "official" Fedora developer, has made available a repo of packages that provides Firefox 2. The repo updates Firefox and those packages that depend on it and also contains a few bonuses such as an updated XChat package (version 2.
.
Instructions (as root):
Now make sure that in your /etc/yum.repos.d/remi.repo file you've got enabled=1 and then:
Pros: All required packages as well as some extra goodies; new versions of Firefox are automatically installed with yum update
Cons: Not "official" Fedora packages--bugs should not be submitted to the Fedora project
Option 3: Via firefox-2.*.tar.gz from Mozilla.com
I always recommend using RPM packages on Fedora, if possible. However, if you'd like to install Firefox 2 using firefox-2.*.tar.gz from Mozilla.com use this option. One benefit of this option is that Firefox 1.5 remains on your machine so have a choice as to which version to run.
Instructions (as root):
Download firefox-*.tar.gz from Mozilla.com.
Firefox 2 will now be your default browser. To run version 1.5 use the command firefox15. I don't recommend running both versions concurrently because they will be using the same profile which might cause problems.
Pros: Firefox 2 co-exists with version 1.5
Cons: Installation isn't as straightforward; must be repeated for future releases of Firefox 2
Due to the popularity of this post I've decided to include instructions for all three of the most popular methods for installing Firefox 2 on Fedora Core 6. Read through the three options to decide which works best for you.
Option 1: Via yum with the 'development' repo
This command will allow you to upgrade to Firefox 2 via the Fedora Development repo. This is the most commonly recommended option.
Instructions (as root):
# yum --enablerepo=development update firefoxPros: Uses "official" Fedora packages
Cons: Doesn't include the (optional) bonuses of option 2
Option 2: Via yum with the 'remi' repo
Remi Collet, an "official" Fedora developer, has made available a repo of packages that provides Firefox 2. The repo updates Firefox and those packages that depend on it and also contains a few bonuses such as an updated XChat package (version 2.
Instructions (as root):
# rpm -Uvh http://remi.collet.free.fr/rpms/fc6.i386/remi-release-1-2.fc6.remi.noarch.rpmNow make sure that in your /etc/yum.repos.d/remi.repo file you've got enabled=1 and then:
# yum updatePros: All required packages as well as some extra goodies; new versions of Firefox are automatically installed with yum update
Cons: Not "official" Fedora packages--bugs should not be submitted to the Fedora project
Option 3: Via firefox-2.*.tar.gz from Mozilla.com
I always recommend using RPM packages on Fedora, if possible. However, if you'd like to install Firefox 2 using firefox-2.*.tar.gz from Mozilla.com use this option. One benefit of this option is that Firefox 1.5 remains on your machine so have a choice as to which version to run.
Instructions (as root):
Download firefox-*.tar.gz from Mozilla.com.
# mv firefox-2.*.tar.gz /usr/local/
# cd /usr/local
# tar xvfz firefox-2.*.tar.gz
# mv /usr/bin/firefox /usr/bin/firefox15
# ln -s /usr/local/firefox/firefox /usr/bin/firefoxFirefox 2 will now be your default browser. To run version 1.5 use the command firefox15. I don't recommend running both versions concurrently because they will be using the same profile which might cause problems.
Pros: Firefox 2 co-exists with version 1.5
Cons: Installation isn't as straightforward; must be repeated for future releases of Firefox 2
Posted by devhen on Monday, December 18. 2006 at 16:19 in Fedora, HOWTO, Linux
45 Comments Trackbacks (0)
45 Comments Trackbacks (0)
HOWTO: Copy Linux Filesystems
I recently added a hard drive to one of my Linux systems and while searching for the best way to copy my old /home filesystem to the new drive I came upon this command:
/sbin/dump 0f - /home | ( cd /new ; /sbin/restore rf - )
Here my new hard drive is mounted on /new and I'm copying the entire filesystem from /home to /new. On my system (CentOS 4) the dump and restore commands are in /sbin/ but other distros may not be consistent so you'll want to make changes to the command as needed.
/sbin/dump 0f - /home | ( cd /new ; /sbin/restore rf - )
Here my new hard drive is mounted on /new and I'm copying the entire filesystem from /home to /new. On my system (CentOS 4) the dump and restore commands are in /sbin/ but other distros may not be consistent so you'll want to make changes to the command as needed.
Posted by devhen on Thursday, June 8. 2006 at 15:05 in HOWTO, Linux
no comments yet, be the first! Trackbacks (0)
no comments yet, be the first! Trackbacks (0)
HOWTO: Install fuse + sshfs on CentOS Linux
UPDATED Dec-19-2006:
NOTE: These instruction are for CentOS 4.
The apt-get method of installing sshfs that I had posted here previously did not work for me. I got this error when trying to mount an ssh drive:
shfsmount: shfs filesystem not supported by the kernel
So, I set out to find a different method of installing sshfs (and fuse, which it requires). One, preferably, that would actually work. Well, I found one. Its not the most elegant solution but its effective.
First, download a copy of the fuse source rpm:
wget http://www.devhen.net/centos/fuse-2.6.0-1.src.rpm
Next, install the source rpm and then build the proper fuse rpm's from the .spec file:
rpm -ivh fuse-2.6.0-1.src.rpm
rpmbuild -bb /usr/src/redhat/SPECS/fuse.spec
Next, install the rpms that you have built:
cd /usr/src/redhat/RPMS/i386 (replace 'i386' with your arch, if necessary)
rpm -Uvh fuse-2.6.0-1.i386.rpm fuse-kernel-2.6.0-1.i386.rpm fuse-libs-2.6.0-1.i386.rpm fuse-devel-2.6.0-1.i386.rpm
Now you can install the sshfs-fuse rpm:
wget http://www.devhen.net/centos/sshfs-fuse-1.6-2.i386.rpm
rpm -ivh sshfs-fuse-1.6-2.i386.rpm
** You can try building the sshfs-fuse rpm from its source package if your not on i386**
Now comes the ugly part... For some reason the system can't find the fuse module after installing these packages. So, head over to the fuse project homepage and download fuse-2.6.0.tar.gz. Unpack it and then
./configure
make
make install
and you should be in business. As I said, this is not an elegant solution because you are installing fuse from the tar.gz file on top of the fuse rpms. However, it works for me and that's all that matters right now because I really needed to mount some ssh drives on my workstation.
Mount an ssh drive like so:
sshfs user@remotesystem:/path/you/want/to/mount/ /mnt/mount-point/ -o allow_other
Don't forget the trailing /'s on both the source folder and the mount point. -o allow_other will give all users access to the mounted drive. Type sshfs -h for a list of all of sshfs' options.
NOTE: These instruction are for CentOS 4.
The apt-get method of installing sshfs that I had posted here previously did not work for me. I got this error when trying to mount an ssh drive:
shfsmount: shfs filesystem not supported by the kernel
So, I set out to find a different method of installing sshfs (and fuse, which it requires). One, preferably, that would actually work. Well, I found one. Its not the most elegant solution but its effective.
First, download a copy of the fuse source rpm:
wget http://www.devhen.net/centos/fuse-2.6.0-1.src.rpm
Next, install the source rpm and then build the proper fuse rpm's from the .spec file:
rpm -ivh fuse-2.6.0-1.src.rpm
rpmbuild -bb /usr/src/redhat/SPECS/fuse.spec
Next, install the rpms that you have built:
cd /usr/src/redhat/RPMS/i386 (replace 'i386' with your arch, if necessary)
rpm -Uvh fuse-2.6.0-1.i386.rpm fuse-kernel-2.6.0-1.i386.rpm fuse-libs-2.6.0-1.i386.rpm fuse-devel-2.6.0-1.i386.rpm
Now you can install the sshfs-fuse rpm:
wget http://www.devhen.net/centos/sshfs-fuse-1.6-2.i386.rpm
rpm -ivh sshfs-fuse-1.6-2.i386.rpm
** You can try building the sshfs-fuse rpm from its source package if your not on i386**
Now comes the ugly part... For some reason the system can't find the fuse module after installing these packages. So, head over to the fuse project homepage and download fuse-2.6.0.tar.gz. Unpack it and then
./configure
make
make install
and you should be in business. As I said, this is not an elegant solution because you are installing fuse from the tar.gz file on top of the fuse rpms. However, it works for me and that's all that matters right now because I really needed to mount some ssh drives on my workstation.
Mount an ssh drive like so:
sshfs user@remotesystem:/path/you/want/to/mount/ /mnt/mount-point/ -o allow_other
Don't forget the trailing /'s on both the source folder and the mount point. -o allow_other will give all users access to the mounted drive. Type sshfs -h for a list of all of sshfs' options.
Posted by devhen on Thursday, June 8. 2006 at 14:55 in CentOS, HOWTO, Linux
11 Comments Trackbacks (0)
11 Comments Trackbacks (0)
HOWTO: Upgrade to Firefox 1.5 on Ubuntu 5.10 (Breezy Badger)
The latest stable release of Ubuntu Linux comes with Firefox version 1.0.8 installed. Unfortunately this version is slower than 1.5+ and some of the extensions I use only support 1.5+ so, naturally, I needed to upgrade. I found a page on the Ubuntu Wiki called FirefoxNewVersion that shows you how to install a second copy of Firefox, downloaded from the Mozilla web site, alongside Ubuntu's default Firefox package. Instructions are included on how to change the /usr/bin/firefox script to use the newly installed version instead of the default. This looked like more work than I wanted for a Firefox upgrade--I wanted to stick with .deb packages and didn't like the idea of having two versions of Firefox installed. So, I discovered a way upgrade my Firefox package using Debain backports. Read on for more.
(Some text taken from the Debian backports instructions)
Add this line
to your
/etc/apt/sources.list
and these lines
to your
/etc/apt/preferences
(You may need to create this file if it doesn't exist)
This will deactivate all packages from backports.org. Now you need to activate the particular packages you want to upgrade from backports.org (e.g. firefox). Upgrading ALL of your packages from backports.org is certain to cause problems. So, we need to add the following text
to
/etc/apt/preferences
for each package that we want to allow upgrading via backports.org. We need to do this for firefox and its dependant packages. These include firefox, firefox-gnome-support, language-support-en and mozilla-firefox-locale-en-gb.
Your /etc/apt/preferences file should look something like mine:
Now simply run
and
as usual, or launch 'synaptic', click 'refresh' to reload information from your repositories, find your firefox package, mark it to be upgraded and hit apply.
(Some text taken from the Debian backports instructions)
Add this line
deb http://www.backports.org/debian/ sarge-backports main
to your
/etc/apt/sources.list
and these lines
Package:
Pin: release a=sarge-backports
Pin-Priority: 200
to your
/etc/apt/preferences
(You may need to create this file if it doesn't exist)
This will deactivate all packages from backports.org. Now you need to activate the particular packages you want to upgrade from backports.org (e.g. firefox). Upgrading ALL of your packages from backports.org is certain to cause problems. So, we need to add the following text
Package: firefox
Pin: release a=sarge-backports
Pin-Priority: 999
to
/etc/apt/preferences
for each package that we want to allow upgrading via backports.org. We need to do this for firefox and its dependant packages. These include firefox, firefox-gnome-support, language-support-en and mozilla-firefox-locale-en-gb.
Your /etc/apt/preferences file should look something like mine:
Package:
Pin: release a=sarge-backports
Pin-Priority: 200
Package: firefox
Pin: release a=sarge-backports
Pin-Priority: 999
Package: firefox-gnome-support
Pin: release a=sarge-backports
Pin-Priority: 999
Package: language-support-en
Pin: release a=sarge-backports
Pin-Priority: 999
Package: mozilla-firefox-locale-en-gb
Pin: release a=sarge-backports
Pin-Priority: 999
Now simply run
apt-get update
and
apt-get upgrade firefox
as usual, or launch 'synaptic', click 'refresh' to reload information from your repositories, find your firefox package, mark it to be upgraded and hit apply.
Posted by devhen on Thursday, May 11. 2006 at 07:12 in HOWTO, Linux, Mozilla
3 Comments Trackbacks (3)
3 Comments Trackbacks (3)
HOWTO: Sendmail SMTP Auth
These notes are designed to help a Linux geek setup SMTP auth on a Linux + sendmail server. Without proper SMTP auth settings your server is liable to be used by spammers and spam bots to send out copious amounts of unwanted mail. This can get your server's IP blacklisted and can really eat up your resources. Needless to say, we need to avoid this. Start by editing your sendmail.mc file (found in /etc/mail). I use the following commands, try replacing the corresponding lines in your mc file with these ones: (Note that lines beginning with 'dnl' are essentially considered comments and are ignored)
define(`confAUTH_OPTIONS', `A')
dnl
dnl Accept PLAIN and LOGIN authentications.dnl
TRUST_AUTH_MECH(`LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `LOGIN PLAIN')dnl
Now you need to rebuild your sendmail.cf file from the .mc file you've just edited:
make sendmail.cf -C /etc/mail
Next we need to make sure saslauthd is running and configured correctly. Edit your saslauthd configuration file (/etc/sysconfig/saslauthd) and replace shadow with pam for the MECH variable like so:
# Mechanism to use when checking passwords. Run "saslauthd -v" to get a list
# of which mechanism your installation was compiled to use.
MECH=pam
Restart sendmail and saslauthd
/etc/rc.d/init.d/sendmail restart
/etc/rc.d/init.d/saslauthd restart
and don't forget to configure your email clients to use authentication when sending outgoing mail.
For more information and some tips on installing a certificate for secure SMTP connections, try this article:
http://www.madboa.com/geek/sendmail-auth/
Read on for a full copy of my sendmail.mc file.
divert(-1)dnl
dnl #
dnl # This is the sendmail macro config file for m4. If you make changes to
dnl # /etc/mail/sendmail.mc, you will need to regenerate the
dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package is
dnl # installed and then performing a
dnl #
dnl # make -C /etc/mail
dnl #
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for Red Hat Linux')dnl
OSTYPE(`linux')dnl
dnl #
dnl # default logging level is 9, you might want to set it higher to
dnl # debug the configuration
dnl #
dnl define(`confLOG_LEVEL', `9')dnl
dnl #
dnl # Uncomment and edit the following line if your outgoing mail needs to
dnl # be sent out through an external mail server:
dnl #
undefine(`SMART_HOST')
dnl #
define(`confDEF_USER_ID',``8:12'')dnl
dnl define(`confAUTO_REBUILD')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
dnl #
dnl # The following allows relaying if the user authenticates, and disallows
dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links
dnl #
define(`confAUTH_OPTIONS',`A')
dnl #
dnl # PLAIN is the preferred plaintext authentication method and used by
dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do
dnl # use LOGIN. Other mechanisms should be used if the connection is not
dnl # guaranteed secure.
dnl #
dnl # TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl # define(`confAUTH_MECHANISMS', `DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl #
TRUST_AUTH_MECH(`LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `LOGIN PLAIN')dnl
dnl #
dnl #
dnl # Rudimentary information on creating certificates for sendmail TLS:
dnl # make -C /usr/share/ssl/certs usage
dnl # or use the included makecert.sh script
dnl #
dnl define(`confCACERT_PATH',`/usr/share/ssl/certs')
dnl define(`confCACERT',`/usr/share/ssl/certs/ca-bundle.crt')
dnl define(`confSERVER_CERT',`/usr/share/ssl/certs/sendmail.pem')
dnl define(`confSERVER_KEY',`/usr/share/ssl/certs/sendmail.pem')
dnl #
dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP's
dnl # slapd, which requires the file to be readble by group ldap
dnl #
dnl define(`confDONT_BLAME_SENDMAIL',`groupreadablekeyfile')dnl
dnl #
dnl define(`confTO_QUEUEWARN', `4h')dnl
dnl define(`confTO_QUEUERETURN', `5d')dnl
dnl define(`confQUEUE_LA', `12')dnl
dnl define(`confREFUSE_LA', `18')dnl
define(`confTO_IDENT', `0')dnl
dnl FEATURE(delay_checks)dnl
FEATURE(`no_default_msa',`dnl')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
dnl #
dnl # The -t option will retry delivery if e.g. the user runs over his quota.
dnl #
FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
dnl #
dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
dnl #
dnl # The following causes sendmail to additionally listen to port 587 for
dnl # mail from MUAs that authenticate. Roaming users who can't reach their
dnl # preferred sendmail daemon due to port 25 being blocked or redirected find
dnl # this useful.
dnl #
dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
dnl #
dnl # The following causes sendmail to additionally listen to port 465, but
dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed
dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't
dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS
dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses smtps
dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1.
dnl #
dnl # For this to work your OpenSSL certificates must be configured.
dnl #
dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
dnl #
dnl # The following causes sendmail to additionally listen on the IPv6 loopback
dnl # device. Remove the loopback address restriction listen to the network.
dnl #
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl
dnl #
dnl # enable both ipv6 and ipv4 in sendmail:
dnl #
dnl DAEMON_OPTIONS(`Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6')
dnl #
dnl # We strongly recommend not accepting unresolvable domains if you want to
dnl # protect yourself from spam. However, the laptop and users on computers
dnl # that do not have 24x7 DNS do need this.
dnl #
FEATURE(`accept_unresolvable_domains')dnl
dnl #
dnl FEATURE(`relay_based_on_MX')dnl
dnl #
dnl # Also accept email sent to "localhost.localdomain" as local email.
dnl #
LOCAL_DOMAIN(`localhost.localdomain')dnl
dnl #
dnl # The following example makes mail from this host and any additional
dnl # specified domains appear to be sent from mydomain.com
dnl #
dnl MASQUERADE_AS(`sprinkler.com')dnl
dnl #
dnl # masquerade not just the headers, but the envelope as well
dnl #
dnl FEATURE(masquerade_envelope)dnl
dnl #
dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well
dnl #
dnl FEATURE(masquerade_entire_domain)dnl
dnl #
dnl MASQUERADE_DOMAIN(localhost)dnl
dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl
dnl MASQUERADE_DOMAIN(mydomainalias.com)dnl
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
define(`confAUTH_OPTIONS', `A')
dnl
dnl Accept PLAIN and LOGIN authentications.dnl
TRUST_AUTH_MECH(`LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `LOGIN PLAIN')dnl
Now you need to rebuild your sendmail.cf file from the .mc file you've just edited:
make sendmail.cf -C /etc/mail
Next we need to make sure saslauthd is running and configured correctly. Edit your saslauthd configuration file (/etc/sysconfig/saslauthd) and replace shadow with pam for the MECH variable like so:
# Mechanism to use when checking passwords. Run "saslauthd -v" to get a list
# of which mechanism your installation was compiled to use.
MECH=pam
Restart sendmail and saslauthd
/etc/rc.d/init.d/sendmail restart
/etc/rc.d/init.d/saslauthd restart
and don't forget to configure your email clients to use authentication when sending outgoing mail.
For more information and some tips on installing a certificate for secure SMTP connections, try this article:
http://www.madboa.com/geek/sendmail-auth/
Read on for a full copy of my sendmail.mc file.
divert(-1)dnl
dnl #
dnl # This is the sendmail macro config file for m4. If you make changes to
dnl # /etc/mail/sendmail.mc, you will need to regenerate the
dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package is
dnl # installed and then performing a
dnl #
dnl # make -C /etc/mail
dnl #
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for Red Hat Linux')dnl
OSTYPE(`linux')dnl
dnl #
dnl # default logging level is 9, you might want to set it higher to
dnl # debug the configuration
dnl #
dnl define(`confLOG_LEVEL', `9')dnl
dnl #
dnl # Uncomment and edit the following line if your outgoing mail needs to
dnl # be sent out through an external mail server:
dnl #
undefine(`SMART_HOST')
dnl #
define(`confDEF_USER_ID',``8:12'')dnl
dnl define(`confAUTO_REBUILD')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
dnl #
dnl # The following allows relaying if the user authenticates, and disallows
dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links
dnl #
define(`confAUTH_OPTIONS',`A')
dnl #
dnl # PLAIN is the preferred plaintext authentication method and used by
dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do
dnl # use LOGIN. Other mechanisms should be used if the connection is not
dnl # guaranteed secure.
dnl #
dnl # TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl # define(`confAUTH_MECHANISMS', `DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl #
TRUST_AUTH_MECH(`LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `LOGIN PLAIN')dnl
dnl #
dnl #
dnl # Rudimentary information on creating certificates for sendmail TLS:
dnl # make -C /usr/share/ssl/certs usage
dnl # or use the included makecert.sh script
dnl #
dnl define(`confCACERT_PATH',`/usr/share/ssl/certs')
dnl define(`confCACERT',`/usr/share/ssl/certs/ca-bundle.crt')
dnl define(`confSERVER_CERT',`/usr/share/ssl/certs/sendmail.pem')
dnl define(`confSERVER_KEY',`/usr/share/ssl/certs/sendmail.pem')
dnl #
dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP's
dnl # slapd, which requires the file to be readble by group ldap
dnl #
dnl define(`confDONT_BLAME_SENDMAIL',`groupreadablekeyfile')dnl
dnl #
dnl define(`confTO_QUEUEWARN', `4h')dnl
dnl define(`confTO_QUEUERETURN', `5d')dnl
dnl define(`confQUEUE_LA', `12')dnl
dnl define(`confREFUSE_LA', `18')dnl
define(`confTO_IDENT', `0')dnl
dnl FEATURE(delay_checks)dnl
FEATURE(`no_default_msa',`dnl')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
dnl #
dnl # The -t option will retry delivery if e.g. the user runs over his quota.
dnl #
FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
dnl #
dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
dnl #
dnl # The following causes sendmail to additionally listen to port 587 for
dnl # mail from MUAs that authenticate. Roaming users who can't reach their
dnl # preferred sendmail daemon due to port 25 being blocked or redirected find
dnl # this useful.
dnl #
dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
dnl #
dnl # The following causes sendmail to additionally listen to port 465, but
dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed
dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't
dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS
dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses smtps
dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1.
dnl #
dnl # For this to work your OpenSSL certificates must be configured.
dnl #
dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
dnl #
dnl # The following causes sendmail to additionally listen on the IPv6 loopback
dnl # device. Remove the loopback address restriction listen to the network.
dnl #
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl
dnl #
dnl # enable both ipv6 and ipv4 in sendmail:
dnl #
dnl DAEMON_OPTIONS(`Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6')
dnl #
dnl # We strongly recommend not accepting unresolvable domains if you want to
dnl # protect yourself from spam. However, the laptop and users on computers
dnl # that do not have 24x7 DNS do need this.
dnl #
FEATURE(`accept_unresolvable_domains')dnl
dnl #
dnl FEATURE(`relay_based_on_MX')dnl
dnl #
dnl # Also accept email sent to "localhost.localdomain" as local email.
dnl #
LOCAL_DOMAIN(`localhost.localdomain')dnl
dnl #
dnl # The following example makes mail from this host and any additional
dnl # specified domains appear to be sent from mydomain.com
dnl #
dnl MASQUERADE_AS(`sprinkler.com')dnl
dnl #
dnl # masquerade not just the headers, but the envelope as well
dnl #
dnl FEATURE(masquerade_envelope)dnl
dnl #
dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well
dnl #
dnl FEATURE(masquerade_entire_domain)dnl
dnl #
dnl MASQUERADE_DOMAIN(localhost)dnl
dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl
dnl MASQUERADE_DOMAIN(mydomainalias.com)dnl
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
Posted by devhen on Monday, May 1. 2006 at 17:05 in HOWTO, Linux, sendmail
4 Comments Trackbacks (0)
4 Comments Trackbacks (0)
Download Images To Linux From A Digital Camera
Thats right, not only is it possible, its easy! Just connect your digital camera via USB, login as root, and type
mkdir /mnt/camera
mount /dev/sda1 -t vfat /mnt/camera
The location of your digital camera depends on how many SCSI devices you have attached to your computer. So if sda1 doesn't work, try sda2, sda3, etc.
Logout of root and type
cd /mnt/camera
and you have your photos.
mkdir /mnt/camera
mount /dev/sda1 -t vfat /mnt/camera
The location of your digital camera depends on how many SCSI devices you have attached to your computer. So if sda1 doesn't work, try sda2, sda3, etc.
Logout of root and type
cd /mnt/camera
and you have your photos.
Posted by devhen on Saturday, February 28. 2004 at 18:08 in HOWTO, Linux
no comments yet, be the first! Trackbacks (0)
no comments yet, be the first! Trackbacks (0)
(Page 1 of 1, totaling 9 entries)
