The Official *nix Thread

Inane baanter or words of wisdom - you decide...
Post Reply
User avatar
Dungeon-Dave
Baaaaaa!
Baaaaaa!
Posts: 3925
Joined: Thu Aug 04, 2005 12:01 pm 0
Location: UK
Contact:

Re: The Official *nix Thread

Post by Dungeon-Dave »

RageMatrix wrote:Not - I hasten to add - that I'd wish the same situation on anyone else, mind - its a total nightmare!
but is it? It's a steep learning curve, granted. Postfix is quite simple and powerful to implement (want copies of my main.cf file?) and there's shitloads of good websites out there to help.[1]

However, by the sound of things you're compounding it with adding virtual domains into mysql (I'd keep them in virtual.db for the moment) plus trying to do the LDAP authentication.... it's a lot of things all coming together, and you've not really got a good working model that you can start to pin additional functionality onto.

Think of it as "mail katamari". Get the core working, then start to change things and add more on until you've got one large rolling ball of shi... erm.. working system.

Either way... I'm glad you've stuck to it, and you've gota boss that knows this shit. You'll be surprised at how much a lil fucking around with this convoluted stuff starts to sharpen the mind into a much more logical modular problem-solving flow. *nix is certainly the Lego of functional components.

[1] FWIW - I've dropped the same challenge onto some of my staff, and it's quite revealing how far they get and what their attitude to the problem is.
User avatar
Dungeon-Dave
Baaaaaa!
Baaaaaa!
Posts: 3925
Joined: Thu Aug 04, 2005 12:01 pm 0
Location: UK
Contact:

Re: The Official *nix Thread

Post by Dungeon-Dave »

Wibble wrote:Haven't touched Exchange (in a while), have you?
5.5 pile of utter twuntbait. As a collaboration server it's excellent; as a mail server it chugs root. Trying to extend it's functionality past its limitations proved to me that it's small-scale and designed as the MIDI system of mail servers. Someone did an upgrade to 2000 and they had to log on as each person and save the mailboxes out as .PST files then import them manually (one at a time) into the new 2k organisation. It just looked a right faff.

No doubt it's improved, but I find spamassassin/greylisting/RBL control under postfix has blocked far more spam than our company server (sexchange+smurf control).. but that's just me.

Mmm.. just spotted "mailgraph". I use cacti, so will be farting around with this tool soon.
User avatar
Wibble
Baaaaaa!
Baaaaaa!
Posts: 3317
Joined: Fri May 02, 2003 10:13 pm 0
XBL Gamertag: misterwibble
Location: The Hague - The Netherlands
Contact:

Re: The Official *nix Thread

Post by Wibble »

Dungeon-Dave wrote:
Wibble wrote:Haven't touched Exchange (in a while), have you?
5.5 pile of utter twuntbait. As a collaboration server it's excellent; as a mail server it chugs root. Trying to extend it's functionality past its limitations proved to me that it's small-scale and designed as the MIDI system of mail servers. Someone did an upgrade to 2000 and they had to log on as each person and save the mailboxes out as .PST files then import them manually (one at a time) into the new 2k organisation. It just looked a right faff.
Hahah.. Must be a brand new organisation then, or he really must've messed up then, because that's usually the fallback scenario for a failed in-place upgrade. Huge improvements were made with 2003, and 2007 is just wonderful. It's just not something I'd consider running for an ordinary smallish organization thee days.

Filtering seems to be a lot more effective using the OSS solutions than most of the commercial packages I've touched. It doesn't hurt to have linux boxes for edge MTAs ;).
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

Dungeon-Dave wrote: but is it? It's a steep learning curve, granted. Postfix is quite simple and powerful to implement (want copies of my main.cf file?) and there's shitloads of good websites out there to help.[1]

However, by the sound of things you're compounding it with adding virtual domains into mysql (I'd keep them in virtual.db for the moment) plus trying to do the LDAP authentication.... it's a lot of things all coming together, and you've not really got a good working model that you can start to pin additional functionality onto.
Quite possibly - but thats the way the boss wants it, end of story. I personally don't know enough about what I'm doing to argue with him about it so - by god - I'm going to do it. As I said, I've some slightly more knowledgable help now and we're working on different bits - hes working on getting the Courier-IMAP stuff working and I'm working on Postfix/MySQL virtual domains and we're documenting what works and what doesn't as we go; the likelihood being we'll have to dismantle the whole thing and start again once we realise the bits we didn't figure out the first time round anyway.

Basically, it boils down to the main boss telling me "You, you get us a mail server working because our hosting company is charging us too much money" and I told him "Yessir". Thats it - it doesn't matter what I know or what I want, I'm going to deliver exactly what I was told to, even if it takes me a month. I still don't understand all of it, but I'm getting there. Local users actually logged into the Linux server could have had their mail delivered in quick time last week, but thats not what was wanted or needed and, in fact, using virtual domains via a database sits actually easier in my head than messing with accounts and directories.

I've set up application servers, web servers and database servers on Linux in the past and I (in retrospect, stupidly) thought this would be a similar deal, perhaps a day or two messing about. Turns out I didn't really know what was involved or how many different bits of software would be required or the utter lack of decent "Dur" tutorials available, so theres been a certain amount of experimenting and searching about.

Its fair to say I've learnt more in the last week than I have in the last six months on Linux, so its no bad thing. Its just exhausting and frustrating and time-consuming. But, like I said, I've been told what is expected of me and I intend to deliver. Somehow :D
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
WiteWulf
Sheepie Whore
Sheepie Whore
Posts: 10125
Joined: Mon Aug 23, 2004 11:20 am 0
PSN: WiteWulf
Location: Loughborough(ish)

Re: The Official *nix Thread

Post by WiteWulf »

Dungeon-Dave wrote:
WiteWulf wrote:Any bright ideas how I can sort this out?
Yup.

Code: Select all

5 3 * * 1 <script_name>
...then in the script (ABSOLUTE PATH, naturally) check the value of `date +%d` is less than 8. If not, exit.

The script will run 4 times in the month, but on 3 of them it won't do anything. It's the old "logic OR" problem (one I use on my training courses frequently)
Cheers Dave, guru-tastic answer, as always ;)
:::G:::

PSN: WiteWulf
Switch: SW-3941-2878-7584
Steam: WITEWULF66
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

Yay!

Now got Postfix/Courier-IMAP working for local and remote users via POP3/IMAP via virtual domains in MySQL. Now need to get the webmail bit setup via Apache and get SpamAssassin installed and working.

Phew - that only took a week or so.

We're gonna need testing. Lots of testing.
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
defsdoor
Baaaaaa!
Baaaaaa!
Posts: 3909
Joined: Fri Jan 30, 2004 12:26 am 0
Location: Sunny Beduff

Re: The Official *nix Thread

Post by defsdoor »

Consider running ASSP infront of your MTA instead of spamassassin. I've been using it for years (getting 5000 emails a day through it here) and it's pretty impressive. Also does clamav and a whole lot of other SPAM detection methods before bayesian crunch is needed.
User avatar
Dungeon-Dave
Baaaaaa!
Baaaaaa!
Posts: 3925
Joined: Thu Aug 04, 2005 12:01 pm 0
Location: UK
Contact:

Re: The Official *nix Thread

Post by Dungeon-Dave »

RageMatrix wrote:
Dungeon-Dave wrote: However, by the sound of things you're compounding it with adding virtual domains into mysql (I'd keep them in virtual.db for the moment) plus trying to do the LDAP authentication.... it's a lot of things all coming together, and you've not really got a good working model that you can start to pin additional functionality onto.
Quite possibly - but thats the way the boss wants it, end of story.
Sorry, mate - I didn't explain myself too clearly there. I meant get it working with normal, basic flat-text files for the moment *then* look at changing the authentication model for another one. I ain't arguing about the destination, just talking about making the journey easier. You'll see that the postfix config files even warn about making one or two changes before restarting to aid troubleshooting.

Oh, and "tail -f /var/log/maillog" is your friend, running in a small putty session whilst you work.
RageMatrix wrote:Yay!
Now got Postfix/Courier-IMAP working for local and remote users via POP3/IMAP via virtual domains in MySQL.
Congrats!
RageMatrix wrote:Now need to get the webmail bit setup via Apache and get SpamAssassin installed and working.
yum -y install squirrelmail spamassassin clamav <-- installs
rpm -ql squirrelmail <-- what files did this package provide? Look for config files in /etc, play with them.

nb: to extend on defsdoor, consider running some RBLs or postgrey on postfix before the mail hits spamassassin, so that a lot of spam bounces off the front door. That which makes it through will be tagged and/or deleted, but it's less of a resource hog to reject it than accept, label and store it.

Also, read up about the plugins for squirrelmail - end users can configure their individual SA rules via squirrelmail front-end.

Last note: configure apache *very* carefully. Generally add one/two virtual domains for default connections then configure real sites through further vhosts, so that sniffers/harvesters are dropped into a honeypot and miss the proper URLs. Your boss will probably know about that (and some people here have been the victim of my anti-sniffing measures on hapachie). Use awstats,cacti or logwatch to monitor unusual activity; it is SO easy to find yourself trojaned these days.
User avatar
JQW
Baaaaa!
Baaaaa!
Posts: 1186
Joined: Thu Feb 22, 2007 12:23 pm 0
Location: Ripon, where nothing ever happens.

Re: The Official *nix Thread

Post by JQW »

I'm seeing someone next week about a job opportunity managing their Linux servers. The parent company, based overseas, has a policy of not running any Windows servers anywhere, and Linux is therefore used company wide.

I've therefore got a few days to get to know the current methods for using Linux based servers to support PC clients. I've worked with many of the common open source components in the past (Apache, MySQL, QMAIL, Spam Assasin etc), but the past posts in this thread has given me enough clues of other things to cover.

I particularly want to look at clustering/failover implementations, similar to the Veritas clusters I've used on Solaris in the past. Anyone familiar with similar things under Linux.

Can I learn Postfix in three days? :lol:
User avatar
t0ne
Baaaaaa!
Baaaaaa!
Posts: 3134
Joined: Wed Sep 11, 2002 8:48 am 0
Location: Bristol

Re: The Official *nix Thread

Post by t0ne »

JQW wrote:I'm seeing someone next week about a job opportunity managing their Linux servers. The parent company, based overseas, has a policy of not running any Windows servers anywhere, and Linux is therefore used company wide.

I've therefore got a few days to get to know the current methods for using Linux based servers to support PC clients. I've worked with many of the common open source components in the past (Apache, MySQL, QMAIL, Spam Assasin etc), but the past posts in this thread has given me enough clues of other things to cover.

I particularly want to look at clustering/failover implementations, similar to the Veritas clusters I've used on Solaris in the past. Anyone familiar with similar things under Linux.

Can I learn Postfix in three days? :lol:
Would think they're looking for someone with pretty sharp samba and CUPS skills too, good luck with it !
User avatar
JQW
Baaaaa!
Baaaaa!
Posts: 1186
Joined: Thu Feb 22, 2007 12:23 pm 0
Location: Ripon, where nothing ever happens.

Re: The Official *nix Thread

Post by JQW »

I forgot Samba! I had real fun getting that to interact with Active Directory's implementation of Kerberos a year or two ago. I got it working in the end after discovering that half of the on-line documentation available was incorrect.

Can the current release of Samba work with Windows Vista clients? When I tried a pre-release of Vista it didn't want to know, and I've not had the need to play with the two since.
User avatar
Firefox
Sheepie Whore
Sheepie Whore
Posts: 11412
Joined: Fri Apr 26, 2002 6:15 pm 0
Location: Sheffield

Re: The Official *nix Thread

Post by Firefox »

Nice little list of shell tricks from IBM: UNIX tips: Learn 10 good UNIX usage habits
"I am a very considerate person. If I want to go out all night on my miniature golf course and shoot lizards, well, no reason to keep the neighbours awake..."
User avatar
RageMatrix
Baaaaaaa!
Baaaaaaa!
Posts: 5515
Joined: Fri May 10, 2002 12:52 pm 0
XBL Gamertag: Jon256
Location: East Sussex

Re: The Official *nix Thread

Post by RageMatrix »

A huge bunch of Linux/UNIX cheatsheets. Useful!

http://www.scottklarr.com/topic/115/lin ... ollection/
XBox Gamertag: Jon256
Wii Code: 4849 1090 9042 6725
"Wrapped in metal, wrapped in ivy"
The Official UNIX/Linux Thread
User avatar
Dungeon-Dave
Baaaaaa!
Baaaaaa!
Posts: 3925
Joined: Thu Aug 04, 2005 12:01 pm 0
Location: UK
Contact:

Re: The Official *nix Thread

Post by Dungeon-Dave »

Another problem, FC7-related.

/etc/sysconfig/network-scripts contains several ifcfg-eth* files, the first being ifcfg-eth0.

Now previously these never contained a HWADDR entry (for MAC address) but were required if you had multiple NICs (I think it was /etc/modprobe.conf that determined which card was eth[0-9] etc).

For some reason, FC7 wants this parameter to be included and... if it ain't the right MAC, then ifcfg-eth0 (containing "BOOTPROTO=static" and IP information) gets renamed to ifcfg-eth0.bak and a new ifcfg-eth0 file is created, containing the correct HWADDR but also "BOOTPROTO=dhcp".

Wrong MAC address? Flick over to DHCP.

Any ideas how to prevent it? I'm currently looking at hacking the "network-functions" file.
seanyseansean
Baa!
Baa!
Posts: 97
Joined: Wed Jan 23, 2008 11:17 am 0

Re: The Official *nix Thread

Post by seanyseansean »

I have FC7 on some servers at work (before my time... all the new ones get Centos) but i've not seen that behaviour. Is kudzu running at boot and rewriting the scripts?

Besides, why don't you just put the MAC in? Newer kernels load modules in parallel. This causes problems with multiple NICs (especially those with different drivers) getting loaded in different orders, but it boots faster.
Post Reply