Jul 23

This is a tip for those who are using squirrel webmail. I have a user request to show HTML /picture on the squirrel email body and manually you can add the option by goin to your squirrel webmail -> Options -> Display Preferences -> Show HTML Version by Default:  -> and click Yes -> click the Submit button.

sqwebmail1

Okay it is easy right ? but if the user want all of the email account under your qmail mail server squirrel webmail by default set the Show HTML Version by Default to be Yes , what you gonna do ? set the squirrel mail account one by one 🙂 hmm i don’t think so. Here is some tips to changes the default user preference on squirrel webmail.

1.  The default preferences are stored in your data directory in a file called default_pref  it usually stored on your sqwebmail data in my case it is on /Web/apache/htdocs/mail.test.com/data/default_pref .  And every user have their own username.pref example /Web/apache/htdocs/mail.test.com/data/adityo@test.com.pref  .

Note that the default_pref file works only for users that don’t have an existing preference file (i.e. new users which haven’t logged in yet). If you want to add preferences to existing user accounts, you should edit (manually or by a script) their existing preference files. It’s not recommended to delete the preference files, since that will revert all preferences edited by your users, including such settings as their real names.

2. We need to set default_pref so it will be default setting for all new mail account
# vi /Web/apache/htdocs/mail.test.com/data/default_pref

full_name=
reply_to=
show_html_default=0 # -> changes it to 1 to enable Show HTML Version by Default
sort=0
show_num=100 #to set Number of Messages per Page
attachment_common_show_images=1 #to set Display Attached Images with Message to be yes

3. Okay we have edit the default_pref for new account and how about for the old account that already created ? you can create a new default.pref let say it is on /tmp/default.pref
# vi /tmp/default.pref
show_html_default=0 # -> changes it to 1 to enable Show HTML Version by Default
sort=0
show_num=100 #to set Number of Messages per Page
attachment_common_show_images=1 #to set Display Attached Images with Message to be yes
custom_css=sans-10.css #change the font to a custom one by using CSS

and go to your username.pref folder a
cd /Web/apache/htdocs/mail.test.com/data/
nd run this
#for l in `ls *.pref`; do cat /tmp/default.pref >> $l; done

Or if you want to use default_pre just run this
#for l in `ls *.pref`; do cat/Web/apache/htdocs/mail.test.com/data/default_pre > $l; done

it will changes your Squirrell webmail (SQWebmail) user preferences settings

Jul 22

The default quota attachment for qmail is 2 MB to setting this quota we should add this file:

# echo 5048576 > /var/qmail/control/databytes
It's mean that the quota 5MB