Koozali.org: home of the SME Server

Help an extreme newbie to linux, im still windoze poisoned ;)

Offline Trashman

  • *
  • 54
  • +0/-0
Help an extreme newbie to linux, im still windoze poisoned ;)
« on: September 06, 2008, 05:57:10 PM »
Background: Ok, my problem is that i want to make a newsletter style mailing...small...about 900 addresses...my server only handles that and 3 sites without forums or heavy things, the only "heavy" thing is going to be the newsletter, why i say "heavy" you may ask...because i want to activate per mail personalization in mailman as explained here:

http://wiki.list.org/pages/viewpage.action?pageId=4030545

Mailman is actually installed and working fine, i sent some tests mails inside and outside the server and all works perfect, subscribed test mails, edited the mail and html templates as i want and so on...but yesterday i tried to activate that setting mentioned above and qmail kinda stopped working...it wasnt sending in or out mails, neither warnings...nothing...then i learned that my mistake is that in sme server YOU DONT EDIT THE FILES DIRECTLY...so...as this is a fresh install i installed all again...and now is working all fine exept that option...

I have been trying to understand the developer manual about templates but its WAY over my knowledge...also did some searches in the forums and found this:

http://forums.contribs.org/index.php?topic=40811.msg192271#msg192271

So to my questions:
Is that the correct way to edit a single config file?
Any1 tried the personalization option mentioned there in the mailman FAQ?
The VERP thing is needed or just suggested? if needed, where should i set it?
In the folder where the files should be edited there are several "fragments" of the file, what means each one or wich one should i edit?
Should i stop mailman or qmail or any other service before and/or after editing the file? maybe also restarting the whole system? maybe with a special command?
And last but not least: Can this personalization thing be done at all in this setup?

Sidenote: if any1 can help me and i manage to make it work AND if i get wiki access ill write a wiki trying to explain how to edit those template files (with the appropiate warnings) to other *nix-crippled guys like me...and a small side note on the mailman wiki about personalization...also if some1 need help with spanish traslation im willing to help, my natural language is sp and i can understand pretty much anything in english...(even some technical level stuff)
« Last Edit: September 06, 2008, 06:03:12 PM by Trashman »

Offline arne

  • ****
  • 1,116
  • +0/-4
Re: Help an extreme newbie to linux, im still windoze poisoned ;)
« Reply #1 on: September 06, 2008, 09:32:31 PM »
Yes you are - poisoned by Windoze !

First you will have to learn to use the SME server before you modify it - when things does not work it generally use to have two reasons - 1. Incorrect configurations 2. Incorrect modifications.

But anyhow all learning have to start somewere (with destruction of some servers.)

As I have learned that modifacations does most of the problems that is, I generally don't do many modifications any more, but still if I remember it correctely, and from the development manual part 2:

"Templates are stored under /etc/e-smith/templates/ in a directory hierarchy which matches the standard filesystem. For example, the template for /etc/inittab is stored in the /etc/e-smith/templates/etc/inittab/ directory."

The prinsiple is to edit the templates in such a way that they will modify the configuration files.

Then to apply these modifications, if I does not remeber it wrong:

signal-event post-upgrade  
signal-event reboot 

References:
http://wiki.contribs.org/SME_Server:Documentation:Developers_Manual:Section2#Configuration_file_templates
http://wiki.contribs.org/Useful_Commands

Please correct me anyone if I'm incorrect or if it is bether links somewhere.



« Last Edit: September 06, 2008, 09:35:16 PM by arne »
......

Offline Trashman

  • *
  • 54
  • +0/-0
Re: Help an extreme newbie to linux, im still windoze poisoned ;)
« Reply #2 on: September 06, 2008, 11:51:47 PM »
Im now in the "finger poke till its cute or if broken start again" stage...after that its going to be untouched for a long time, maybe ill stay even away from updates :p
In this specific case im trying to modify a file called mm_cfg.py...its something related to mailman and/or python...its at /etc/e-smith/templates/usr/lib/mailman/Mailman but there are 7 files and i dont know wich one to edit, im allmost sute that the one is 30hostname but i fear to break again the server :p

Offline pfloor

  • ****
  • 889
  • +1/-0
Re: Help an extreme newbie to linux, im still windoze poisoned ;)
« Reply #3 on: September 07, 2008, 12:17:49 AM »
I don't use Mailman and don't know the exact directory structure but here is an EXAMPLE for you...

Create the proper templates-custom directory and copy the entire directory contents from the standard template directory.  Something like this:

/etc/e-smith/templates/usr/lib/mailman/Mailman to /etc/e-smith/templates-custom/usr/lib/mailman/Mailman

Now edit the templates in the templates-custom directory as much as you desire.

expand-template /usr/lib/mailman/Mailman

See if your edits worked, if not try again.

If you totally mess up, re-copy the template (or fragment(s)) to the custom template directory or delete them alltogether and re-expand the templates.

This is the beauty of the template system.  Your custom edits can be easily removed and you are back to square one.  DO NOT edit the templates (or template fragments) in the standard template tree.  Always copy them to the custom-template directory tree.  This way you can always revert back to the standard setup and start again.

Also, updates don't touch the templates-custom directory so any changes you make there will not be overwritten by updates.  Yet another beautiful thing about SME.

Remember, this is an EXAMPLE so the directory structure above may not be exact.
« Last Edit: September 07, 2008, 12:20:11 AM by pfloor »
In life, you must either "Push, Pull or Get out of the way!"

Offline pfloor

  • ****
  • 889
  • +1/-0
Re: Help an extreme newbie to linux, im still windoze poisoned ;)
« Reply #4 on: September 07, 2008, 12:23:44 AM »
Another thing to remember (because you are a linux newbie)...

These instructions are SME specific.  They will not work on any other flavor of Linux as SME is the only distro that uses this template system (that I know of anyway).
In life, you must either "Push, Pull or Get out of the way!"

Offline arne

  • ****
  • 1,116
  • +0/-4
Re: Help an extreme newbie to linux, im still windoze poisoned ;)
« Reply #5 on: September 07, 2008, 12:35:58 AM »
Listen to pfloor and not to me  :o

Of course the modifications has to be done in the templates-custom tree.

My post was actually terribly wrong, forgetting this. (Except for the words about destroying the server ..)
......

Offline Trashman

  • *
  • 54
  • +0/-0
Re: Help an extreme newbie to linux, im still windoze poisoned ;)
« Reply #6 on: September 07, 2008, 01:25:37 AM »
YEAAAAAA, i didnt broke my server this time!!! can i kiss you pfloor? i followed your instructions and is working flawlessly, if i manage to get my wiki access ill add this info to the mailman wiki...or if any1 from documentation read this you are free to do that...the exact procedure to activate personalization in mailman contrib in SME server (this dont apply to other linux flavours):
(id suggest to use midnight commander if you are a total noob like me, its like the old times norton commander and its already installed with SME, just run mc on the shell)
- copy the entire folder mm_cfg.py from  /etc/e-smith/templates/usr/lib/mailman/Mailman/mm_cfg.py
- to /etc/e-smith/templates-custom/usr/lib/mailman/Mailman/mm_cfg.py creating the needed folders if they arent there (most probably)
- then edit: /etc/e-smith/templates-custom/usr/lib/mailman/Mailman/mm_cfg.py/30hostname adding this text to the last line:
OWNERS_CAN_ENABLE_PERSONALIZATION = 1
(im not sure if its important but respect caps and spaces, i did)
- exit mc if you used it and type:
expand-template /usr/lib/mailman/Mailman/mm_cfg.py
signal-event reboot
(not sure about the reboot either, but i wanted to be sure and worked for me)
- enter to your mailing list admin (yoursite.com/mailman/admin/yourlist) and go to non-digest and in "Should Mailman personalize each non-digest delivery?" choose either yes or full personalization, test both to see wich one do you like more...
- if you want to add a header with the person name as i wanted to do enter in "Header added to mail sent to regular list members" this:
Hello dear %(user_name)s
and mailman is going to replace the string with the name the person used when he/she subscribed...
(Maybe the same string works in the mail itself, not sure)

A warning is needed here, personalization is going to stress your server a lot, the mailings are going to take a lot of time to be sent as every message is generated individually, not in batches as usual, so use with extreme care and test before using in production

Id also suggest to read this *nix-crippled moron-proof pdf to set up the rest of the options needed to make it work as a newsletter/announce mailing:
http://www.publisherhost.net/newslettersetup.pdf
« Last Edit: September 07, 2008, 01:32:19 AM by Trashman »

Offline pfloor

  • ****
  • 889
  • +1/-0
Re: Help an extreme newbie to linux, im still windoze poisoned ;)
« Reply #7 on: September 07, 2008, 02:00:03 AM »
YEAAAAAA, i didnt broke my server this time!!!

Excellent!!!  And if you follow the "Template" schema every time, you should never "break" your server (at least not perminantly).

Quote
can i kiss you pfloor?

AHHHH NO, we hardly know each other :-)

You can however go here  http://www.smeserver.org/donate and make a donation if you like.

Quote
i followed your instructions and is working flawlessly, if i manage to get my wiki access...

I have granted you access, don't abuse it :-)
In life, you must either "Push, Pull or Get out of the way!"

Offline Trashman

  • *
  • 54
  • +0/-0
Re: Help an extreme newbie to linux, im still windoze poisoned ;)
« Reply #8 on: September 07, 2008, 02:09:42 AM »
Oh, thanks! ill add this info to the mailman wiki in a few mins...

Offline Trashman

  • *
  • 54
  • +0/-0
Re: Help an extreme newbie to linux, im still windoze poisoned ;)
« Reply #9 on: September 07, 2008, 03:01:00 AM »
Im noob to wiki`ing also, but i added the info to the mailman wiki, watch at it and make any suggestion you may consider, i think its well explained and short enough...i use mc because i honestly dont know the nix equivalent to common commands as copy and edit so some1 help me in that part i guess...
Also, should i add the pdf link to the "more info" or is a better idea to explain that info?

http://wiki.contribs.org/Mailman#Personalization
« Last Edit: September 07, 2008, 03:14:25 AM by Trashman »

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Help an extreme newbie to linux, im still windoze poisoned ;)
« Reply #10 on: September 07, 2008, 10:20:49 AM »
Im noob to wiki`ing also, but i added the info to the mailman wiki, watch at it and make any suggestion you may consider, i think its well explained and short enough...i use mc because i honestly dont know the nix equivalent to common commands as copy and edit so some1 help me in that part i guess...
Also, should i add the pdf link to the "more info" or is a better idea to explain that info?

http://wiki.contribs.org/Mailman#Personalization
The order is a bit wrong, first create the custom tree if it does not exist otherwise copying the files will fail. Furthermore I think there is no use to copy the whole tree if you only need to change one file, the risk of doing so is that changes made to original files are not ported as the custom templates always overwrite the stock ones, I have made some changes to the wiki page.

I also think you should not add the settings to the hostname page, but you should create a custom template for it as it has nothing to do with the hostname, I think.
« Last Edit: September 07, 2008, 10:31:17 AM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Trashman

  • *
  • 54
  • +0/-0
Re: Help an extreme newbie to linux, im still windoze poisoned ;)
« Reply #11 on: September 07, 2008, 03:03:31 PM »
Well, hostname its the file i edited and it worked, im very afraid to edit another one and break my server again :p
Here we need some1 that know more about how mailman works to bring some light to the matter...

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Help an extreme newbie to linux, im still windoze poisoned ;)
« Reply #12 on: September 07, 2008, 06:42:51 PM »
Well, hostname its the file i edited and it worked, im very afraid to edit another one and break my server again :p
Here we need some1 that know more about how mailman works to bring some light to the matter...
Not necessarily, knowledge of the template system in this case would be enough, hence my suggestion to create a new template file ans the parameter has nothing to do with the hostname, which makes things hard(er) to diagnose if things might go wrong (now or in the future) since a parameter like that is not expected to be inserted there if I only consider the template fragment name.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)