Hi I'm the new admin at dead.org I just picked this domain up from the last owner and he had a script that would when someone wanted an email forwarder they would fill out a form still viewable from the website (www.dead.org) just click on freemail.

Well I'm not really too concerned with forwarding anymore, as I would like to get a new mail subsection going where users can create there own pop3 accounts and manage em' by themselves such as setting up there own forwarders, auto-responders, etc.

But what does concern me is the previous 1-2k users that are in this (/etc/aliases *nix format) aliases file. I need some type of script to import this aliases file into the cpanels interface for it's forwarding option. I don't know if it's some type of database or what. I'm not good at scripting let alone programming so I thought I would ask here, and see if anyone knew how to interface with cpanels forwarder file.

Somehow his previous mail server new that any mail routed to it with one of those alias names would get automatically forwarded to the users realemail@domain.tld. I don't really know how to set that up again, let alone import these thousands of emails into the cpanel which is what I would sorda like, that way I could prune the list as I see fit.

If someone is bored and capable and wouldn't mind helping me out I sure would appreciate it.
***Disclaimer*** If you happen to goto http://www.dead.org and you are offended by the content, I don't really have anything to do with that, I'm just the "current" owner/admin for the time being. It's nothing like a rotten.com just some morbid poetry, and information about ways to die, hopefully it will become mostly a poetry site. So try and keep the remarks regarding the site to a minimum thanks

You might need to be patient - it's been a busy 36 hours on these forums

Anyway, on a cPanel server, the aliases are stored in:

/etc/valiases/domain

The format of your aliases file appears to be in the same format as required in the valiases files, so it is probably just a matter of copying the entries in the relevant domains file in /etc/valiases/

All of our valias files contain 'full address : full address' not just 'alias : full address'. I am unclear if your current file has full addresses or not. I have not tested to see if it works without a full address to the left of the colon.

I don't believe I have access to that directory because I am indeed an end user on this server my friend who owns the server could place it there but i figure if there is such a way to find/replace the first "<nick>:" before the users emailaddress directly after and append an @dead.org he could probably just pipe the contents of my aliases file into his.

Something about that doesn't sound right though, let's say hypothetically this was my server and my aliases file was in the format of user@dead.org: user@email.tld and it would be a simple append command to put my aliases into that valias file then would it show up as forwards in the cpanel. (hope that made sense)

You guys rock, thank you so much for the posts, you have been very informative and helpful as well as positive, it's really nice getting those kinda responses.

And to the one gentleman that mentioned he liked the site I appreciate that too, thanks
It used to be ran YEARS ago, but was taken offline but I kept the site admins email and mailed him the other day and he was like ya, let's try and get it back up and running so that's what I'm doing, hopefully a re-design won't take us too long.

God what I wouldn't give to be able to program scripts, and macro's, and things of that nature that would be soooooooo nice, I could automate myself right out of a darn job!

I assume since this is the Scripting thread you guys know a thing or two about scripting and programming scripts, just off topic do you think www.elementk.com would be a good place to start with some languages, I've programmed on and off through the years but never seriously, and it was all very broad never focused on just one language so I never specialized. But i'm familiar with coding and compiling and the likes but kinda flustered when it comes to finding a place to start. I figure something like perl in an *nix environment would be the best but still unsure.

Thanks for Everything,
Matt

***EDIT***
Ohh hell!!!! /etc/valiases/domain, okay that sounds right that way the aliases file would be specific to my domain, I guess I have a tendency to glance over stuff. YAY, okay so somehow get this aliases file into that valiases/deadorg directory and I'm homefree given it's in the correct format, and still don't know if it would show up under cpanel's interface in the email forwarding page.

let's say hypothetically this was my server and my aliases file was in the format of user@dead.org: user@email.tld and it would be a simple append command to put my aliases into that valias file then would it show up as forwards in the cpanel

Click to expand...

Yup, that's it. cPanel just reads the contents of that valiases file. I'd ask your admin and give him a lollipop for his efforts

I've been programming for, oooh, around 25 years now (I started young, BTW!). My language of choice now is perl. What language you choose, really does depend on what you want to do with it.

For example, if you want to do MySQL back-end web sites with pretty and powerful front-ends, the PHP might be your choice.

If you want an all purpose language that you can write server back-end scripts and dynamic web comtent, then perl might be a better bet.

If you want to develop client based applications, then there's a wealth of options in Java, C++, VB, and the list goes on.

At the end of the day, a programming language is just a matter of getting the damn PC to do what you want it to. The real skill is learning how to use that language for your own means, which does take time, experience and above all, enthusiasm.

Your greatest source for learning, is other peoples scripts together with a good course on how to program in a language that you would like to use to achieve something with now.

so somehow get this aliases file into that valiases/deadorg directory and I'm homefree given it's in the correct format

Click to expand...

Please do not be confused. The file name would be dead.org and the directory would be /etc/valiases/

You have to make sure that the file is chown'd correctly (accountname.mail) if you are going to replace it. Your server admin should be able to take care of that no problem if they are willing to load the file for you.

Ya, I understood you guys perfectly. I didn't repeat it back as well but I understood that /etc/valiases was the dir and dead.org was the file, either way nothing alittle cat aliases > echo > dead.org couldn't solve.
My aliases format was user: useremail@domain.tld, but I got it fixed to user@dead.org: useremail@domain.tld. So everything is fine now and working wonderfully..

...
...

Except that who know's how many of these forwards no longer goto valid addresses anymore... Ohh wo-uhz mee.....