advert

Tuesday, 27 December 2011

Rotate spamd log

FreeBSD spamd (APACHE) log rotation

Log spamd separately = add two lines in /etc/syslog.conf:

!spamd
daemon.err;daemon.warn;daemon.info      /var/log/spamd

Set rotation for logs (here is also APACHE) in /etc/newsyslog.conf

# pre apache                                            rotate every Sunday at 8 a.m.
/web/log/httpd-access.log               644  10    *    $W6D0 B    /var/run/httpd.pid 30
/web/log/httpd-error.log                644  10    *    $W6D0  B    /var/run/httpd.pid 30
# spamd logging
/var/log/spamd                          600  2     *     @T00  JC



enjoy

Thursday, 15 December 2011

Ubuntu Broadcom Dell mini9

My wifi card after upgrade from ubuntu-10.04-netbook edition died.
I spend few hours of many unsuccessful attempts to fix it but it is quicker to reinstall system and carefully pick up again what's going to be upgraded.

Just find this http://www.ubuntumini.com/2010/10/broadcom-wireless-driver-fix-in.html

In my experience mini9 likes ONLY STA Driver.

terminal :
sudo apt-get update
- to update your repositories and tell you system where to get the driver from.

sudo apt-get --reinstall install bcmwl-kernel-source
- to install the driver.

Reboot the machine. Check to see if the driver installed correctly. You can find Additional Drivers in System>Administration>Additional Drivers.

Ubuntu sound Dell mini9

After system upgrade from 10.04 present my Dell mini9 lost sound..

check sound:
# aplay /usr/share/sounds/alsa/Front_Center.wav

which sound card?
https://help.ubuntu.com/community/SoundTroubleshooting


Add repository:
https://wiki.ubuntu.com/Audio/InstallingLinuxAlsaDriverModules

Adding the ppa

sudo add-apt-repository ppa:ubuntu-audio-dev/ppa
sudo apt-get update

Stary app Synaptic Package Manager
and use linux-kernel backported snd-hda-intel

Tthat works for me !!

Tuesday, 16 August 2011

hide your mail

Sometimes it's a good idea also an easy way to hide your real mail account.
It's free and I like it!

http://tempalias.com/

Friday, 17 June 2011

cannot open 'ATURE(access_db,': No such file or directory

Introduction:

sendmail(8) is the default Mail Transfer Agent (MTA) in FreeBSD.

There is a number of processing options that may be set. In my case I’m using FreeBSD 8.2, sendmail 8.14 with few more options...

myhost.mc
I went trough SMTP Authentication guided by hanbook. It is good for a refresh memory but that is just little part of my configuration. A added a bit more lines for extending sendmail capabilities.

After that, I ran make; make install; make restart while in /etc/mail
Despite the fact that Sendmail did not complain it desn't start


Check: -- check sendmail capability
# sendmail -d0.1 -bv
Version 8.14.4
 Compiled with: DNSMAP LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8 MIME8TO7
                NAMED_BIND NETINET NETINET6 NETUNIX NEWDB NIS PIPELINING SASLv2
                SCANF STARTTLS TCPWRAPPERS USERDB XDEBUG
/etc/mail/sendmail.cf: line 2: invalid argument to V line: "ERSIONID(FreeBSD: s"
/etc/mail/sendmail.cf: line 6: fileclass: cannot open 'ATURE(access_db,': No such file or directory
/etc/mail/sendmail.cf: line 7: fileclass: cannot open 'ATURE(blacklist_recipients)': No such file or directory
/etc/mail/sendmail.cf: line 8: fileclass: cannot open 'ATURE(local_lmtp)': No such file or directory
/etc/mail/sendmail.cf: line 9: fileclass: cannot open 'ATURE(mailertable,': No such file or directory
/etc/mail/sendmail.cf: line 10: fileclass: cannot open 'ATURE(virtusertable,': No such file or directory
/etc/mail/sendmail.cf: line 12: fileclass: cannot open 'ATURE(greet_pause,': No such file or directory
/etc/mail/sendmail.cf: line 35: MAILER(local): A= argument required
/etc/mail/sendmail.cf: line 36: MAILER(smtp): A= argument required

============ SYSTEM IDENTITY (after readcf) ============
      (short domain name) $w = www.example.info
  (canonical domain name) $j = www.example.info
         (subdomain name) $m = ...info
              (node name) $k = www.example.info
========================================================
No local mailer defined
QueueDirectory (Q) option must be set

My .cf an .mc seems ok, so where could by problem?
Althought I googled that message, I have not seen solution.

Solution:
I did check every line for a missing characters like:
"." "}" ")" ";" "//"

then found the mistake: a missing bracket ")"
FEATURE(`greet_pause', `6000'

FEATURE(`greet_pause', `6000')

I ran make sequence successfully now.
# make; make install; make restart - while in /etc/mail
# sendmail -d0.1 -bv
Version 8.14.4
 Compiled with: DNSMAP LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8 MIME8TO7
                NAMED_BIND NETINET NETINET6 NETUNIX NEWDB NIS PIPELINING SASLv2
                SCANF STARTTLS TCPWRAPPERS USERDB XDEBUG

============ SYSTEM IDENTITY (after readcf) ============
      (short domain name) $w = www
  (canonical domain name) $j = www.example.info
         (subdomain name) $m = example.info
              (node name) $k = example
========================================================
Recipient names must be specified


PS: FEATURE(`greet_pause', `6000') Spammers are motivated to send their unsolicited emails as rapidly as possible. Wait 6sec before sending the SMTP greeting string wasting their time.


Added bit later:
Sendmail did not start anyway.
I reinstalled base version from ports.
Altered /etc/make.conf
SENDMAIL_MC=/etc/mail/smtp.mc
## SENDMAIL_CF_DIR==important after replaced base sendmail
SENDMAIL_CF_DIR= /usr/local/share/sendmail/cf
SENDMAIL_CFLAGS=-I/usr/local/include -DSASL=2
SENDMAIL_LDFLAGS=-L/usr/local/lib
SENDMAIL_LDADD=-lsasl2
# Adding to enable alternate port (smtps) for sendmail...
SENDMAIL_CFLAGS+= -D_FFR_SMTP_SSL



# sockstat -4 | grep 25
root     sendmail   50027 3  tcp4   *:25                  *:*

References:
sendmail, Fourth Edition
www.google.co.uk/bsd
www.yahoo.com

Tuesday, 19 April 2011

FreeBSD ping: sendto: Permission denied

Sometime we can forgot whatever we set-up at server and reboot after 5 months may bring very interesting situations.

One of them happened to me last time. Server stopped respond after restart. In hosting company were not able to help. They disabled many things in rc.conf, ran fsck on HDD. No another idea. BUT Nowadays we have nice things called KVM which bring terminal right to our desk.

Here is the problem:
# ping localhost
# ping: sendto: Permission denied

Interesting.
I moved from IPFW2 to PF few months ago and there were few restarts without problem.
So firstly I tried to stop firewall(s) with system scripts:
/etc/rc.d/ipfw stop
/etc/rc.d/pf stop

All seems be ok but wasn't help.
I did check MYKERNEL config and there were some KERNEL OPTIONS
eg:
options    IPFIREWALL

So this is mistake, remove unwanted options and recompile kernel.

While I waited I tried to play with IPFW.
# ipfw list
65535 deny ip from any to any

Solution:
Yes, it was clear now. I need just little simple thing -> allowing communication.
# ipfw add allow all from any to any
# ping 127.0.0.1
# ping myIP
# ping gateway
All ok

I recompiled kernel without IPFW and restarted.

It is running now :)

Tuesday, 5 April 2011

Joomla16 can't open file

Multilingual site usually keeping content under language shortcuts.
I mean for English  site/en/  ; for Thai site/th ; for Slovak site/sk...

Here is problem: When I moved Joomla16  to new server one language dissapeared.
English content was ok, but Slovak empty. No db only, part of Sk website.

at www1.thajsko.in.th/sk
it was white screen, long time really (1-2h)
I tried write a new article, a new setup and debug. After that nice alphabets:
"can't open file"

Better than nothing before, but Googling wasn't my friend.

Really strange, because other two servers with same Joomla16 database and data were ok.

Later I suspected some knobs in .htacces files.
YES


SOLVED::
.htaccess
##commented out next line if causes errors
# Options +FollowSymLinks


I still not finished setup other things, like ssl-certs, tarpid, mails so if I'll have problem to find some usefull sugestion on net with next problem, I will share again.

PS: Did you try OpenBSD? It is surprisingly good, thought sometime rigid.