Archive for April, 2006

Gentoo Notes

Right now I’m thinking about how to convert from selinux to regular linux.

Also, I’m wondering how to convert from 64 bit to 32 bit.

Are these tasks possible without a total rebuild?

It doesn’t look like this is possible. Probably not worth it anyway.

Amd64 runs fine on XEON processor, but I did run into a problem with ejabberd. The binary was looking for libncurses in /lib32/, but the only library my machine had was in /lib64/. So I compiled a 32bit version of ncurses, following this guide:

http://www.gentoo.org/proj/en/base/amd64/technotes/index.xml?part=1&chap=4

I essentially just downloaded the libnurses library from gnu.org and manually compiled the library with "-m32". The gentoo folks advise NEVER to use this flag with portage, or you could seriously screw things up. The only problem I ran into was this:

ldconfig: libraries libncurses.so.5.4 and libncurses.so.5.5 in directory /emul/linux/x86/lib have same soname but different type.

Which is output when I try to run ldconfig.

Follow-Up to Gentoo Notes

I no longer use Gentoo for our servers. We still have two that we support, but I’ve since switched to debian.

Nokia770 Motorola e815 and VerizonWireless

Tutorial and Howto Connect to the internet using the Nokia 770, Motorola e815, and Verizon Wireless
Actually, its pretty easy to connect the 770 to the e815, for connection to the internet via Verizon Wireless. Follow these steps to get going:

  1. Turn on dial up networking on the e815. Enter ##DIALUP into the phone quickly, you do not need to press send. If nothing happens, you must dial it faster. It will be easier to simply enter the numbers: ##342587. The phone will display a message saying that dial up networking has been enabled. You can enter the same command to turn it off, and then on.
  2. On the Nokia 770, open the Connection Manager tool.
  3. These next steps were what eluded me:
  4. From the drop down menu, select Tools - > Connectivity Settings.
  5. Click the Connections button.
  6. Click New.
  7. Give the connection a name ( I chose Verizon ) and select Packet Data, then click next.
  8. Then enter #777 as the phone number, and qnc s both the username and password. UPDATE - I just tried out the EVDO network, which you connect to using yourphonenumber@vzw3g.com as your username and vzw as your password, and it is incredibly fast. I need to confirm that they are not charging for this before regular use, but it is awesome, up to 400kbps! /UPDATE
  9. When you are finished, you should be able to connect via the phone.
  10. The phone should report that a call is being made.
  11. While Verizon does not charge for this, your minutes will get used, so don’t forget to disconnect!

Related links:
770 info:
http://www.internettablettalk.com/forums/showthread.php?p=10277
http://cell.uoregon.edu/verizon/data/setup.html

e815 Info:
http://www.v710.org/mark/
http://www.jasongilstrap.com/2005/11/motorola-e815
http://www.nuclearelephant.com/papers/v710info.html
http://howardforums.com/showthread.php?t=674803

Postfix Notes




Postfix Vacation Autoresponder Howto

Setting up courier-vacation:

1. Needs maildrop - emerge maildrop
1b.Need to edit master.cf - change /usr/local/bin/maildrop to /usr/bin/maildrop
1c.Add this to /etc/postfix/main.cf:

transport_maps = mysql:/etc/postfix/mysql-transport.cf
virtual_transport = $transport_maps
maildrop_destination_recipient_limit = 1

2. change transport in database to be maildrop: instead of virtual:
3. Edit /etc/maildrop/maildropmysql.cf
4. Install courier-maildrop plugin

5. Config courier-maildrop plugin
6. Edit /etc/maildroprc
7. Add .mailfilter to home directory:

if (/^X-Spam-Flag: *YES/)
{
    # log this spam mail
    log "SPAM date: $DATE, recipient: $RECIPIENT, sender: $SENDER -> /dev/null"
    to "/dev/null"
    # nothing more to do
    exit
}

`test -f vacation.msg && exit 1 || exit 0`
if ($RETURNCODE==1)
{
       {
       if (!/^List-Unsubscribe:.*/:h )
       {
               if (!/^X-Spam-Flag: YES/:h )
               {
                      #RESPOND="$MAILDIR/$USER.autorespond.msg"
                        RESPOND="vacation.msg"
                      RESPONDDB="$MAILDIR/$USER.autorespond.db"

                      # The following must be one contiguous line
                      cc "| mailbot -t $RESPOND -A 'From: $LOGNAME' -s 'Auto Response: from $LOGNAME' /usr/sbin/sendmail -t -f ''"
               }
       }
       }
}

Spamassassin:

Add to /etc/postfix/master.cf:

-o content_filter=spamassassin

Postfix related links:

http://gentoo-wiki.com/Maildrop_configuration#Autoreply

Virtual Mail Documentation

Got this error when setting up Gentoo Virtual Mail Server:


Apr 25 17:20:10 carlos3 postfix/qmgr[15440]: warning: premature end-of-input on private/virtual socket while reading input attribute name
Apr 25 17:20:10 carlos3 postfix/qmgr[15440]: warning: private/virtual socket: malformed response
Apr 25 17:20:10 carlos3 postfix/qmgr[15440]: warning: premature end-of-input on private/virtual socket while reading input attribute name
Apr 25 17:20:10 carlos3 postfix/qmgr[15440]: warning: private/virtual socket: malformed response
Apr 25 17:20:10 carlos3 postfix/qmgr[15440]: warning: transport virtual failure -- see a previous warning/fatal/panic logfile record for the problem description
Apr 25 17:20:10 carlos3 postfix/qmgr[15440]: warning: transport virtual failure -- see a previous warning/fatal/panic logfile record for the problem description
Apr 25 17:20:10 carlos3 postfix/master[15435]: warning: process /usr/lib/postfix/virtual pid 15466 exit status 1
Apr 25 17:20:10 carlos3 postfix/master[15435]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling
Apr 25 17:20:10 carlos3 postfix/master[15435]: warning: process /usr/lib/postfix/virtual pid 15466 exit status 1
Apr 25 17:20:10 carlos3 postfix/master[15435]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling

It was a permissions error on the virtual mail folder. The virtual transport can create folders for users and their maildirs, but not when the parent directory doesn’t give the vmail user write capability. It actually might need write capability for apache. Not sure….