Re: Mail server in that environment, possible ?

2007-06-24 Thread Timo Schoeler

thus Joachim Schipper spake:

On Sun, Jun 24, 2007 at 12:07:03AM +0100, Timo Schoeler wrote:

thus Firas Kraiem spake:

This is not really an OBSD-specific question but since the machine I
plan to do this on is running OBSD, I figured out I would post here,
please don't throw pointing objects at me ;)

So, here's the deal, I have a few machines behind a NAT gateway
(router/modem provided by my ISP) and I have a no-ip.org domain for
it - can't afford a real domain name at the moment. One of those is
an OpenBSD (4.1) system which I've been happily running an
Apache/PHP/MySQL and a FTP server on for a few months.

Now, what I would like to do, just for the fun and hopefully to learn
a few things in the process, is whether it would be possible to setup
a mail server on it so people can send me mail at [EMAIL PROTECTED],
and if so, I'd much appreciate if someone could point me to a few
nice tutorials to set this up - I've already googled for that and
tried a few howto's but without much success.



although this is not a typical topic for [EMAIL PROTECTED]


Well, it's called misc@ for a reason. It's also called misc@openbsd.org
for a reason, but this person uses OpenBSD, so why not?


Deep apologies from my side; however, the threshold of when a topic 
starts to be a valid one here fluctuates extremely. one day, a 
malfunctioning browser on a OBSD box is not a valid one, while on the 
other day someone mailing from the highway who run out of gas (but has 
OBSD running his home brew MP3 player) *is* a valid one...


first, you have to get yourself the skills to set up a MTA (mail 
transfer agent) such as sendmail (included in OpenBSD base system), or 
postfix (packages/ports), or exim...

IMHO, you should take 'the hard way' and learn sendmail


Everyone has his/her own preference here. There are no really wrong
choices, though. (At least not for simple setups.)


'IMHO'

second, you need a POP3 and/or IMAP4 server; there's a bunch of them 
(packages/ports, again) like dovecot, cyrus, etc. for me, cyrus works 
like a charm for many many years now


Again, no really wrong picks. Dovecot is secure, easy to configure, and
fast, but doesn't handle concurrent mailbox access very well, and you
might need/want some of the additional options of cyrus.

You can also do without an IMAP server if so inclined; particularly the
older *NIX mail clients will happily read their mail from a spool.
Especially if you prefer such a client, making sure the MTA is set up
properly before even trying to set up the IMAP server is a good idea.

Depending on tastes, you might also want to set up a webmail package. I
can recommend Hastymail for not sucking. (It's not particularly shiny or
full-featured, but it manages not to suck, at least to the extent that
webmail can not suck. Mutt still sucks less, though.)

third, you have to get some knowledge about the appropriate DNS entries 
(the MX entry for your domain, even when using DynIP services) you have 
to set. again, there's tutorials on the net.


Certainly. And note that this isn't going to work particularly well if
you switch IPs often (or at all).

The problem is that DNS updates take a while to reach every corner of
the internet (and very, very long to reach some broken MS-based setups).
If another user takes your IP address in the meanwhile, and that other
user also runs something on port 25, MTAs sending you mail will think
it's you. In almost all cases (those where no account has been
configured to collect all mail), the other mail server would permanently
reject mail to you, since there's no such user at that mail server. This
would cause random mail loss.


For this, one can use the mentioned VPS.

four, please take into account that sending from your own mail server 
being in a dynamically assigned IP range is a bad idea because most RBLs 
(realtime blackhole lists, used by other MTAs to check whether your MTA 
is likely to be a spammer or not, etc) list those IP ranges as very 
likely to be a spam source. so, if possible, use your ISPs mail server 
for relaying (as a 'smart host' in sendmail speak), or get yourself a 
machine at a rack hoster; there are decent priced 'virtual root servers' 
nowadays. (unfortunately, most of them are Linux machines; virtual root 
means that you're put into a container, or 'jail' like environment, 
where you are root and can set up that machine as you like; however, you 
don't have 'full control' over the hardware, but this is not needed 
anyways.)


The whole virtual private server thing has the added advantage of having
a fixed IP address, which solves the problem I described above.


Exactly.


Unless you want to go for a VPS or some such, I'd not recommend running
an MTA on port 25. It *is*, however, quite useful to set up fetchmail or
one of the alternatives to feed mail to a MTA, and use that MTA to
handle outgoing mail.


It's doable without those hassles just by defining the MTA as the 
primary MX which then is configured to relay 

Re: r/w on NTFS system

2007-06-24 Thread Pedro Martelletto
On Sun, Jun 24, 2007 at 04:26:18PM +0800, Alex Kwan wrote:
 Can I read and write on NTFS system under OpenBSD?

From 'man mount_ntfs':

Warning: do not mount NTFS filesystems read-write.  The write support is
not very useful and is not tested well.  It's not safe to write to any
file on NTFS; you might damage the filesystem.  Unless you want to debug
NTFS filesystem code, mount the NTFS filesystem read-only.

-p.



Re: r/w on NTFS system

2007-06-24 Thread Daniel Ouellet
Alex Kwan wrote:
 Hello,
 
 Can I read and write on NTFS system under OpenBSD?
 
 Alex

man 8 mount_ntfs



r/w on NTFS system

2007-06-24 Thread Alex Kwan
Hello,

Can I read and write on NTFS system under OpenBSD?

Alex



Usage question

2007-06-24 Thread Jared Solomon

Is anyone successfully using OpenBSD and mplayer or vlc with mediasite
to catch streaming lectures from a university campus or similar?

I had to get a Vista box, and I'm at wits' end with its B$.  Any
help or pointers to upgrade my Toshiba Satellite dual core box to
OpenBSD 4.1 and maintain my ability to continue in medical school is
appreciated.

Kind regards,

jared Solomon

--
Try to do nothing for money that you wouldn't do for free.  --Paul Krassner

BELIEVE IN YOURSELF, EAT ALL YOUR SCHOOL, STAY IN MILK, DRINK YOUR
TEETH, DON'T DO SLEEP, GET 8 HOURS OF INSANITY



Load Win $40,000

2007-06-24 Thread BMO Bank of Montreal
BMO Bank of Montreal

Register, Load  Win Contest

REGISTER your Mosaik MasterCard or your BMO Checking account today and
each time you LOAD it with $200 or more from your BMO checking/saving
account. youll be entered into a draw for a chance to WIN:

50,000 AIR MILES. reward miles and$40,000 Canadian into your BMO
account.

Contest Period: June 1, 2007 to August 31, 2007
Grand Prize: 50,000 AIR MILES reward miles and $40,000 Canadian into your
BMO account. Thats enough reward miles to redeem for some great rewards
including:

  * 4 all-inclusive, 7-night vacations from Toronto to Cozumel, OR

  * 7 round trip flights from Toronto to Paris, OR

  * 8 round trip flights from British Columbia to Miami, OR

  * 17 round trip flights from Calgary to Las Vegas

Register your Mosaik MasterCard or your BMO checking account.
BMO Online Account Registration : Mosaik MasterCard/BMO Checking Account
Registration

Mosaik MasterCard is a card like no other because you are like no other
customer. Customize your card with the rewards, interest rate plan,
protection and services you want while still getting the included
features you need.

Odds of winning depend on the number of entries received. Mathematical
skill-testing question must be correctly answered by the selected entrant
to win prize. No purchase necessary. The approximate retail value of the
AIR MILES reward miles prize depends on the chosen Reward and method of
redemption.



How to make screenshot under console ?

2007-06-24 Thread smonek
How to make screenshot under console ? without X11

On FreeBSD is :

vidcontrol -p  /dev/ttyv0  shot.scr

But OpenBSD haven't vidcontrol


I use OpenBSD 4.1



Re: How to make screenshot under console ?

2007-06-24 Thread Han Boetes
smonek wrote:
 How to make screenshot under console?

With screen you can make screenshot. They're called hardcopies.


# Han



Re: Usage question

2007-06-24 Thread Denny White

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Today Jared Solomon wrote:


Is anyone successfully using OpenBSD and mplayer or vlc with mediasite
to catch streaming lectures from a university campus or similar?

I had to get a Vista box, and I'm at wits' end with its B$.  Any
help or pointers to upgrade my Toshiba Satellite dual core box to
OpenBSD 4.1 and maintain my ability to continue in medical school is
appreciated.

Kind regards,

jared Solomon


If it's available to you as streaming content, read the following.
I love A Prairie Home Companion with Garrison Keillor  am rarely
home to listen to it on Saturday evenings. I run a script out of
cron that streams it in  dumps it to a file so I can listen later.
Below are the basics. You just need to find out the address of the
content you want  change it out with the ones below. If you don't
want to save it for later, just take out the -dumpstream  -dumpfile
stuff. e.g., mplayer mms://radio.mponline.org/MPB_Live would just
stream it in for you to watch.

mplayer -dumpstream mms://radio.mpbonline.org/MPB_Live -dumpfile 
/data/mydir/garrison/mp3/show/`date +%Y%m%d`phc.mp3


`date +%Y%m%d` prepends the current date to the phc.mp3 file
for later reference.

Try 'man mplayer'. It's a good read. ;)

Here are some more good reads:

For installing:
http://www.openbsd.org/faq/faq4.html

As for upgrading, try:
http://www.openbsd.org/faq/upgrade41.html

For checking supported hardware:
http://www.openbsd.org/i386.html

- --Denny White

___     ___
   / __/ _ \/ __/__  /
  _\ \/ // / _//___/ /
 /___//_/ /_/

[ 1987 - 2007 ]

  http://sdf.lonestar.org
 Public Access Unix System
===
GnuPG key  : 0x1644E79A  |  http://wwwkeys.nl.pgp.net
Fingerprint: D0A9 AD44 1F10 E09E 0E67  EC25 CB44 F2E5 1644 E79A
===
iD8DBQFGfq6cy0Ty5RZE55oRAhVgAKC/n/MSFUM8tqj0lc8Ec2tqhIkwtACeNuqR
PgffOb1PmKLTAnDkS8EneBY=
=LsSH
-END PGP SIGNATURE-



Re: How to make screenshot under console ?

2007-06-24 Thread Travers Buda
* Han Boetes [EMAIL PROTECTED] [2007-06-24 19:47:02]:

 smonek wrote:
  How to make screenshot under console?
 
 With screen you can make screenshot. They're called hardcopies.
 
 

You could also tip(1) into the box.

-- 
Travers Buda



OT: SIP termination alternative

2007-06-24 Thread Daniel Ouellet

Hi,

Anyone can recommend a good SIP termination provider, specially for 
International calls. Domestic US is also needed, but not as badly.


I am using Level(3) already and the connection speed is definitely not 
great all the time and Masergy works well, however to many failed 
connection is busy day. Many tries are needed in a very short of time to 
get a connection. The provider could also be based in Europe as well as 
long as they can work with US company and use SIP.


Feedback would be appreciated. This is for volume calls.

You can reply in private as well as I am not sure it's of interest for 
the list.


Thanks

Daniel



CVS repository problems

2007-06-24 Thread Emilio Perea
I just noticed that after a csup update from rt.fm xenocara is gone and
src is getting there.  Current df vs this morning's daily output:

2,4c2,4
 /dev/sd1j 9262808   4116710   468295847%/public/file/0
 /dev/sd1l 101182217607678515618%/usr/src
 /dev/sd1m 1035470  1052982646 0%/usr/xenocara
---
 /dev/sd1j 9262808   4116694   468297447%/public/file/0
 /dev/sd1l 101182267928028195271%/usr/src
 /dev/sd1m 103547049881448488451%/usr/xenocara

The main cvsweb seems to confirm the problem is not just in the mirror.



Re: How to make screenshot under console ?

2007-06-24 Thread Denny White

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Today smonek wrote:


How to make screenshot under console ? without X11

On FreeBSD is :

vidcontrol -p  /dev/ttyv0  shot.scr

But OpenBSD haven't vidcontrol

I use OpenBSD 4.1


For capturing text on the console, you can use 'script output.out'.
After everything that you want to capture has passed, hit ctrl-d
 it'll all be in the output file.

- --Denny White

___     ___
   / __/ _ \/ __/__  /
  _\ \/ // / _//___/ /
 /___//_/ /_/

[ 1987 - 2007 ]

  http://sdf.lonestar.org
 Public Access Unix System
===
GnuPG key  : 0x1644E79A  |  http://wwwkeys.nl.pgp.net
Fingerprint: D0A9 AD44 1F10 E09E 0E67  EC25 CB44 F2E5 1644 E79A
===
iD8DBQFGfrTVy0Ty5RZE55oRApdFAJ4+hhZRJfZsjo/7zNBFZu18+U7IagCePmCg
fDUJLkyy6r9rjz7hcU6ipyw=
=lRKQ
-END PGP SIGNATURE-



Re: pf syntax question

2007-06-24 Thread Aaron

Jose H. wrote:

Thanks, one more question, What is the difference between:

rdr on $ext_if proto tcp from any to $pubip - $privip
and
binat on $ext_if from $privip to any - $pubip

Do I need both ?

Thanks.

http://www.openbsd.org/faq/pf/nat.html#binat

tcp and udp ports are never modified with binat. 

rdr and nat are considered directional, rdr for incoming connections, 
nat for outgoing.  That said, either will work for you and you don't 
need both.  binat is handy if you have a bunch of public ip addresses 
and you want to distinctly map each public address to an internal 
address with no port mangling.



On 6/23/07, Ryan McBride [EMAIL PROTECTED] wrote:

On Sat, Jun 23, 2007 at 09:50:36PM -0600, Jose H. wrote:
 Can anybody tell me what is wrong with this rules ?

Is it source port or destination port? You're missing 'from any' or 'to
any' at least, and for a good security policy you should explicitly
specify source and/or destination IP addresses whenever possible.

Also, if this is 4.1 you don't need 'keep state' and 'flags S/SA',
they're on by default.

 pass on $ext_if inet proto tcp port $servicios_baseline_tcp flags S/SA
 keep state
 pass on $ext_if inet proto udp port $servicios_baseline_udp
 keep state
 pass on $ext_if inet proto icmp icmptype $servicios_baseline_icmp
 keep state






Aaron



nfe0 problem (obsd 4.1)

2007-06-24 Thread patrick keshishian

Hi,

I've been noticing some strange problems with the built-in nfe0
interface on my desktop.  Actually I've seen it on two such
computers, but the description below is for my current desktop PC.

The PC is running `cvs up -dP -rOPENBSD_4_1' built. I'm including
netstat, ifconfig output[1] and dmesg below[2].

I've noticed that once in a while the nfe0 interface will stop
sending and receiving data.  At this point I can not make it work
again.  The only solution I have is to reboot the box.  I have
installed a dc0 card in the box since.  The problem seemed
intermittent and not reliably reproducible.  But I think I found
a way to reproduce this problem on demand (at least for the time
being).  I have an ssh session to another box, on which I run
'/usr/bin/nm somelib.so'.  After a page or two of output the
terminal hangs.  At this point nfe0 becomes unresponsive.

I switch to the dc0 interface and the terminal finishes the output.
Running the nm command while using the dc0 interface doesn't cause
any problems.

Interestingly enough, if I redirect the output of nm to a file
and subsequently cat the file the nfe0 interface doesn't seem
to exhibit the same problem.

I am not sure how to diagnose this problem further.  I've enabled
debug on the nfe0 interface (/sbin/ifconfig nfe0 debug), but don't
see any output.

Any and all suggestions are welcome.
--patrick

[1] netstat and ifconfig outputs:
$ /usr/bin/netstat -in
NameMtu   Network Address  Ipkts IerrsOpkts Oerrs Colls
lo0 33224 Link   1 01 0 0
lo0 33224 127/8   127.0.0.11 01 0 0
lo0 33224 ::1/128 ::1  1 01 0 0
lo0 33224 fe80::%lo0/ fe80::1%lo0  1 01 0 0
dc0 1500  Link  00:02:e3:07:cc:df 1713 0  424 7 0
dc0 1500  fe80::%dc0/ fe80::202:e3ff:fe 1713 0  424 7 0
nfe01500  Link  00:16:e6:82:17:da 1520   613  878 0 0
nfe01500  fe80::%nfe0 fe80::216:e6ff:fe 1520   613  878 0 0
nfe01500  xx.yy.ww.zz xx.yy.ww.zz2  1520   613  878 0 0
pflog0  33224 Link   0 00 0 0
enc0*   1536  Link   0 00 0 0

$ /usr/bin/netstat -rnfinet
Routing tables

Internet:
DestinationGatewayFlagsRefs  UseMtu  Interface
defaultxx.yy.ww.zz9   UGS 00  -   nfe0
xx.yy.ww.zz8/28link#2 UC  40  -   nfe0
xx.yy.ww.zz9   00:20:6f:03:a2:e5  UHLc10  -   nfe0
xx.yy.ww.zz1   link#2 UHLc02  -   nfe0
xx.yy.ww.zz3   00:01:02:c2:a1:b9  UHLc1  159  -   nfe0
xx.yy.ww.zz0   00:20:e0:68:5d:c8  UHLc1   11  - L nfe0
127/8  127.0.0.1  UGRS00  33224   lo0
127.0.0.1  127.0.0.1  UH  10  33224   lo0
224/4  127.0.0.1  URS 00  33224   lo0


$ /sbin/ifconfig
lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 33224
   groups: lo
   inet 127.0.0.1 netmask 0xff00
   inet6 ::1 prefixlen 128
   inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
dc0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
   lladdr 00:02:e3:07:cc:df
   media: Ethernet autoselect (none)
   status: no carrier
   inet6 fe80::202:e3ff:fe07:ccdf%dc0 prefixlen 64 scopeid 0x1
nfe0: flags=8847UP,BROADCAST,DEBUG,RUNNING,SIMPLEX,MULTICAST mtu 1500
   lladdr 00:16:e6:82:17:da
   groups: egress
   media: Ethernet autoselect (100baseTX full-duplex)
   status: active
   inet6 fe80::216:e6ff:fe82:17da%nfe0 prefixlen 64 scopeid 0x2
   inet xx.yy.ww.zz2 netmask 0xfff0 broadcast xx.yy.ww.zz3
pflog0: flags=141UP,RUNNING,PROMISC mtu 33224
enc0: flags=0 mtu 1536



[2] dmesg
OpenBSD 4.1-stable (GENERIC) #0: Mon May 28 18:06:28 PDT 2007
   [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: AMD Athlon(tm) 64 Processor 3200+ (AuthenticAMD 686-class, 512KB L2 cach
e) 2.02 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CF
LUSH,MMX,FXSR,SSE,SSE2,SSE3
cpu0: AMD erratum 89 present, BIOS upgrade may be required
real mem  = 536375296 (523804K)
avail mem = 481710080 (470420K)
using 4278 buffers containing 26943488 bytes (26312K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+ BIOS, date 05/11/06, BIOS32 rev. 0 @ 0xfb5f0, SMBIOS
rev. 2.3 @ 0xf0100 (43 entries)
bios0: Gigabyte Technology Co., Ltd. GA-K8N-SLi / GA-K8N-SLi-RH
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
apm0: flags 70102 dobusy 1 doidle 1
pcibios0 at bios0: rev 3.0 @ 0xf/0xdd64
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdc00/352 (20 entries)
pcibios0: PCI 

Re: r/w on NTFS system

2007-06-24 Thread Denny White

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Today Alex Kwan wrote:


Hello,

Can I read and write on NTFS system under OpenBSD?

Alex


I mount some nfs shares off my xp box here and copy files to
it without mishap. However, that's just me, I've read the
other replies to your message  you might want to heed the
warnings. Actually, it's probably a lot safer to just scp the
files there. I do that too on a regular basis,  do rsync backups
to the external storage on the xp box nightly using rsa public
keys so it can be done unattended, i.e., passwordless. I have 
cygwin  m$ tools for unix admin installed on the xp box with

sshd running. There may be a simpler way to do that, but I don't
know. I did like that in the beginning when I was first learning
about intercommunication between the 2 operating systems, it
worked,  I left it alone. ;)

- --Denny White

___     ___
   / __/ _ \/ __/__  /
  _\ \/ // / _//___/ /
 /___//_/ /_/

[ 1987 - 2007 ]

  http://sdf.lonestar.org
 Public Access Unix System
===
GnuPG key  : 0x1644E79A  |  http://wwwkeys.nl.pgp.net
Fingerprint: D0A9 AD44 1F10 E09E 0E67  EC25 CB44 F2E5 1644 E79A
===
iD8DBQFGfrnjy0Ty5RZE55oRAg4ZAKCHjzpALnpRMqmpo0OgQm3emhaZRwCfdbAg
AI3FPeMT75vT4YhBQomJpqw=
=pa1i
-END PGP SIGNATURE-



Re: nfe0 problem (obsd 4.1)

2007-06-24 Thread Jason McIntyre
On Sun, Jun 24, 2007 at 11:50:28AM -0700, patrick keshishian wrote:
 Hi,
 
 I've been noticing some strange problems with the built-in nfe0
 interface on my desktop.  Actually I've seen it on two such
 computers, but the description below is for my current desktop PC.
 
 The PC is running `cvs up -dP -rOPENBSD_4_1' built. I'm including
 netstat, ifconfig output[1] and dmesg below[2].
 
 I've noticed that once in a while the nfe0 interface will stop
 sending and receiving data.  At this point I can not make it work
 again.  The only solution I have is to reboot the box.  I have
 installed a dc0 card in the box since.  The problem seemed
 intermittent and not reliably reproducible.  But I think I found
 a way to reproduce this problem on demand (at least for the time
 being).  I have an ssh session to another box, on which I run
 '/usr/bin/nm somelib.so'.  After a page or two of output the
 terminal hangs.  At this point nfe0 becomes unresponsive.
 

i used to see these hangs fairly often when doing a cvs up in
/usr/src. for some reason i have not seen them for an age. i am unable
to hang this box using your method, for example.

nfe(4) is not great. i think CAVEATS says it all. buyer beware ;(

jmc



carp + mysql replication: failover

2007-06-24 Thread Jacob Yocom-Piatt
have two machines that are carped and have mysql databases on them. one 
machine is the mysql master and the other a slave that replicates the 
master. this keeps things ready for what i've just experienced: mysql 
master machine goes down. now that a master failure has occurred, i am 
not certain of the best path for bringing the master back online so that 
it's synced with the slave.


to bring the master back online correctly i see the following as an 
obvious, but laborious, path: (1) restart master and increase advskew on 
the carp interface so the slave stays MASTER (2) edit config files and 
restart mysql on both machines so that the slave is now the master and 
vice versa for the original master (3) initiate slave replication onto 
the original master (4 - optional) decrease advskew on the original 
master machine so that it takes over (5 - optional)  restart mysql on 
both machines, swapping the master and slave configs. the optional steps 
are only if restoring the original master as master is desired.


if there is another way to do what i've described above that doesn't 
involve downtime for mysql or is more easily automated, please advise.


cheers,
jake



Re: nfe0 problem (obsd 4.1)

2007-06-24 Thread Srebrenko Sehic

On 6/24/07, patrick keshishian [EMAIL PROTECTED] wrote:

Hi,

I've been noticing some strange problems with the built-in nfe0
interface on my desktop.  Actually I've seen it on two such
computers, but the description below is for my current desktop PC.

The PC is running `cvs up -dP -rOPENBSD_4_1' built. I'm including
netstat, ifconfig output[1] and dmesg below[2].

I've noticed that once in a while the nfe0 interface will stop
sending and receiving data.  At this point I can not make it work
again.  The only solution I have is to reboot the box.  I have
installed a dc0 card in the box since.  The problem seemed
intermittent and not reliably reproducible.  But I think I found
a way to reproduce this problem on demand (at least for the time
being).  I have an ssh session to another box, on which I run
'/usr/bin/nm somelib.so'.  After a page or two of output the
terminal hangs.  At this point nfe0 becomes unresponsive.


This is a known problem, but probably unfixable due to lack of
documentation from nvidia.
See http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yesnumbers=5108



LC_COLLATE and PostgreSQL

2007-06-24 Thread bsd_news
Hi

I like OpenBSD very much but:

I have not proper sorts in my PostgreSQL 8.1 database on my OpenBSD 4.0

server.

I had set in /etc/profile the LC_COLLATE to pl_PL.ISO8859-2.

The PostgreSQL cluster was created by command:

initdb --locale=pl_PL.ISO8859-2 -E LATIN2 --lc-messages=C --lc-monetary=C

--lc-numeric=C --lc-time=C -D /var/postgresql/data.



I do not know is there possibility to fix this problem - maybe OpenBSD now

support only C and POSIX collation ?



Thanks for every help,

best regards,

Artur



ps. sorry for my poor English



Slow X on Thinkpad T60

2007-06-24 Thread Timo Myyrä
Just installed OpenBDS-current on my Thinkpad T60 which has the ATI 
Mobility radeon X1400 graphics card. The card isn't supported by the 
open-source drivers so I'm pretty much stuck with the 'vesa' driver. 
Problem is that the X is terrible slow to react. For example it doesn't 
even display these letters as fast as I type them not mentioning the 
opening of new window.

Is there a way to get more speed to my X?

Timo



Re: nfe0 problem (obsd 4.1)

2007-06-24 Thread Shane Harbour
I have one of the older Sun Ultra 20 systems that also has an nfe(4) in 
it.  It does the same thing everytime I try to cvs or put a load on the 
interface.  Only way around it was to install a second NIC.  Like 
someone else mentioned before, until more documentation is available, 
probably won't get any better.  Until then it won't bother me to run a 
second NIC.


Regards,
Shane

patrick keshishian wrote:

Hi,

I've been noticing some strange problems with the built-in nfe0
interface on my desktop.  Actually I've seen it on two such
computers, but the description below is for my current desktop PC.

The PC is running `cvs up -dP -rOPENBSD_4_1' built. I'm including
netstat, ifconfig output[1] and dmesg below[2].

I've noticed that once in a while the nfe0 interface will stop
sending and receiving data.  At this point I can not make it work
again.  The only solution I have is to reboot the box.  I have
installed a dc0 card in the box since.  The problem seemed
intermittent and not reliably reproducible.  But I think I found
a way to reproduce this problem on demand (at least for the time
being).  I have an ssh session to another box, on which I run
'/usr/bin/nm somelib.so'.  After a page or two of output the
terminal hangs.  At this point nfe0 becomes unresponsive.

I switch to the dc0 interface and the terminal finishes the output.
Running the nm command while using the dc0 interface doesn't cause
any problems.

Interestingly enough, if I redirect the output of nm to a file
and subsequently cat the file the nfe0 interface doesn't seem
to exhibit the same problem.

I am not sure how to diagnose this problem further.  I've enabled
debug on the nfe0 interface (/sbin/ifconfig nfe0 debug), but don't
see any output.

Any and all suggestions are welcome.
--patrick

[1] netstat and ifconfig outputs:
$ /usr/bin/netstat -in
NameMtu   Network Address  Ipkts IerrsOpkts 
Oerrs Colls
lo0 33224 Link   1 0
1 0 0
lo0 33224 127/8   127.0.0.11 0
1 0 0
lo0 33224 ::1/128 ::1  1 0
1 0 0
lo0 33224 fe80::%lo0/ fe80::1%lo0  1 0
1 0 0
dc0 1500  Link  00:02:e3:07:cc:df 1713 0  
424 7 0
dc0 1500  fe80::%dc0/ fe80::202:e3ff:fe 1713 0  
424 7 0
nfe01500  Link  00:16:e6:82:17:da 1520   613  
878 0 0
nfe01500  fe80::%nfe0 fe80::216:e6ff:fe 1520   613  
878 0 0
nfe01500  xx.yy.ww.zz xx.yy.ww.zz2  1520   613  
878 0 0
pflog0  33224 Link   0 0
0 0 0
enc0*   1536  Link   0 0
0 0 0


$ /usr/bin/netstat -rnfinet
Routing tables

Internet:
DestinationGatewayFlagsRefs  UseMtu  
Interface
defaultxx.yy.ww.zz9   UGS 00  -   
nfe0
xx.yy.ww.zz8/28link#2 UC  40  -   
nfe0
xx.yy.ww.zz9   00:20:6f:03:a2:e5  UHLc10  -   
nfe0
xx.yy.ww.zz1   link#2 UHLc02  -   
nfe0
xx.yy.ww.zz3   00:01:02:c2:a1:b9  UHLc1  159  -   
nfe0
xx.yy.ww.zz0   00:20:e0:68:5d:c8  UHLc1   11  - L 
nfe0

127/8  127.0.0.1  UGRS00  33224   lo0
127.0.0.1  127.0.0.1  UH  10  33224   lo0
224/4  127.0.0.1  URS 00  33224   lo0


$ /sbin/ifconfig
lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 33224
   groups: lo
   inet 127.0.0.1 netmask 0xff00
   inet6 ::1 prefixlen 128
   inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
dc0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
   lladdr 00:02:e3:07:cc:df
   media: Ethernet autoselect (none)
   status: no carrier
   inet6 fe80::202:e3ff:fe07:ccdf%dc0 prefixlen 64 scopeid 0x1
nfe0: flags=8847UP,BROADCAST,DEBUG,RUNNING,SIMPLEX,MULTICAST mtu 1500
   lladdr 00:16:e6:82:17:da
   groups: egress
   media: Ethernet autoselect (100baseTX full-duplex)
   status: active
   inet6 fe80::216:e6ff:fe82:17da%nfe0 prefixlen 64 scopeid 0x2
   inet xx.yy.ww.zz2 netmask 0xfff0 broadcast xx.yy.ww.zz3
pflog0: flags=141UP,RUNNING,PROMISC mtu 33224
enc0: flags=0 mtu 1536



[2] dmesg
OpenBSD 4.1-stable (GENERIC) #0: Mon May 28 18:06:28 PDT 2007
   [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: AMD Athlon(tm) 64 Processor 3200+ (AuthenticAMD 686-class, 
512KB L2 cach

e) 2.02 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CF 


LUSH,MMX,FXSR,SSE,SSE2,SSE3
cpu0: AMD erratum 89 present, BIOS upgrade may be required
real mem  = 536375296 (523804K)
avail mem = 481710080 (470420K)
using 4278 buffers containing 26943488 bytes (26312K) of 

Is it possible that load average off by 1 on Sun V100 X1?

2007-06-24 Thread Your Support Team!
I am not sure how to proof this, or to verify for sure, however, doesn't 
matter what version of OpenBSD I install, or 3.3 up to 4.1


Nothing running and plain install I always get a load average in top, or 
uptimne to be ~1.15 +/- on either Sun V100 or X1. However, I get ~0.07 
on V120 and T1.


Doesn't look like it's a specific processor issue, but I don't know really.

X1 off by 1:
hw.model=SUNW,UltraSPARC-IIe @ 500 MHz, version 0 FPU

V100 off by 1:
hw.model=SUNW,UltraSPARC-IIe (rev 3.3) @ 548 MHz, version 0 FPU

V120 OK:
hw.model=SUNW,UltraSPARC-IIe (rev 3.3) @ 648 MHz, version 0 FPU

T1 OK:
hw.model=SUNW,UltraSPARC-IIi @ 440.039 MHz, version 0 FPU

is there a way to see that for sure somehow? Or isolate this more closely?

I have multiple one of each and they all give the same results.

Is it possible that somehow the representation always add 1 in these cases?

Not a big deal, but always wonder where that can possible comes from and 
why. Obviously it's been there for many years, so not that of a big deal.


Best,

Daniel



Re: LC_COLLATE and PostgreSQL

2007-06-24 Thread Ben Calvert

On Jun 24, 2007, at 1:41 PM, bsd_news wrote:


Hi
I like OpenBSD very much but:
I have not proper sorts in my PostgreSQL 8.1 database on my OpenBSD  
4.0

server.
I had set in /etc/profile the LC_COLLATE to pl_PL.ISO8859-2.
The PostgreSQL cluster was created by command:
initdb --locale=pl_PL.ISO8859-2 -E LATIN2 --lc-messages=C --lc- 
monetary=C

--lc-numeric=C --lc-time=C -D /var/postgresql/data.

I do not know is there possibility to fix this problem - maybe  
OpenBSD now

support only C and POSIX collation ?


If i understand you correctly, you're having trouble with how  
Postgresql colates, not OpenBSD.  you should consult the Postgresql  
docs, starting with


http://www.postgresql.org/docs/8.1/static/charset.html#AEN22133




Thanks for every help,
best regards,
Artur

ps. sorry for my poor English



Ben



Re: nfe0 problem (obsd 4.1)

2007-06-24 Thread Vijay Sankar
On Sunday 24 June 2007 13:50, patrick keshishian wrote:
 Hi,

 I've been noticing some strange problems with the built-in nfe0
 interface on my desktop.  Actually I've seen it on two such
 computers, but the description below is for my current desktop PC.

 The PC is running `cvs up -dP -rOPENBSD_4_1' built. I'm including
 netstat, ifconfig output[1] and dmesg below[2].

 I've noticed that once in a while the nfe0 interface will stop
 sending and receiving data.  At this point I can not make it work
 again.  The only solution I have is to reboot the box.  I have
 installed a dc0 card in the box since.  The problem seemed
 intermittent and not reliably reproducible.  But I think I found
 a way to reproduce this problem on demand (at least for the time
 being).  I have an ssh session to another box, on which I run
 '/usr/bin/nm somelib.so'.  After a page or two of output the
 terminal hangs.  At this point nfe0 becomes unresponsive.

 I switch to the dc0 interface and the terminal finishes the output.
 Running the nm command while using the dc0 interface doesn't cause
 any problems.

I experienced similar problems last year and can empathize. 

The following items improved my situation somewhat:

1) BIOS upgrade
2) Removing dual boot (I had both OpenBSD and Windows 2003 on one 
machine. There were more errors if I did not power off after shutting 
down Windows 2003 and just did a restart from within Windows. If I did 
not unplug the machine after shutting down Windows, most of the time I 
saw watchdog timeouts but if I powered off the host, and then powered 
it back on, there were fewer errors)

I experimented with different combinations and different switches 
(10/100/1000, 10/100, and 10-Base-T). When all the hosts connected to a 
10/100 switch were running at 100 MB/s then changing nfe0 from 
autoselect to full-duplex using 

ifconfig nfe0 media 100baseTX mediaopt full-duplex  

seemed to eliminate nfe0 hangs as well as timeouts completely. I am not 
sure whether this has any rational basis or is specific to some weird 
situation in my network, but that has been my experience.

Vijay



 Interestingly enough, if I redirect the output of nm to a file
 and subsequently cat the file the nfe0 interface doesn't seem
 to exhibit the same problem.

 I am not sure how to diagnose this problem further.  I've enabled
 debug on the nfe0 interface (/sbin/ifconfig nfe0 debug), but don't
 see any output.

 Any and all suggestions are welcome.
 --patrick

 [1] netstat and ifconfig outputs:
 $ /usr/bin/netstat -in
 NameMtu   Network Address  Ipkts IerrsOpkts
 Oerrs Colls lo0 33224 Link   1
 01 0 0 lo0 33224 127/8   127.0.0.1   
 1 01 0 0 lo0 33224 ::1/128 ::1   
   1 01 0 0 lo0 33224 fe80::%lo0/
 fe80::1%lo0  1 01 0 0 dc0 1500 
 Link  00:02:e3:07:cc:df 1713 0  424 7 0 dc0
 1500  fe80::%dc0/ fe80::202:e3ff:fe 1713 0  424 7
 0 nfe01500  Link  00:16:e6:82:17:da 1520   613 
 878 0 0 nfe01500  fe80::%nfe0 fe80::216:e6ff:fe 1520 
  613  878 0 0 nfe01500  xx.yy.ww.zz xx.yy.ww.zz2 
 1520   613  878 0 0 pflog0  33224 Link 
  0 00 0 0 enc0*   1536  Link   
0 00 0 0

 $ /usr/bin/netstat -rnfinet
 Routing tables

 Internet:
 DestinationGatewayFlagsRefs  UseMtu 
 Interface defaultxx.yy.ww.zz9   UGS 0   
 0  -   nfe0 xx.yy.ww.zz8/28link#2 UC  4  
  0  -   nfe0 xx.yy.ww.zz9   00:20:6f:03:a2:e5  UHLc  
  10  -   nfe0 xx.yy.ww.zz1   link#2 UHLc 
   02  -   nfe0 xx.yy.ww.zz3   00:01:02:c2:a1:b9 
 UHLc1  159  -   nfe0 xx.yy.ww.zz0  
 00:20:e0:68:5d:c8  UHLc1   11  - L nfe0 127/8
  127.0.0.1  UGRS00  33224   lo0 127.0.0.1
  127.0.0.1  UH  10  33224   lo0 224/4
  127.0.0.1  URS 00  33224   lo0


 $ /sbin/ifconfig
 lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 33224
 groups: lo
 inet 127.0.0.1 netmask 0xff00
 inet6 ::1 prefixlen 128
 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
 dc0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
 lladdr 00:02:e3:07:cc:df
 media: Ethernet autoselect (none)
 status: no carrier
 inet6 fe80::202:e3ff:fe07:ccdf%dc0 prefixlen 64 scopeid 0x1
 nfe0: flags=8847UP,BROADCAST,DEBUG,RUNNING,SIMPLEX,MULTICAST mtu
 1500 lladdr 00:16:e6:82:17:da
 groups: egress
 media: Ethernet autoselect (100baseTX full-duplex)
 status: active
   

Re: LC_COLLATE and PostgreSQL

2007-06-24 Thread Philip Guenther

On 6/24/07, bsd_news [EMAIL PROTECTED] wrote:
...

I have not proper sorts in my PostgreSQL 8.1 database on my OpenBSD 4.0
server.

I had set in /etc/profile the LC_COLLATE to pl_PL.ISO8859-2.

...

I do not know is there possibility to fix this problem - maybe OpenBSD now
support only C and POSIX collation ?


Your guess is correct: OpenBSD only supports the default locale, C.
To quote the source for the strcoll() function:

int
strcoll(const char *s1, const char *s2)
{
   /* LC_COLLATE is unimplemented, hence always C */
   return (strcmp(s1, s2));
}



ps. sorry for my poor English


Seemed fine to me: I had no problem understanding what you were doing
and what wasn't working as you expected.  Indeed, you provided better
information than some native speakers posting queries here.


Philip Guenther



Re: Mail server in that environment, possible ?

2007-06-24 Thread Byron Hale

I initially deleted this as spam, without opening it.
That because the subject reads like a spam subject.

Byron Hale

Firas Kraiem wrote:

Greetings, people :)

This is not really an OBSD-specific question but since the machine I plan to
do this on is running OBSD, I figured out I would post here, please don't
throw pointing objects at me ;)

So, here's the deal, I have a few machines behind a NAT gateway (router/modem
provided by my ISP) and I have a no-ip.org domain for it - can't afford
a real domain name at the moment. One of those is an OpenBSD (4.1) system
which I've been happily running an Apache/PHP/MySQL and a FTP server on for a
few months.

Now, what I would like to do, just for the fun and hopefully to learn a few
things in the process, is whether it would be possible to setup a mail server
on it so people can send me mail at [EMAIL PROTECTED], and if so, I'd much
appreciate if someone could point me to a few nice tutorials to set this up -
I've already googled for that and tried a few howto's but without much
success.

Firas


--
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[demime 1.01d removed an attachment of type application/pgp-signature which had 
a name of signature.asc ]




Re: cannot enable executable stack...

2007-06-24 Thread Matthew Szudzik
 As it turns out, this bug in compat_linux was encountered in NetBSD in 
 2005 and then fixed.  The NetBSD patches are

I have successfully ported the relevant material from the NetBSD patches

 
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/compat/linux/common/linux_misc.c.diff?r1=1.140r2=1.141
 
 
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/compat/linux/common/linux_mmap.h.diff?r1=1.16r2=1.17
 
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/compat/linux/arch/i386/syscalls.master.diff?r1=1.61r2=1.62

to OpenBSD.  The OpenBSD patch is given at the end of this message.  Be 
sure to run the make file at

 /usr/src/sys/compat/linux/

after applying the patch.  The make file will update some important files.

This patch allows OpenBSD to use the PROT_GROWSUP and PROT_GROWSDOWN flags 
to mprotect under Linux emulation.  I have tested this new functionality 
with the Linux version of the Mathematica 6.0 Kernel, which now runs 
successfully.  Presumably, OpenBSD will also be able to run other Linux 
applications that use these flags, such as Adobe Acrobat Reader (for which 
the NetBSD patches were originally intended).

What steps need to be taken to ensure that this fix is merged into the 
official OpenBSD source code?


*** /usr/src/sys/compat/linux/linux_misc.c.orig Wed Feb 14 18:07:51 2007
--- /usr/src/sys/compat/linux/linux_misc.c  Mon Jun 25 00:13:42 2007
***
*** 718,723 
--- 718,787 
  
  }
  
+ int
+ linux_sys_mprotect(p, v, retval)
+   struct proc *p;
+   void *v;
+   register_t *retval;
+ {
+   struct linux_sys_mprotect_args /* {
+   syscallarg(const void *) start;
+   syscallarg(unsigned long) len;
+   syscallarg(int) prot;
+   } */ *uap = v;
+   struct vm_map_entry *entry;
+   struct vm_map *map;
+   vaddr_t end, start, len, stacklim;
+   int prot, grows;
+ 
+   start = (vaddr_t)SCARG(uap, start);
+   len = round_page(SCARG(uap, len));
+   prot = SCARG(uap, prot);
+   grows = prot  (LINUX_PROT_GROWSDOWN | LINUX_PROT_GROWSUP);
+   prot = ~grows;
+   end = start + len;
+ 
+   if (start  PAGE_MASK)
+   return EINVAL;
+   if (end  start)
+   return EINVAL;
+   if (end == start)
+   return 0;
+ 
+   if (prot  ~(PROT_READ | PROT_WRITE | PROT_EXEC))
+   return EINVAL;
+   if (grows == (LINUX_PROT_GROWSDOWN | LINUX_PROT_GROWSUP))
+   return EINVAL;
+ 
+   map = p-p_vmspace-vm_map;
+   vm_map_lock(map);
+   if (!uvm_map_lookup_entry(map, start, entry) || entry-start  start) {
+   vm_map_unlock(map);
+   return ENOMEM;
+   }
+ 
+   /*
+* Approximate the behaviour of PROT_GROWS{DOWN,UP}.
+*/
+ 
+   stacklim = (vaddr_t)p-p_limit-pl_rlimit[RLIMIT_STACK].rlim_cur;
+   if (grows  LINUX_PROT_GROWSDOWN) {
+   if (USRSTACK - stacklim = start  start  USRSTACK) {
+   start = USRSTACK - stacklim;
+   } else {
+   start = entry-start;
+   }
+   } else if (grows  LINUX_PROT_GROWSUP) {
+   if (USRSTACK = end  end  USRSTACK + stacklim) {
+   end = USRSTACK + stacklim;
+   } else {
+   end = entry-end;
+   }
+   }
+   vm_map_unlock(map);
+   return uvm_map_protect(map, start, end, prot, FALSE);
+ }
+ 
  /*
   * This code is partly stolen from src/lib/libc/gen/times.c
   * XXX - CLK_TCK isn't declared in /sys, just in time.h, done here
*** /usr/src/sys/compat/linux/linux_mmap.h.orig Wed Apr 17 05:23:56 1996
--- /usr/src/sys/compat/linux/linux_mmap.h  Mon Jun 25 00:13:42 2007
***
*** 38,43 
--- 38,45 
  #define LINUX_PROT_READ   0x01
  #define LINUX_PROT_WRITE  0x02
  #define LINUX_PROT_EXEC   0x04
+ #define LINUX_PROT_GROWSDOWN  0x0100
+ #define LINUX_PROT_GROWSUP0x0200
  
  #define LINUX_MAP_SHARED  0x0001
  #define LINUX_MAP_PRIVATE 0x0002
*** /usr/src/sys/compat/linux/syscalls.master.orig  Wed Oct 27 13:23:38 2004
--- /usr/src/sys/compat/linux/syscalls.master   Mon Jun 25 00:13:42 2007
***
*** 223,229 
  123   STD { int linux_sys_modify_ldt(void); }
  #endif
  124   STD { int linux_sys_adjtimex(void); }
! 125   NOARGS  { int sys_mprotect(caddr_t addr, int len, int prot); }
  126   STD { int linux_sys_sigprocmask(int how, \
linux_old_sigset_t *set, linux_old_sigset_t *oset); 
}
  127   STD { int linux_sys_create_module(void); }
--- 223,230 
  123   STD { int linux_sys_modify_ldt(void); }
  #endif
  124   STD { int linux_sys_adjtimex(void); }
! 125   STD { int linux_sys_mprotect(const void *start, \
!   unsigned long len, int prot); }
  126   STD { int