RE: [SLUG] RegEx question

2007-11-08 Thread Roger Barnes
> Not being a regex expert I was hoping someone could point me 
> at a list, forum or just give me a pointer on how to achieve this:
> 
> Field that must have 2 out of 3 of these:
> 
> standard a-z/A-Z
> arabic numbers 0-9
> special chars %$#@

Is there a constraint requiring that this be done with a single regex?
Depending on the context, there might be a number of more suitable
programmatic approaches.

For example, an unfinished, untested, inefficient, slapped together
bash/grep approach might look like this, without getting tangled in
regex syntax...

password='a1#'
hitcount=0
if $( echo "$password" | grep -q "[A-Za-z]" ); then echo "Got alpha";
let "hitcount = $hitcount + 1"; fi
# Repeat for numeric and special chars
# Check $hitcount == 2 or $hitcount >= 2, depending on your requirements

- Rog
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] RegEx question

2007-11-08 Thread Glen Turner

On Fri, 9 Nov 2007, Stuart Guthrie wrote:

Field that must have 2 out of 3 of these:

standard a-z/A-Z
arabic numbers 0-9
special chars %$#@


What's wrong with brute force?

bool password_characters_good_choice(char *s) {
  int matches;

  matches = (match("abcdefghijklmnopqrstuvwxyz", s) +
 match("ABCDEFGHIJKLMNOPQRSTUVWXYZ", s) > 0);
  matches += (match("0123456789", s) > 0);
  matches += (match("%$#@", s) > 0);
  return (matches > 2);
}

where match(s1, s2) returns the number of occurances of
the characters of s1 in s2. That's pretty easy to implement
and is a prewritten function in a lot of languages.

Cheers, Glen
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] RegEx question

2007-11-08 Thread Phil Scarratt

Phil Scarratt wrote:

Rick Welykochy wrote:

Stuart Guthrie wrote:


Not being a regex expert I was hoping someone could point me at a
list, forum or just give me a pointer on how to achieve this:

Field that must have 2 out of 3 of these:

standard a-z/A-Z
arabic numbers 0-9
special chars %$#@


[EMAIL PROTECTED]|[A-Za-z0-9]+|[EMAIL PROTECTED]



Maybe something like

[EMAIL PROTECTED](?(?<=[A-Za-z])[EMAIL PROTECTED]|[EMAIL PROTECTED])$

Fil


Cause I can't leave it alone:

^([A-Za-z]+|[0-9]+|[EMAIL PROTECTED])(?(?<=[A-Za-z])[EMAIL PROTECTED]|[EMAIL 
PROTECTED]).*$

Fil
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] RegEx question

2007-11-08 Thread Phil Scarratt

Phil Scarratt wrote:

Rick Welykochy wrote:

Stuart Guthrie wrote:


Not being a regex expert I was hoping someone could point me at a
list, forum or just give me a pointer on how to achieve this:

Field that must have 2 out of 3 of these:

standard a-z/A-Z
arabic numbers 0-9
special chars %$#@


[EMAIL PROTECTED]|[A-Za-z0-9]+|[EMAIL PROTECTED]



Maybe something like

[EMAIL PROTECTED](?(?<=[A-Za-z])[EMAIL PROTECTED]|[EMAIL PROTECTED])$



Actually on second thought you may want to drop the first ?. It also 
depends on whether the characters specified in the above 3 conditions 
are the only allowable characters or not.


Fil
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] RegEx question

2007-11-08 Thread Phil Scarratt

Rick Welykochy wrote:

Stuart Guthrie wrote:


Not being a regex expert I was hoping someone could point me at a
list, forum or just give me a pointer on how to achieve this:

Field that must have 2 out of 3 of these:

standard a-z/A-Z
arabic numbers 0-9
special chars %$#@


[EMAIL PROTECTED]|[A-Za-z0-9]+|[EMAIL PROTECTED]



Maybe something like

[EMAIL PROTECTED](?(?<=[A-Za-z])[EMAIL PROTECTED]|[EMAIL PROTECTED])$

Fil
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] RegEx question

2007-11-08 Thread Phil Scarratt

Rick Welykochy wrote:

Stuart Guthrie wrote:


Not being a regex expert I was hoping someone could point me at a
list, forum or just give me a pointer on how to achieve this:

Field that must have 2 out of 3 of these:

standard a-z/A-Z
arabic numbers 0-9
special chars %$#@


[EMAIL PROTECTED]|[A-Za-z0-9]+|[EMAIL PROTECTED]



I'm not sure that would exclude 00 or 09 or some such 
combinationneeds and and logic in there somewhere and probably grouping


Fil
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] RegEx question

2007-11-08 Thread Robert Thorsby
On 09/11/07 15:39:54, Stuart Guthrie wrote:
> Not being a regex expert I was hoping someone
> could point me at a list, forum or just give
> me a pointer on how to achieve this:
> 
> Field that must have 2 out of 3 of these:
> 
> standard a-z/A-Z
> arabic numbers 0-9
> special chars %$#@

A crude but effective method is to delete one only instance of each 
regex and then compare the string lengths. For example,

#!/bin/bash

EXPRESSION0="ABCDefgh1234%$#@"
EXPRESSION1=`echo "$EXPRESSION0" | sed '
s/[A-Za-z]//
s/[0-9]//
s/[EMAIL PROTECTED]//'`

echo "${#EXPRESSION0}"
echo "${#EXPRESSION1}"

HTH,
Robert Thorsby

Where a computer like the ENIAC is equipped with 18,000
vacuum tubes and weighs 30 tons, computers in the future
may have only 1,000 vacuum tubes and weigh only 1 1/2 tons.
-- Popular Mechanics, March 1949

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] RegEx question

2007-11-08 Thread Sonia Hamilton
On Fri, 9 Nov 2007 15:39:54 +1100, "Stuart Guthrie"
<[EMAIL PROTECTED]> said:
> Not being a regex expert I was hoping someone could point me at a
> list, forum or just give me a pointer on how to achieve this:
> 
> Field that must have 2 out of 3 of these:
> 
> standard a-z/A-Z
> arabic numbers 0-9
> special chars %$#@

A tool called txt2regex can help you build these - it keeps asking you
questions, and show the regex corresponding to your answers. Also
produces regexes for the languages you specify.

http://txt2regex.sourceforge.net/screenshots.html


-- 
Sonia Hamilton

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] RegEx question

2007-11-08 Thread Scott Ragen
[EMAIL PROTECTED] wrote on 09/11/2007 04:48:20 PM:

> Stuart Guthrie wrote:
> 
> > Not being a regex expert I was hoping someone could point me at a
> > list, forum or just give me a pointer on how to achieve this:
> > 
> > Field that must have 2 out of 3 of these:
> > 
> > standard a-z/A-Z
> > arabic numbers 0-9
> > special chars %$#@
> 
> [EMAIL PROTECTED]|[A-Za-z0-9]+|[EMAIL PROTECTED]
> 
Since I don't have a better answer, I should probably keep quiet, but 
there is a flaw in your regex:
[EMAIL PROTECTED]:~$ perl
my $var = 'a';
if ($var =~ /[EMAIL PROTECTED]|[A-Za-z0-9]+|[EMAIL PROTECTED]/) {
print "True\n";
}
^D
True

$var doesn't match the required 2 out of 3 characters, but still matches.

Cheers,

Scott
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] RegEx question

2007-11-08 Thread Alex Samad
On Fri, Nov 09, 2007 at 04:48:20PM +1100, Rick Welykochy wrote:
> Stuart Guthrie wrote:
>
>> Not being a regex expert I was hoping someone could point me at a
>> list, forum or just give me a pointer on how to achieve this:
>> Field that must have 2 out of 3 of these:
>> standard a-z/A-Z
>> arabic numbers 0-9
>> special chars %$#@
>
> [EMAIL PROTECTED]|[A-Za-z0-9]+|[EMAIL PROTECTED]

close to what I was going to answer but it doesn't let you have
0A or #9

>
> cheers
> rickw
>
>
>
> -- 
> _
> Rick Welykochy || Praxis Services
>
> The economy is a wholly owned subsidiary of the environment, not the 
> reverse.
>  -- Herman Daly
> -- 
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
>


signature.asc
Description: Digital signature
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Re: [SLUG] RegEx question

2007-11-08 Thread Rick Welykochy

Stuart Guthrie wrote:


Not being a regex expert I was hoping someone could point me at a
list, forum or just give me a pointer on how to achieve this:

Field that must have 2 out of 3 of these:

standard a-z/A-Z
arabic numbers 0-9
special chars %$#@


[EMAIL PROTECTED]|[A-Za-z0-9]+|[EMAIL PROTECTED]

cheers
rickw



--
_
Rick Welykochy || Praxis Services

The economy is a wholly owned subsidiary of the environment, not the reverse.
 -- Herman Daly
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] SLUG Christmas Bash, Sunday 2 December

2007-11-08 Thread Sridhar Dhanapalan
== December SLUG Christmas Bash ==

You can read this announcement on the Web at http://www.slug.org.au/node/88


When:
   12:00 - 19:00, Sunday 2 December 2007


Where:
   James Squire Brewhouse[1], King Street Wharf, Darling Harbour


SLUG will be having a Christmas bash on the 2nd of December at the James 
Squire Brew House on King Street Wharf.

People will be rocking up from 12.00, and partying through to a bit after 
19.00. People are free to drop in any time.

Everyone is invited, though we ask you pop your name down on the wiki page[2] 
so we can gauge numbers.

Directions from Wynyard railway station to the Squire can be found here[3].

We hope to see you there!

- Sridhar


[1] http://www.jamessquirebrewhouse.net/home_sydney.htm
[2] http://wiki.slug.org.au/2007christmasbash
[3] http://tinyurl.com/3e2t45


signature.asc
Description: This is a digitally signed message part.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Re: [SLUG] RegEx question

2007-11-08 Thread Erik de Castro Lopo
Stuart Guthrie wrote:

> Not being a regex expert I was hoping someone could point me at a
> list, forum or just give me a pointer on how to achieve this:
> 
> Field that must have 2 out of 3 of these:
> 
> standard a-z/A-Z
> arabic numbers 0-9
> special chars %$#@

Thats not that great a specification :-). Can you give some examples of
strings that you want to accept and others that you want to reject?

Erik
-- 
-
Erik de Castro Lopo
-
The idea that Bill Gates has appeared like a knight in shining armour to
lead all customers out of a mire of technological chaos neatly ignores
the fact that it was he who, by peddling second-rate technology, led them
into it in the first place. - Douglas Adams in Guardian, 25-Aug-95
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] RegEx question

2007-11-08 Thread Stuart Guthrie
Not being a regex expert I was hoping someone could point me at a
list, forum or just give me a pointer on how to achieve this:

Field that must have 2 out of 3 of these:

standard a-z/A-Z
arabic numbers 0-9
special chars %$#@

Best regards

Stuart Guthrie
Director
Polonious Pty Ltd
(w) http://www.polonious.com.au
(m) 0403 470 123
Polonious Support Numbers:
Sydney: 61-2-9007-9842
Chicago: 1-312-212-3952

This above all: to thine ownself be true,
And it must follow, as the night the day,
Thou canst not then be false to any man.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] converting tiff to pdf

2007-11-08 Thread Rick Welykochy

david wrote:


I haven't used it, but there is a utility called tiff2pdf.
It is in the package libtiff-tools on Debian - not sure what it would be 
on other distros.


That worked better than imagemagick.. thanks...

Some still don't work though. No idea why some do and some don't.


If there is only one image in the tiff file, perhaps converting
from tiff --> gif --> then to pdf might be more reliable.


cheers
rickw



--
_
Rick Welykochy || Praxis Services

The economy is a wholly owned subsidiary of the environment, not the reverse.
 -- Herman Daly
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] converting tiff to pdf

2007-11-08 Thread david
On Fri, 2007-11-09 at 11:30 +1100, Scott Ragen wrote:
> [EMAIL PROTECTED] wrote on 09/11/2007 11:18:26 AM:
> 
> > I've tried imagemagick but i'm getting faulty pdf's in the output:
> > 
> > $ convert test.tif test.pdf
> > 
> > The message from adobe reader is "drawing error". Some documents convert
> > OK, but some don't. Other programs simply hang when opening - eg,
> > document viewer and pdf viewer.
> > 
> > Can anyone suggest another command line method of conversion? The files
> > I'm dealing with right now are tif output from hylafax. 
> > 
> 
> I haven't used it, but there is a utility called tiff2pdf.
> It is in the package libtiff-tools on Debian - not sure what it would be 
> on other distros.

That worked better than imagemagick.. thanks...

Some still don't work though. No idea why some do and some don't.

regards,

David.

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] converting tiff to pdf

2007-11-08 Thread Scott Ragen
[EMAIL PROTECTED] wrote on 09/11/2007 11:18:26 AM:

> I've tried imagemagick but i'm getting faulty pdf's in the output:
> 
> $ convert test.tif test.pdf
> 
> The message from adobe reader is "drawing error". Some documents convert
> OK, but some don't. Other programs simply hang when opening - eg,
> document viewer and pdf viewer.
> 
> Can anyone suggest another command line method of conversion? The files
> I'm dealing with right now are tif output from hylafax. 
> 

I haven't used it, but there is a utility called tiff2pdf.
It is in the package libtiff-tools on Debian - not sure what it would be 
on other distros.

Regards,

Scott
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] converting tiff to pdf

2007-11-08 Thread david
I've tried imagemagick but i'm getting faulty pdf's in the output:

$ convert test.tif test.pdf

The message from adobe reader is "drawing error". Some documents convert
OK, but some don't. Other programs simply hang when opening - eg,
document viewer and pdf viewer.

Can anyone suggest another command line method of conversion? The files
I'm dealing with right now are tif output from hylafax. 

I've seen Open Office suggested, but I would prefer something I can use
from command line.

thanks...

David.

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] Women's meetup before SLUG: Lindt Cafe, Darling Harbour, Fri Nov 30, 5:30pm

2007-11-08 Thread Mary Gardiner
Hi all,

We will have our regular women's meetup before the SLUG meeting this
month. Feel free to forward this message to any women you think might be
interested in coming.

This month Melissa Draper is in town, so we will hear about her
experiences presenting From "Equality to Diversity: The Road Less Taken"
to OSDC


 Date: Friday 30th November 2007

 Time: 5:30-6:15pm

 Location: Lindt Chocolat Cafe, Shop 104–105, Cockle Bay Wharf, Darling
   Harbour

   http://tinyurl.com/29seva (just south of the east end of the
   Pyrmont Bridge)

 Directions: The Lindt Cafe is on the ground floor of the Cockle Bay
 Wharf building, between the two halves. Look for the
 fountain, or alternatively look right under the Blackbird
 Cafe.

 RSVP: [EMAIL PROTECTED]

If you RSVP, we can send you a mobile number to call if you can't find
us.

Afterwards we will go to the SLUG meeting together. See
 for more details about the SLUG
meeting.

The Chix meetings in Sydney are organised by Sydney members of
AussieChix, the Australian LinuxChix chapter. See
 for more about AussieChix.

-Mary
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] SLUG Monthly Meeting, Friday 30 November

2007-11-08 Thread Sridhar Dhanapalan
== November SLUG Monthly Meeting ==

You can read this announcement on the Web at http://www.slug.org.au/node/87


When:
   18.30 - 20.30, Friday, 30 November, 2007

We start at 18:50 but we ask that people arrive 20 minutes early so we can all 
get into the building and start on time. Please do not arrive before 18:00, 
as it may hinder business activities for our host!

Appropriate signage and directions will be posted on the building.


Where:
   Atlassian[1], 173-185 Sussex Street, Sydney
   (corner of Sussex and Market Street)

Entry is via the rear on Slip Street. There are stairs going down along the 
outside of building from Sussex St to near the entrance. A map of the area 
and directions can be found here[2].


= Talks =

** Jeff Waugh and guests - Careers Panel **

Jeff Waugh will lead a discussion of issues surrounding employment and careers 
in the FOSS world.

** Jamie Wilkinson - Linux authentication internals **

Jamie Wilkinson will be treating you all to a relaxing jaunt through glibc's 
nameservice switch, or what goes on under the hood of /etc/nsswitch.conf. In 
particular, we'll look at how it interoperates with LDAP, why nscd got 
invented, and all of the problems therein. This is a warm-up talk to one of 
similar content to be presented at LCA 2008. 


= Meeting Schedule =

* 6:15pm: Open Doors
* 6.40pm: The Usual Suspects
* 6:45pm: General Talk (see above)
* 7:30pm: Intermission
* 7:45pm: Split into two groups for
* In-depth Talk (see above)
* SLUGlets: Linux Q&A and other miscellany
* 8:30pm: Dinner


We hope to see you there!

- Sridhar



[1] http://www.atlassian.com
[2] http://tinyurl.com/35fxes


signature.asc
Description: This is a digitally signed message part.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

[SLUG] IEEE Computer Society (NSW Chapter)

2007-11-08 Thread Mark Phillips
Hi All,

Its happening! 

Thursday 15th November The IEEE Computer Society (NSW Chapter) will be
holding the first of our bi-monthly seminars ( We hope ).

Our own indomitable Pia will be speaking and so I encourage you all to
attend, if not for the networking opportunities, then to show  Open
Source is a presence to be reckoned with. 

One of the things we discussed was to open these seminars to anybody who
wants to come along. A sharing of knowledge and interests It is NOT
restricted to IEEE members only, although you are encouraged to join.

And now for the official blurb   



The IEEE Computer Society (NSW Chapter) is happen to announce
our end of year seminar. It will be held in the Nicta Seminar
rooms Bay 15 at the Australian Technology Park on Thursday 15th
November. The meeting will be opening at 6:00pm for a 6:30pm
start and everybody and anybody is welcome.

The agenda will be:

  "Open Source - The Opportunities for Australia" 
   by Pia Waugh
 

   "Status of the IEEE Computer Society and our
Plans for the Future." 
   by Kate Carruthers President IEEE Computer
Society (NSW Chapter)


There will also be an endpoint discussion on how to upgrade to
being a "Senior Member" of the IEEE.


If you plan on attending could you RSVP to
[EMAIL PROTECTED] 

Refreshments will be served.

See you all there!







-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] Re: [activities] IEEE Computer Society (NSW Chapter)

2007-11-08 Thread Blindraven
"The IEEE Computer Society (NSW Chapter) is happen to announce"

Small typo you might wanna fix before you mail that everywhere else :)

Regards,
H.

On Nov 8, 2007 11:03 AM, Mark Phillips <
[EMAIL PROTECTED]> wrote:

> Hi All,
>
> Its happening!
>
> Thursday 15th November The IEEE Computer Society (NSW Chapter) will be
> holding the first of our bi-monthly seminars ( We hope ).
>
> Our own indomitable Pia will be speaking and so I encourage you all to
> attend, if not for the networking opportunities, then to show  Open
> Source is a presence to be reckoned with.
>
> One of the things we discussed was to open these seminars to anybody who
> wants to come along. A sharing of knowledge and interests It is NOT
> restricted to IEEE members only, although you are encouraged to join.
>
> And now for the official blurb
>
>
>
>The IEEE Computer Society (NSW Chapter) is happen to announce
>our end of year seminar. It will be held in the Nicta Seminar
>rooms Bay 15 at the Australian Technology Park on Thursday 15th
>November. The meeting will be opening at 6:00pm for a 6:30pm
>start and everybody and anybody is welcome.
>
>The agenda will be:
>
>  "Open Source - The Opportunities for Australia"
>   by Pia Waugh
>
>
>   "Status of the IEEE Computer Society and our
>Plans for the Future."
>   by Kate Carruthers President IEEE Computer
>Society (NSW Chapter)
>
>
>There will also be an endpoint discussion on how to upgrade to
>being a "Senior Member" of the IEEE.
>
>
>If you plan on attending could you RSVP to
>[EMAIL PROTECTED]
>
>Refreshments will be served.
>
>See you all there!
>
>
>
>
>
>
>
> --
> SLUG Activities
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
>



-- 
When one burns ones bridges, what a very nice fire it makes.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] dropping dns times

2007-11-08 Thread Voytek Eymont

$ORIGIN .
$TTL 86400  ; 1 day
dom.tld.au  IN SOA  host.tld.net.au. dom.tld.au. (
99001105   ; serial
1800   ; refresh (30 minutes)
600; retry (10 minutes)
604800 ; expire (1 week)
86400  ; minimum (1 day)


above is from the bind host file;

what times do I drop:
$TTL 86400 ??
and
604800 ; expire (1 week) ??


-- 
Voytek

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] migrating mail server Maildirs, howto copy ?

2007-11-08 Thread Voytek Eymont

On Fri, November 9, 2007 12:51 am, Gonzalo Servat wrote:
> On Nov 8, 2007 10:21 AM, Voytek Eymont <[EMAIL PROTECTED]> wrote:

> I've done a few mail server migrations in the past and a bit of DNS
> trickery helps in not loosing mail. What I would do is set the TTL really
-snip-
> hours, for me it was never an issue. I would then copy all mail over (using
> whichever method you prefer .. as suggested by Jeff & David). At this
> point it's probably a good idea to update the MX record (or the A record,
> if you want to keep the MX record it points to) so that it points at the
> new mail server. After 24-48 hours, I would turn off the port forward and
> monitor the logs to ensure no legitimate email is being received.

Gonzalo, thanks

I'm going to have oldmail server forward all mail to new mailserver with
smtp static assignement, then, re-run
rsync old:/var/mail/vhost with new:/var/mail/vhost
with 'delete' option

perhaps rerun rsync with delete over the weekend few more times

-alter MX;
-redirect smtp old > new
-alter pop CNAME
-rsync

I think that should, do,

OOPS, forgot:
-keep fingers crossed

> Good luck!

yes, with me at the keyboard, that's important (as most ppl here realize)

thanks again!

-- 
Voytek

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] gdmsetup: `key_file != NULL' failed

2007-11-08 Thread Adam Bogacki
Hi,

gdm has started failing with the msg that it cannot open 
default theme file

/usr/share/gdm/themes/circles/circles.xml

There is no perms prob ..

Tohunga:/usr/share/gdm/themes/circles# ls -la circles.xml
-rwxrwxr-- 1 root root 3301 2007-11-04 10:37 circles.xml

However, I note that gdmsetup gives me the output below.

Can anyone suggest a fix ?

Adam.
[EMAIL PROTECTED]

Tohunga:/home/adam# gdmsetup
gdmsetup[6989]: GLib-CRITICAL: g_key_file_get_locale_string: assertion 
`key_file != NULL' failed
gdmsetup[6989]: GLib-CRITICAL: g_key_file_get_locale_string: assertion 
`key_file != NULL' failed
gdmsetup[6989]: GLib-CRITICAL: g_key_file_get_locale_string: assertion 
`key_file != NULL' failed
gdmsetup[6989]: GLib-CRITICAL: g_key_file_get_locale_string: assertion 
`key_file != NULL' failed
gdmsetup[6989]: GLib-CRITICAL: g_key_file_get_locale_string: assertion 
`key_file != NULL' failed
gdmsetup[6989]: GLib-CRITICAL: g_key_file_free: assertion `key_file != NULL' 
failed
gdmsetup[6989]: GLib-CRITICAL: g_key_file_get_locale_string: assertion 
`key_file != NULL' failed
gdmsetup[6989]: GLib-CRITICAL: g_key_file_get_locale_string: assertion 
`key_file != NULL' failed
gdmsetup[6989]: GLib-CRITICAL: g_key_file_get_locale_string: assertion 
`key_file != NULL' failed
gdmsetup[6989]: GLib-CRITICAL: g_key_file_get_locale_string: assertion 
`key_file != NULL' failed
gdmsetup[6989]: GLib-CRITICAL: g_key_file_get_locale_string: assertion 
`key_file != NULL' failed
gdmsetup[6989]: GLib-CRITICAL: g_key_file_free: assertion `key_file != NULL' 
failed


-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] migrating mail server Maildirs, howto copy ?

2007-11-08 Thread Gonzalo Servat
On Nov 8, 2007 10:21 AM, Voytek Eymont <[EMAIL PROTECTED]> wrote:

>
> [..snip..]
> James, Dave, thanks
>
> between the time I copy it, and, the mail server is transferred, there are
> bound to be emails deleted/removed from main server, (as well as new ones
> added),
>

I've done a few mail server migrations in the past and a bit of DNS trickery
helps in not loosing mail. What I would do is set the TTL really low (< 10
mins) for the domain I was transferring (so that all records change their
TTL for that domain) 2 or 3 days before the actual migration. On migration
day, I would forward ports 25,110,143 (SMTPS, POPS and IMAPS (if you use
them) to the new mail server to ensure any new mail is forwarded straight
onto the new mail server. You would need to actually resend packets with the
source address changed to be the old mail server so that packets are routed
back through the old mail server (otherwise it wouldn't work ... A (client)
-> B (old mail server) -> C (new mail server) -> A (client) .. it needs to
be A (client) -> B (old mail server) -> C (new mail server) -> B (old mail
server) -> A (client) ), which means any emails will generate traffic for
both, your old & new mail server but since it's only for a period of 48
hours, for me it was never an issue.
I would then copy all mail over (using whichever method you prefer .. as
suggested by Jeff & David). At this point it's probably a good idea to
update the MX record (or the A record, if you want to keep the MX record it
points to) so that it points at the new mail server.
After 24-48 hours, I would turn off the port forward and monitor the logs to
ensure no legitimate email is being received.

Hope this helps. Good luck!

- Gonzalo
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] migrating mail server Maildirs, howto copy ?

2007-11-08 Thread Gonzalo Servat
On Nov 8, 2007 10:51 AM, Gonzalo Servat <[EMAIL PROTECTED]> wrote:

> [..snip..]
> I've done a few mail server migrations in the past and a bit of DNS
> trickery helps in not loosing mail. What I would do is set the TTL really
> low (< 10 mins) for the domain I was transferring (so that all records
> change their TTL for that domain)
>

[..snip..]

Sorry, I meant to say that you'd have to change the TTL for all domains
hosted on the mail server. I confused myself (and possibly others) between
migrating one domain and an entire mail server for a second.

- Gonzalo
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] migrating mail server Maildirs, howto copy ?

2007-11-08 Thread Voytek Eymont

On Thu, November 8, 2007 9:34 pm, Dave Kempe wrote:
> Voytek Eymont wrote:

> why no just rsync it as root with -av and you preserve all the ownership

James, Dave, thanks

between the time I copy it, and, the mail server is transferred, there are
bound to be emails deleted/removed from main server, (as well as new ones
added),

so, do I re-run it to get just new mails since;
then rerun it with '--delete' to get rid of collected mails, is the the
idea ?
or can I run a single pass to both get-new and delete-if-notexist ?

also, I enabled 'ssh' for root, started rsync, then disabled root's ssh,
is there another way of allowing temporary access without editing conf
files/restarting daemon?



-- 
Voytek

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] migrating mail server Maildirs, howto copy ?

2007-11-08 Thread Jeff Waugh


> I was looking at activate the new mail server, and, then, rsync the
> existing Maildirs to 'synchronize' old & new servers;
> 
> as I'm the only user with shell access, should I just add shell access to
> user '5000' for the purpose of running rsync, then, remove it?
> 
> or, what's a proper way to do this copy ?

There are plenty of proper ways to do it!

Given that you're not actually synchronising or updating anything, you could
use tar and netcat. That's way fast.

> what the proper way to add/remove shell, can I just edit /etc/passwd ?

If you mean adding a user, you should use the user management tools provided
by your distribution (such as adduser/useradd).

> do I need to give user '5000' a name, or can I just use '5000' in rsync ?

Check the -a parameter for rsync. :-)

- Jeff

-- 
linux.conf.au 2008: Melbourne, Australiahttp://lca2008.linux.org.au/
 
  "When's the last time you heard of the police having to intervene at an
   antiquarian book riot?" - Raph Levien
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] migrating mail server Maildirs, howto copy ?

2007-11-08 Thread Dave Kempe

Voytek Eymont wrote:

or, what's a proper way to do this copy ?


why no just rsync it as root with -av and you preserve all the ownership 
and don't need to worry. OTOH, if you stuff it up, a recursive chown 
will fix it, so no need to worry.


dave
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Important about Novell Certifications

2007-11-08 Thread David Gillies
[EMAIL PROTECTED] wrote:
> Novell Certifications
> http://educational-world.blogspot.com/2007/09/novell-certifications.html

What's so important about that information besides the fact that its
just a rehash of the information on Novell's own site?

-- 
dave.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] migrating mail server Maildirs, howto copy ?

2007-11-08 Thread Voytek Eymont
I'm migrating mail server to new server;

all mail is for  virtual users in /var/home/vhosts/%dom.tld%/%user&/Maildir;
owned by '5000' as so
drwx--5 5000 5000

I was looking at activate the new mail server, and, then, rsync the
existing Maildirs to 'synchronize' old & new servers;

as I'm the only user with shell access, should I just add shell access to
user '5000' for the purpose of running rsync, then, remove it?

or, what's a proper way to do this copy ?

what the proper way to add/remove shell, can I just edit /etc/passwd ?
do I need to give user '5000' a name, or can I just use '5000' in rsync ?




-- 
Voytek

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html