Routing the world

Routing & IT System Administration

Archive for September 2009

Merge two files line by line and strip tabs

with 2 comments

If you want to merge two files line by line you can use the next code:

cat file1 | paste - | paste file2 -

This code will insert a tab between the lines for each file, if you need to strip the tab you can use:

tr -d ' \ 011'

So, the final result will be:

cat file1 | paste - | paste file2 - | tr -d ' \ 011'

Written by Root

September 22, 2009 at 10:46

Posted in Linux

Tagged with

Process relay_recipients on Postfix

leave a comment »

If you need to edit the relay_recipients file on a Linux/postfix environment to make you changes to take effect after the save file you need to execute:

postmap relay_recipients

Written by Root

September 15, 2009 at 13:20

Posted in Linux

Tagged with

Process email aliases on sendmail

leave a comment »

When you use sendmail and you need to re-process the aliases file after the edition of the file to create the aliases.db you need to execute:

newaliases

Written by Root

September 15, 2009 at 13:18

Posted in Linux

Tagged with

Plesk Vhost reconfiguration

with one comment

This is the problem;

I have configured a new domain in a Plesk 9.0.1 Server. In this box there is around 50 domains working good, but in this the webmail does not work, it give me the Default Plesk Page.

I have searched the logs and there were a domian.com/horde/imp not found errors.
I could see in /etc/apache2/conf.d/zzz_horde_vhost.conf that the IP I have just added to the Plesk was not in the config file.

The first thing I do was to add the IP to the zzz_horde_vhost.conf but I didn’t want to make it by hand, so I switch off the webmail service from the server settings, and later switch on the webmail service, this give me the IP just added in the zzz_horde_vhost.conf.

The second thing I do was to make Plesk to reconfigure all the VHOST layer. To do this you have to login in a shell and write down:

/usr/local/psa/admin/sbin/websrvmng -a -v
This reconfigure all the Vhost Layer in a Plesk Server.

This is the Help for this command:
/usr/local/psa/admin/sbin/websrvmng --help
Usage: websrvmng [OPTIONS]...

-a, --reconfigure-all
create configuration files for all domains
-m, --change-admin-email --email=
change admin email
-n, --install-vhost --vhost-name=
creates virtual hosting in webserver (physical, frame forward, standard forward)
-u, --reconfigure-vhost --vhost-name=
webserver reconfiguration for one given host
-d, --remove-vhost --vhost-name=
removes virtual hosting from server
-i, --set-certificate --ip-address=
change certificate associated with IP address. Affects all SSL virtual hosts on given IP (SSL certificate should be changed on those hosts)
--set-default-domain --ip-address= --vhost-name=
sets default domain for IP address. Thus, all HTTP requests which have come on given IP and for which there is no appropriate domain, should come on given default domain
--reset-default-domain --ip-address=
delete default domain for IP address
--add-ip-address --ip-address=
adds IP address to webserver
--remove-ip-address --ip-address=
removes IP address from webserver
--add-protection --vhost-name= --directory=
adds protection to directory
--remove-protections --vhost-name=
removes protection from directory
--update-protection --vhost-name= --directory=
change protected directory properties
--add-web-user --vhost-name= --web-user=
add webuser to webserver configuration
--update-web-user --vhost-name= --web-user=
updates webuser configuration in webserver
--remove-web-users --vhost-name=
delete webuser from webserver configuration
--features
returns PHP code which reflects state of several features support in websrvmng.
--install-fp --vhost-name= --user-name= --port= --admin-name=
The noncrypted admin password is transferred in the environment variable PSA_PASSWORD
--remove-fp --vhost-name= --user-name= --port=

--enable-fp --vhost-name= --user-name= --port=

--disable-fp --vhost-name= --user-name= --port=

--rename-admin-fp --vhost-name= --user-name= --port= --new-name= [--old-name=]
The noncrypted admin password is transferred in the environment variable PSA_PASSWORD
--change-password-fp --vhost-name= --user-name= --port= --admin-name=
The noncrypted admin password is transferred in the environment variable PSA_PASSWORD
-w, --without-restart
without restart apache & tomcat. Can used with another options
-p, --start
start webserver
-o, --stop
stop webserver
-s, --status
webserver status
-r, --restart
restart webserver
-t, --restart-tomcat
with -p & -r restart tomcat
-v, --no-daemon
non-daemon mode without delay on restart apache
-h, --help
display this help and exit

I hope this information will be usefull.

Written by Root

September 14, 2009 at 14:31

Posted in Linux, Plesk

Tagged with

Reprocessing the Postfix Deferred Queue

leave a comment »

Sometimes you need to reprocess the Postfix Deferred Queue immediately, you cannot delay the process until the queue process time arrives.

If you want to reprocess the queue this is the command:

postqueue -f

Written by Root

September 3, 2009 at 13:52

Posted in Linux, Plesk

Tagged with

%d bloggers like this: