November 26th, 2007
638Part VRunning ServersIf CUPS is already running on your computer, you can immediately use CUPS Web- based administration from your Web browser. To see if CUPS is running and startsetting up your printers, open a Web browser on the local computer and type thefollowing into its location box: http://localhost:631/adminYou are prompted for a valid login name and password. Type the root login nameand the root user s password, and then click OK. A screen similar to the one shownin Figure 25-1 appears. Figure 25-1:CUPS provides a Web-based administration tool. By default, Web-based CUPS administration is available only from the local host. Toaccess Web-based CUPS administration from another computer, you must changethe /adminsection in the /etc/cups/cupsd.conffile. As recommended in the textof this file, you should limit access to CUPS administration from the Web. The fol- lowing example includes an Allowline to permit access from a host from IP address10.0.0.5(you must also change the Listen 127.0.0.1:631line to listen outsideyour local host, as described a bit later). AuthType BasicAuthClass SystemOrder Deny, AllowDeny from AllAllow From 127.0.0.1Allow From 10.0.0.5
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.
Posted in B5 | No Comments »
November 25th, 2007
637Chapter 25Running a Print Server .CUPS offers a Web-based interface for adding and managing printers. You canaccess this service by typing localhost:631from a Web browser on the com- puter running the CUPS service. (See the section titled Using Web-Based CUPSAdministration, later in this chapter.) The KDE desktop comes with a tool formanaging CUPS server features. To launch the KDE CUPS Server Configurationwindow, type /usr/bin/cupsdconffrom a Terminal window. .You also can configure CUPS manually (that is, edit the configuration files andstart the cupsd daemon manually). Configuration files for CUPS are contained inthe /etc/cupsdirectory. In particular, you might be interested in the cupsd. conffile, which identifies permission, authentication, and other informationfor the printer daemon, and printers.conf, which identifies addresses andoptions for configured printers. Use the classes.conffile to define localprinter classes. You can print to CUPS from non-UNIX systems as well. For example, you can use aPostScript printer driver to print directly from Windows XP to your CUPS server. Youcan use CUPS without modification by configuring the XP computer with aPostScript driver that uses http://printservername:631printers/targetPrinteras its printing port. To use CUPS, you need to have it installed. Most Linux distributions let you chooseto add CUPS during the initial system install or will simply add CUPS by default. IfCUPS was not added when you first installed your Linux distribution, check youroriginal installation medium (DVD or CD) to see if it is there for you to install now. Fedora, Slackware, SUSE, and other Linux distributions all have CUPS on the firstCD or DVD of their installation sets. Setting Up PrintersWhile it is usually best to use the printer administration tools that are specificallybuilt for your distribution, many Linux systems simply rely on the tools that comewith the CUPS software package. This section explores how to use CUPS Web-basedadministration tools that come with every Linux distribution and then examines theprinter configuration tool system-config-printer that comes with Fedora and RedHat Enterprise Linux systems for setting up printers. Using Web-Based CUPS AdministrationCUPS offers its own Web-based administrative tool for adding, deleting, and modify- ing printer configurations on your computer. The CUPS print service (using the cupsddaemon) listens on port 631 to provide access to the CUPS Web-based administrativeinterface. Note34_
From our experience, we can recommend PHP5 Web Hosting services, if you need affordable webhost to host and run your web application.
Posted in B5 | No Comments »
November 24th, 2007
636Part VRunning ServersCommon UNIX Printing Service (CUPS) CUPS has become the standard for printing from Linux and other UNIX-like operatingsystems. It was designed to meet today s needs for standardized printer definitionsand sharing on IP-based networks (as most computer networks are today). Nearlyevery Linux distribution today comes with CUPS as its printing service. Here aresome of the service s features: .IPP At its heart, CUPS is based on the Internet Printing Protocol (www.pwg. org/ipp), a standard that was created to simplify how printers can be sharedover IP networks. In the IPP model, printer servers and clients who want toprint can exchange information about the model and features of a printer usingHTTP (that is, Web content) protocol. A server could also broadcast the avail- ability of a printer so a printing client could easily find a list of locally availableprinters. .Drivers CUPS also standardized how printer drivers are created. The ideawas to have a common format that could be used by printer manufacturers sothat a driver could work across all different types of UNIX systems. That way, amanufacturer only had to create the driver once to work for Linux, Mac OS X, and a variety of UNIX derivatives. .Printer classes You can use printer classes to create multiple print serverentries that point to the same printer or one print server entry that points tomultiple printers. In the first case, multiple entries could each allow differentoptions (such as pointing to a particular paper tray or printing with certaincharacter sizes or margins). In the second case, you could have a pool of print- ers so that printing is distributed, decreasing the occurrence of congested printqueues often caused by a malfunctioning printer or a printer that is dealingwith very large documents. .UNIX print commands To integrate into Linux and other UNIX environments, CUPS offers versions of standard commands for printing and managing printersthat have been traditionally offered with UNIX systems. Many Linux distributions come with simplified methods of configuring CUPS print- ers. Here are two examples: .In Fedora and other Red Hat Linux systems, the Printer Configuration window(system-config-printercommand) enables you to configure printers thatuse the CUPS facility. .In SUSE, the YaST facility includes a printer configuration module. From theYaST Control Center select Hardware.Printer. For distributions that don t have their own printer configuration tools, there areseveral ways to configure CUPS using tools that aren t specific to a Linux distribu- tion. Here are a couple of them:
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.
Posted in B5 | No Comments »
November 24th, 2007
Running a Print ServerSharing printers is a good way to save money and makeyour printing more efficient. Very few people need to printall the time, but when they do want to print something, theyusually need it quickly. Setting up a print server can save moneyby eliminating the need for a printer at every workstation. Some of those savings can be used to buy printers that canoutput more pages per minute or have higher-quality output. You can attach printers to your Linux system to make themavailable to users of that system (standalone printing) or toother computers on the network as a shared printer. You canalso configure your Linux printer as a remote CUPS or Sambaprinter. With Samba, you are emulating Windows printing ser- vices, which is pretty useful given the abundance of Windowsclient systems. This chapter describes configuring and using printers on Linuxsystems with various desktop environments in use. Some ofthe details may vary from one distribution to another, but theinformation included here should work well for the more com- monly used distributions. This chapter focuses on CommonUNIX Printing Service (CUPS), which is the recommended printservice for the majority of Linux installations. Examples in thischapter use the Printer Configuration options in the GNOMEand K Desktop environments. Once a local printer is configured, print commands such as lprare available for carrying out the actual printing. Commandsalso exist for querying print queues (lpq), manipulating printqueues (lpc), and removing print queues (lprm). A localprinter can also be shared as a print server for users on othercomputers on your network. 2525CHAPTER …In This ChapterUnderstandingprinting in LinuxSetting up printersUsing printingcommandsManaging documentprintingSharing printers …
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.
Posted in B5 | No Comments »
November 23rd, 2007
634Part VRunning ServersSome remote mail servers may refuse to send messages to you if you are using acertificate that is not signed by a CA that they recognize. If this happens, then youmay need to remove the -o smtpd_use_tls=yesoption from the smtpline. Replace smtpd_enforce_tlswith smtpd_enable_tlson the port 587 line ifyou need to maintain support for non-TLS clients on that port due to packetfilters. 9.Enable SSL/TLS in the Courier-IMAP daemon by editing /etc/courier/ imapd-ssland replacing the values for TLS_CERTFILEand TLS_TRUSTCERTSwith the following: TLS_CERTFILE=/etc/ssl/private/mail.pemTLS_TRUSTCERTS=/etc/ssl/certs/ca-certificates.pem10.Restart Postfix and the Courier-IMAP daemons: # invoke-rc.d postfix restart# invoke-rc.d courier-imap restart# invoke-rc.d courier-imap-ssl restart11.Configure your mail clients to use SSL. All SSL-enabled clients should supportSSL/TLS when sending to port 465 and when receiving on port 993. Newerclients that support the STARTTLS extension should also be able to useSSL/TLS when sending to port 25 or 587, and when receiving from port 143. SummaryUsing Linux and a good Internet connection, you can set up and maintain your ownmail server. Preparing your computer to become a mail server includes configuringyour network connection, setting up delivery and retrieval methods, and addingrequired software packages. This chapter describes how to install, configure, and troubleshoot two of the mostpopular open source server packages: sendmail and Postfix. Those packages canbeused in tandem with spam filtering software (such as SpamAssassin) and virusscanning software (such as ClamAV). Methods for securing your mail server includeconfiguring support for SSL/TLS encryption. … Caution33_
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.
Posted in B5 | No Comments »
November 22nd, 2007
633Chapter 24Running a Mail ServerDebconf will ask you whether you want to trust the CA certificates by default. In most cases, you will want to select Yes. 3.If you are going to be using a certificate from a CA that is not already recog- nized (this is generally only true if you are running your own CA), place the CApublic certificate in its own file in /etc/ssl/certs/and update the certificatedatabase: # update-ca-certificates4.Generate the private key and certificate signing request, as described inChapter 23. The best location for these files is /etc/ssl/private/. Here sanexample: #cd /etc/ssl/private#umask 0077#openssl genrsa -out mail.key 1024#openssl req -new -key mail.key -out mail.csr5.Get your CSR (Certificate Signing Request) signed and place the certificatein/etc/mail/private/mail.crt. Or, to do a self-signed certificate, do thefollowing: # openssl req -new -x509 -nodes -sha1 -days 365 -key mail.key -out mail.crtMany mail programs will refuse to connect to the server if they do not recognizethe certificate. If you are running your own CA, you can overcome this by distributingthe CA public key to all clients. 6.Concatenate the private key and certificate into a single file: # cd /etc/ssl/private# umask 0077# cat mail.key mail.crt >> mail.pem7.Tell Postfix where to find certificates and keys by adding the following lines tothe end of /etc/postfix/main.cf: smtpd_tls_cert_file = /etc/ssl/private/mail.pemsmtpd_tls_key_file = $smtpd_tls_cert_filesmtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt8.Configure the Postfix daemons to support SSL/TLS by adding -o smtpd_ use_tls=yesto the line in /etc/postfix/master.cfthat starts with smtpd. There will also be three commented-out lines at the end of the file that startwith tlsmgr, smtps, and 587. Uncomment them and remove the -o smtpd_ sasl_auth_enable=yesparameters. When finished, the lines will look some- thing like this: smtp inet n - - - - smtpd -o smtpd_use_tls=yes(there will be quite a few lines in between) # only used by postfix-tlstlsmgr fifo - - n 300 1 tlsmgrsmtps inet n - n - - smtpd -o smtpd_tls_wrappermode=yes587 inet n - n - - smtpd -o smtpd_enforce_tls=yesCaution33_
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.
Posted in B5 | No Comments »
November 21st, 2007
632Part VRunning ServersIf you want to have Fetchmail run in the background, you can use the –daemon(or-d) flags with a parameter telling it how often (in seconds) to poll the servers: $ fetchmail –daemon 300To have Fetchmail automatically start when the system boots, add this to yourcrontabfile: @reboot /usr/bin/fetchmail –daemon 300Fetchmailcannot prompt for passwords when run in this manner, which meansthat you must store the passwords in .fetchmailrcfor this to work. If you haven t configured a crontab file before, setting it up can be as easy as per- forming the following steps: $ cat > mycron@reboot /usr/bin/fetchmail –daemon 300(hit Ctrl-D here) $ crontab mycronConfiguring Web-Based MailIf you re running an IMAP server, you can offer Web-based access by installing IMP(http://horde.org/imp/, also in the imp3 package) or SquirrelMail (http:// squirrelmail.org/, also found in the squirrelmail package). Start by configuringyour system as a LAMP server (Chapter 23), and then install and configure theappropriate package. IMP is considerably more complex to configure than SquirrelMail and may bemore difficult to install. If you aren t sure which one is right for you, try the onlinedemos for both and see which one you like best. Securing Communications with SSL/TLSBecause communication between mail clients and the server often contains sensitiveinformation such as passwords, it is usually desirable to enable SSL/TLS encryption. Here s how to enable SSL/TLS in Postfix and Courier-IMAP: 1.SSL/TLS for Postfix and Courier-IMAP are provided in the postfix-tls andcourier-imap-tls packages, respectively. Use APT to install them: # apt-get install postfix-tls courier-imap-ssl2.Third-party CA certificates are provided in the ca-certificates package. Thiswill be referenced in the configuration, so install it too: # apt-get install ca-certificatesNoteNote33_
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.
Posted in B5 | No Comments »
November 21st, 2007
631Chapter 24Running a Mail ServerAny errors relating to clamav-milter and spamass-milter not running will be in themail.logfile and will look something like this: […] Milter (clamav): to error stateConfiguring Mail ClientsAny mail client with support for the appropriate protocol for your configuration(POP3 for the first configuration, IMAP for the second) should be able to accessmail from your server. Just use the name of your server in the mail server settings, and follow the troubleshooting steps in the previous section if something doesn twork. You can find more information about mail clients for Linux in Chapter 21. Configuring FetchmailFetchmail is an MRA (Mail Retrieval Agent) that you can use to pull mail from aremote account to your new server. It is configured in the $HOME/.fetchmailrcfile, and is very easy to set up. To pull mail to your server, log in as the user thatthemail should go, then configure and run it from there. Run Fetchmail as the user for whom the mail is being retrieved. You should neverrun it as root. If you re doing a complex setup in which you retrieve mail from asingle mailbox that needs to be sorted out for multiple users, see the fetchmailman page for information about multidrop mailboxes. A .fetchmailrcfile can be as simple as this: poll mailserver.yourisp.example protocol pop3 username foo If you have more than one mail server, you can add it as an additional line. If theserver from which you are pulling mail supports IMAP, you can use imapinstead ofpop3. Other options that you can have are password=your password>and ssl. Storing the password in the file enables you to run Fetchmail without entering apassword, and the ssloption tells Fetchmail to use an SSL/TLS connection to theserver. Your .fetchmailrcfile should not be readable by others, and Fetchmail will gen- erally complain if it is. To set the permissions so that only you can read it, runchmod 0600 $HOME/.fetchmailrc/. Running Fetchmail is as simple as typing$ fetchmailNoteNoteCross- Reference33_
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.
Posted in B5 | No Comments »
November 20th, 2007
630Part VRunning Servers9.Signal Postfix to reload its configuration so that it starts using maildropinstead of its own built-in MDA: # invoke-rc.d postfix reload10.Install the Courier-IMAP daemon: # apt-get install courier-imapIf you want to allow POP3 access, you can also install the courier-pop package atthis step. Keep in mind, however, that POP3 clients will be unable to access theTrash folders under their accounts. 11.Debconf asks whether you want to create directories for Web-based administra- tion. This interface has limited features, so I recommend that you not enable it. You now have a fully functioning mail server that you can access from any standardmail client. Testing and TroubleshootingThe best way to test your mail system is to try sending a message to your newaddress. Messages can be sent using your mail client or from the command lineusing the mailprogram. Messages with attachments can be sent from the com- mand line using mpack. To verify that your virus scanner is scanning messages properly, try sending your- self a test file. Test files containing fake viruses that should be detected by ClamAVcan be found in the clamav-testfiles package. Use mpackto send one of the files, suchas test.zip, in /usr/share/clamav-testfiles/to an address on your serverand verify that it was handled properly: # mpack -s test message /usr/share/clamav-testfiles/test.zipe-mail address of recipientThe mpackprogram is part of the mpack package, which may not be installed bydefault. You can use apt-getto install it very easily. To test SpamAssassin, try sending yourself a message that looks a lot like spam. Usually, a message containing a lot of capital letters and ! and $ symbols will receivea high spam score from SpamAssassin. If something is not working properly, you should first check the mail logs in /var/ log/mail.log. If you don t recognize an error message that you find in there, trydoing a Web search. More often than not, you ll find a solution within afew search hits. You should also check that all of the daemons are running. Both configurationsrequire that spamd be running in the background. The sendmail configuration alsorequires that clamd, clamav-milter, and spamass-milter be running normally. NoteNote33_
If you are in need for cheap and reliable webhost to host your website, we recommend http web server services.
Posted in B5 | No Comments »
November 19th, 2007
629Chapter 24Running a Mail Server6.Configure maildrop to filter messages through SpamAssassin and ClamAV bychanging your /etc/maildroprcfile to look like this: # Global maildrop filter fileDEFAULT= $HOME/Maildir if ( $SIZE < 60000 ) { xfilter /usr/bin/spamc -f } xfilter /usr/local/sbin/clam-mailscan if (/^X-Spam-Flag: YES/ || /^X-Virus-Alert:/ ) { exception { to $DEFAULT/.Trash/ } } The line starting with DEFAULTtells maildropwhich location messages shouldbe stored to. This causes maildrop to save the messages to a directory namedMaildirunder the recipient s home directory (which is automatically substi- tuted for the $HOMEvariable by maildrop). The IMAP server is expecting tofind messages in this directory. The first ifblock filters messages that are less than 60,000 bytes throughspamc, and the line after that runs the message through the clam-mailscanprogram. The final ifblock checks for the presence of X-Spam-Flagand X-Virus-Alertheaders. If either of these headers are found, maildrop attempts to deliver themessage to a Trash folder located under the default folder. By enclosing thisstep within an exceptionblock, maildropis instructed to take the defaultaction instead of aborting delivery in the event that this step fails. This allowsyou to safely prevent mail sorting for an individual account by simply remov- ing its Trash folder. You can find more information about the features and syntax of the /etc/maildroprcfile by running man maildropfilterand man maildropex. 7.Create Maildirmail directories for every user already on the system. Thisstep needs to be performed for every user that is already on the system andneeds to be run as the user because executing it as root results in maildropbeing unable to write to the new directories: $ maildirmake.maildrop $HOME/Maildir$ maildirmake.maildrop -f Trash $HOME/Maildir8.Create mail directories under /etc/skel. The contents of /etc/skelwill becopied to the home directories of any new accounts: # maildirmake.maildrop /etc/skel/Maildir# maildirmake.maildrop -f Trash /etc/skel/MaildirNote33_
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.
Posted in B5 | No Comments »