Archive

Archive for the ‘plesk’ Category

Extract list of email accounts from Plesk that have a mailbox and no redirect

February 13th, 2010 admin No comments
SELECT mail.mail_name, domains.name
FROM domains
LEFT JOIN mail ON domains.id = mail.dom_id
LEFT JOIN DomainServices ON domains.id = DomainServices.dom_id
WHERE mail.postbox =  'true'
AND mail.mail_group =  'false'
AND DomainServices.type =  'mail'
AND DomainServices.status =  '0'

Categories: plesk Tags:

Grep UID in Plesk from Qmail log

December 4th, 2009 admin No comments

Click on the header link in the mail server queue:

Received: (qmail 30501 invoked by uid 10077); 3 Dec 2009 21:47:42 -0500
Date: 3 Dec 2009 21:47:42 -0500
Message-ID: <20091204024742.30498.qmail@hostserver.com>
To: email@domain.com
Subject: This is a test.
MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1
From: <user@domain.com>

It says its invoked by uid 10077 which corresponds to the account on the /etc/password file:

-bash-3.2# more /etc/passwd | grep 10077
username:x:10077:2522::/var/www/vhosts/domain.com:/bin/false

Categories: plesk, unix / linux Tags:

Limit to Postini IP Range in Plesk

December 2nd, 2009 admin No comments
  • Login to Plesk and go to SYSTEM -> MODULES -> FIREWALL
  • Choose Add Custom Rule
  • Enter in a rule name
  • Choose what direction to match, in this case, incoming
  • Choose ALLOW
  • Enter in port 25
  • Leave as TCP
  • Press ADD
  • Enter in 74.125.148.0/22 in the five boxes, the fifth box being the 22 (no slash)
  • Press ADD
  • Press OK

That rule will accept Postini’s block. Then, to block the rest of the email:

  • Choose Add Custom Rule
  • Enter in a rule name
  • Choose incoming
  • Choose DENY
  • Enter in port 25 and press ADD
  • Leave the network space blank
  • Press OK

It is important that you have the rules in this order, otherwise all email will be denied. Ensure that the ALLOW is above the DENY in the display list when you are done, then commit the changes.

Source: http://www.experts-exchange.com/OS/Linux/Q_24418022.html

Categories: plesk Tags:

Transfer database between domains in Plesk

November 30th, 2009 admin No comments

If you are moving the database from one domain to another on the same server, and you want to keep the database name the same, you just need to change the owner of the database in the ‘data_bases’ table in the psa database.

The table uses the field ‘dom_id’ as a reference to the owner. Look in the ‘domains’ table to find the ‘id’ of the domain you are using and the one you wish to move to then make the change in the ‘data_bases” table.

Once changed, you will see the database listed under the new domain in Plesk. You can then add/change usernames and passwords through Plesk as normal.

You can do all the above through the command interface (SSH) or you can do it the easy way with a tool like phpMyAdmin installed.

Source: http://forums.serverbeach.com/showthread.php?t=164

Categories: plesk Tags:

Pulls FTP password out of Plesk database

November 27th, 2009 admin No comments
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -e "use psa; select accounts.password from accounts INNER JOIN sys_users ON   accounts.id=sys_users.account_id WHERE sys_users.login='xxxx';"

Categories: plesk Tags:

Reconfigure vhost in Plesk

November 27th, 2009 admin No comments
/parallels_plesk_panel_installation_directory/admin/sbin/websrvmng --reconfigure-vhost  --vhost-name=

On Centos 5

/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com

Categories: plesk Tags:

How to grep a mail log to see if a message bounced

May 22nd, 2009 admin No comments

Command:

tail /usr/local/psa/var/log/maillog -n10000 | grep "user@example.com"

Notes:

Better to tail than cat (in case its a big log)

-n10000 is going back 10000 lines

Add -f if you want to see a live feed of the log

tail -f /usr/local/psa/var/log/maillog | grep "user@example.com"

Source: http://www.woyano.com/view/578/How-to-grep-a-mail-log-to-see-if-a-message-bounced

Categories: plesk, unix / linux Tags:

View All Email Account Passwords in Plesk

April 14th, 2009 admin No comments

Run this in the psa mysql database to see all email passwords

SELECT accounts.id, mail.mail_name, accounts.password, domains.name 
FROM domains 
LEFT JOIN mail ON domains.id = mail.dom_id 
LEFT JOIN accounts ON mail.account_id = accounts.id

Run this modified version to see just a particular domain

SELECT accounts.id, mail.mail_name, accounts.password, domains.name
FROM domains
LEFT JOIN mail ON domains.id = mail.dom_id
LEFT JOIN accounts ON mail.account_id = accounts.id
WHERE domains.name = 'somedomain.com'

Source: http://www.search-this.com/2007/02/07/view-all-email-account-passwords-in-plesk/

Categories: plesk Tags:

Remove advertising (Top News) panel Horde

April 13th, 2009 admin No comments

Linux Route

cd / usr / share / psa-horde / templates / portal
vi sidebar.inc

Comment out the following block:

/ *
if (window.NewsFeeds) (
window.NFopen = (readCookie ( 'plesk_newsfeed_visible') == 'false')? false: true;
document.write ( ") document.write ( '&lt;tbody&gt;') document.write (") document.write ( ");
document.write ( ") document.write (") document.write ( '&lt;/ tbody&gt;
&lt;? php echo _ ( 'Top News');?&gt;
&lt;a href = "javascript: NFgetList ()" class = "btn-refresh" title = "&lt;? php echo _ ( 'Refresh');&gt;&gt;
&lt;? php echo _ ( 'Refresh');?&gt; &lt;/ a&gt;
&lt;a href = "javascript: NFcollapseList ()" class = "btn-open-close" title = "&lt;? php echo _ ( 'Open / Close');&gt;&gt;
&lt;? php echo _ ( 'Open / Close');?&gt; &lt;/ a&gt;
') Document.write ('
') Document.write ('
');
if (window.NFopen &amp; readCookie ( 'horde_sidebar_expanded')! = 'false')
NFgetList ();
)
* /

Source: http://translate.google.com/translate?hl=en&ie=UTF-8&sl=es&tl=en&u=http://blogs.clavedigital.com/ncastillo/2009/02/11/quitar-publicidad-top-news-del-panel-de-horde/

Categories: plesk Tags: