Monday, September 30, 2013

Fedora 19 : Squirrelmail , procmail , dovecot , maildir



Install SquirrelMail


I'm assuming that SELinux is not enabled ; 

yum install squirrelmail
yum install mutt 
yum install dovecot
yum install procmail

We must create a procmailrc file 

/etc/procmailrc  




Restart Apache:

service httpd restart

Then configure SquirrelMail for COURIER IMAP

/usr/share/squirrelmail/config/conf.pl 

SquirrelMail Configuration : Read: config.php (1.4.0)

---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers


C   Turn color off

S   Save data
Q   Quit

Command >> 



D.  Set pre-defined settings for specific IMAP servers



SquirrelMail Configuration : Read: config.php

---------------------------------------------------------
While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don't work so
well with others.  If you select your IMAP server, this option will
set some pre-defined settings for that server.

Please note that you will still need to go through and make sure

everything is correct.  This does not change everything.  There are
only a few settings that this will change.

Please select your IMAP server:

    bincimap    = Binc IMAP server
    courier     = Courier IMAP server
    cyrus       = Cyrus IMAP server
    dovecot     = Dovecot Secure IMAP server
    exchange    = Microsoft Exchange IMAP server
    hmailserver = hMailServer
    macosx      = Mac OS X Mailserver
    mercury32   = Mercury/32
    uw          = University of Washington's IMAP server
    gmail       = IMAP access to Google mail (Gmail) accounts

    quit        = Do not change anything

Command >> 

courier



Without courier IMAP configurations in dovecot , new emails are stored in 

/var/spool/mail 
In this folder there is a single file for each user ; This scenario is for small servers with pop3 access ;

Configuring DOVECOT 

/etc/dovecot/conf.d/10-mail.conf


mail_location = maildir:%h/Maildir


Then , the test : 

echo "test" | mutt -s "eMaiL TesT" user@localhost

After this test , an email must enter in 

/home/user/Maildir ;

If the email arrives in 

/var/spool/mail/user 
then , the dovecot and procmailrc settings are not OK 
and must check 
/var/log/maillog 



Configuring PROCMAIL  


/etc/procmailrc 


SHELL=/bin/sh

MAILDIR="$HOME/Maildir/"
DEFAULT=$MAILDIR
VERBOSE=off
LOGFILE=$HOME/.procmail_`date "+%Y.%m.%d"`.log
FORMAIL=/usr/bin/formail
USER=root
DROPPRIVS=yes 
SENDMAIL=/usr/sbin/sendmail

~ ~ ~ 

If from localhost squirrelmail is OK and from another host can't be accessed , 
then we must check the firewall : 

firewall-cmd --state
- > running

systemctl stop firewalld.service

After the firewalld service has stopped , the webmail can be accessed from the network ! 

Fedora 18 : disable firewalld & install iptables


Saturday, September 28, 2013

Fedora yum install Chromium



Chromium web browser

Fedora does not include Chromium web browser in the official repository due to problems outlined in
Tom 'spot' Callaway, Manager of the Fedora Engineering team at Red Hat is working with Google to fix the problems in Chromium so that it can be made available in the official repository. He also maintains his own test packages of Chromium

Stable repository

To use this repo, download the repo file from from http://repos.fedorapeople.org/repos/spot/chromium-stable/fedora-chromium-stable.repo and drop it in /etc/yum.repos.d as root user or run the following command
sudo yum-config-manager --add-repo=http://repos.fedorapeople.org/repos/spot/chromium-stable/fedora-chromium-stable.repo
Use PackageKit or run the following command
sudo yum install chromium -y

Thursday, September 26, 2013

Monday, September 23, 2013

Fedora 19 MATE - emerald-themes , Desktop Cube Effects with compiz



Compiz effects doesn't work in Gnome Shell and Cinnamon desktops.


http://www.server-world.info/en/note?os=Fedora_19&p=x&f=3



yum -y groupinstall "Cinnamon Desktop"
echo "exec /usr/bin/gnome-session-cinnamon" >> ~/.xinitrc
startx

http://www.server-world.info/en/note?os=Fedora_19&p=x&f=4


yum -y groupinstall "MATE Desktop" 
echo "exec /usr/bin/mate-session" >> ~/.xinitrc
startx




http://www.zealfortechnology.com/2013/07/install-mate-desktop-compiz-fedora-19.html


sudo yum install compiz compiz-mate fusion-icon
sudo yum install compiz-plugins-main compiz-plugins-extra compiz-plugins-unsupported emerald-themes emerald-themes-extra
gsettings set org.mate.session.required-components windowmanager compiz-mate-emerald




http://www.makeuseof.com/tag/gnome-based-desktop-environments-explained-mate-vs-gnome-shell-vs-unity-vs-cinnamon/

MATE is the continuation of Gnome 2, so if you’ve used Gnome 2 (or are still using a very old distribution to keep it), then MATE will seem extremely familiar. There may be a few applications with different names (Nautilus is called Nemo in MATE), but otherwise everything should be the same. The use of GTK3 is minimal if at all, so you won’t be able to benefit from any of those advancements. But it’s a great desktop environment if you were completely happy with the way things were and just want continued bug fixes.


If you want to take advantage of the Gnome 3/GTK3 backbone without having to deal with Gnome Shell or Unity, then your best choice is Cinnamon. For a handful of people who still want to stay in the Gnome track and yet use the latest software, this may be their best choice. It lets people still use GTK3 themes as well as Gnome 3′s Control Center, but the desktop is very similar to that of Windows/KDE in that there is a single panel along the bottom of the screen, and a Start Menu-like button at the bottom left corner.
The Cinnamon project was created by the team behind Linux Mint, continuing their mission to fix what they believe are usability issues in Ubuntu. While Cinnamon is the default desktop environment for Linux Mint (with MATE available as well), both Cinnamon and MATE should be available for a large number of other distributions.


Thursday, September 5, 2013

FEDORA systemctl start rc-local



Auto running commands at boot




Create the rc.local file in the /etc/rc.d directory, 
and make sure the first line is #!/bin/sh


/etc/rc.d/rc.local file also can start at the top with:

#!/bin/bash

Then activate this service with something like:
# systemctl enable rc-local.service

Make the rc.local file executable
# chmod 700 /etc/rc.d/rc.local


If there's problems : 
cat /var/log/messages | grep rc.local 

/etc/rc.d/rc.local is the place for the commands but you have to ensure the
rc-local service is enabled and running.



[root@gate depit]# 
[root@gate depit]# service rc-local status
Redirecting to /bin/systemctl status  rc-local.service
rc-local.service - /etc/rc.d/rc.local Compatibility
   Loaded: loaded (/usr/lib/systemd/system/rc-local.service; static)
   Active: failed (Result: exit-code) since Wed 2013-11-27 23:22:57 EET; 42min ago
[root@gate depit]# 


/etc/rc.local does not get executed on sytem bootup
https://bugzilla.redhat.com/show_bug.cgi?id=843735
fedora systemd service "rc-local" ExecStart "code=exited" "status=7"


Description of problem:
/etc/rc.local is the script within whihc if any commands are found should get executed on bootup, but is not happening on Fedora 19

I am using Network-Manager. network daemon is switched off & ethernet interfaces are managed by NM only.

I think this will work for you if you do 'systemctl enable NetworkManager-wait-online.service'.

Getting Fedora 18, 19  to start the service can be done as root:
# systemctl start rc-local
# systemctl status rc-local

How to disable screen blanking on text console : 
if setterm command is put on rc.local , then it has no effect :
setterm -blank -0 
instead , add setterm -blank X (X in minutes, 0 to disable) to a shell init file like .bashrc.
after login , 
cat /sys/module/kernel/parameters/consoleblank 
returns 0 
http://unix.stackexchange.com/questions/8056/disable-screen-blanking-on-text-console
http://superuser.com/questions/152347/change-linux-console-screen-blanking-behavior


named chroot on Fedora 18



systemctl stop      named.service
systemctl disable named.service
systemctl enable  named-chroot.service
systemctl start     named-chroot.service



vsftpd selinux fedora 18


getsebool -a | grep ftp

ftp_home_dir --> off
ftpd_anon_write --> off
ftpd_connect_all_unreserved --> off
ftpd_connect_db --> off
ftpd_full_access --> off
ftpd_use_cifs --> off
ftpd_use_fusefs --> off
ftpd_use_nfs --> off
ftpd_use_passive_mode --> off
httpd_can_connect_ftp --> off
httpd_enable_ftp_server --> off
sftpd_anon_write --> off
sftpd_enable_homedirs --> off
sftpd_full_access --> off
sftpd_write_ssh_home --> off
tftp_anon_write --> off
tftp_home_dir --> off

 setsebool ftp_home_dir on


setsebool -P ftp_home_dir 1 
to make it permanent

getsebool -a | grep ftp
ftp_home_dir --> on
ftpd_anon_write --> off
ftpd_connect_all_unreserved --> off
ftpd_connect_db --> off
ftpd_full_access --> off
ftpd_use_cifs --> off
ftpd_use_fusefs --> off
ftpd_use_nfs --> off
ftpd_use_passive_mode --> off
httpd_can_connect_ftp --> off
httpd_enable_ftp_server --> off
sftpd_anon_write --> off
sftpd_enable_homedirs --> off
sftpd_full_access --> off
sftpd_write_ssh_home --> off
tftp_anon_write --> off
tftp_home_dir --> off


ERROR : 
500 OOPS: vsftpd: refusing to run with writable root inside chroot ()

SOLUTION : 
vi /etc/vsftpd.conf and add the following
allow_writeable_chroot=YES