Archive for August, 2013

Happy Birthday Debian! – Rejoice, Debian GNU / Linux turns 20 :)

Wednesday, August 28th, 2013

Debian Happy birthday cake with debian logo spiral - Debian Linux becomes 20 years old

 A bit outdated news but still worthy to mention as Debian GNU / Linux is important part of my life. On 16 of August this year Debian turned 20 years! I'm actively using Debian Linux for servers and Desktops over the past 13 years and for this time I've seen right before my eyes how debian grow and from buggy hobbyinst Linux distribution became a robust and rock-solid OS. Moreover Debian is now practically the most important Linux distribution around. Thanks to it currently a thousands of other world changing distributions like Ubuntu, Arch Linux, Knoppix Linux LiveCD, Linux Mint etc. Debian is truly multi platform as of time of writting supports 10 hardware architecture (platforms) – in this number Embedded devices like ARM processors, has translation of most shipped software to 73 languages and comes with about 20 000 installable software packages. Contribution of Debian GNU Linux for Free software community is immerse, hundreds of millions or even billion Debian servers or some kind of Debian based OSes are running all around the net. Besides that Debian is one of the largest if not the biggest and most influential Open Source Project. By its essence existing of Debian is just a miracle. 
Though out of date again,  lets great each other with Happy Debian Anniversary and Wish Debian a many and healthy years of successful development!

Share this on

Fix Apache [error] [client] PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0

Wednesday, August 14th, 2013

I have a busy Linux server with 24 cores each running on ..4 Ghz. Server is configured to server  Apache and MySQL queries and a dozen of high traffic websites are hosted on it. Until just recently server worked fine and since about few days I started getting SMS notifications that server is inaccessible few times a day. To check what's wrong I checked in /var/log/apache2/error.log  and there I found  following error:

[error] [client] PHP Warning:  Unknown: Input variables exceeded 1000.

To increase the limit change max_input_vars in php.ini. in Unknown on line 0 referer:

Before I check Apache error.log, I had a guess that ServerLimit of 256 (spawned servers max) is reached so solution would be raise of ServerLimit to more than MaxClients setting defined in /etc/apache2/apache2.conf. After checking /var/log/apache2/error.log I've realized problem is because the many websites hosted on server exceed maximum defined variables possible to assign by libphp in php.ini. maximum possible defined variables before PHP stops servering is set through max_input_vars variable

As I'm running a Debian Squeeze Linux server, here is what is set as default for max_input_vars in /etc/php5/apache2/php.ini:

; How many GET/POST/COOKIE input variables may be accepted
; max_input_vars = 1000

So to fix it in php.ini just raised a bit setting to 1500, i.e.:

max_input_vars = 1500

Though I hit the error on Debian I assume same error occurs on Redhat RPM based (Fedora, CentOS, RHEL Linux) servers.
Hence I assume

max_input_vars = 1500

or higher should fix on those servers too. Looking forward to hear if same error is hit on RedHats.

Enjoy 🙂

Share this on

Testament of a great saint – Testament of Saint John of Rila – Spiritual guidance for people from last ages

Thursday, August 8th, 2013


[1.] I, John, the humble and sinful, who has never done anything good on earth, when I came into this wilderness of Rila, I found no man over here, but only wild animals and impenetrable thickets. I settled alone in it among the wild animals, without food nor shelter, but the sky was my shelter and the earth my bed and the herbs my food. But the good Lord, for the love of whom I disregarded everything and endured hunger and thirst, frost, the heat of the sun, and corporal nakedness, did not abandon me, but like a merciful and child-loving father he lavishly satisfied all my needs. What shall I contribute to the Lord for all he has given me? Many are his benefactions to me, for he looked from his holy height at my humbleness (cf. Luke 1:48) and lent his support to me to go through everything—not I, but the might of Christ, which is in me—because every good gift and every perfect gift is from him (James 1:17).

[2.] Seeing you today gathered together in the Lord here, where, as I told you, no man has dwelled until now, but only wild animals, and foreseeing that the end of my life here is soon coming on, because of this I made up my mind, before my departure (II Tim. 4:6) from life here, to leave you the present fatherly testament of mine, just as carnal fathers leave their children an earthly inheritance of silver and gold and other property, so that when you commemorate your father in the Holy Spirit, you do not forget his testament.

[3.] I know, my beloved children in God, I know you very well, that you, being beginners, are not confirmed yet in the monk’s life, but fear not, for the Lord’s "power is made perfect in weakness" (II Cor. 12:9). Just because of this I made up my mind to write for you this rough and ignorant testament of mine, so that you will keep it always in your minds to become stronger in body and soul, in the Lord, and go forward through the virtues in fear of God. Because I believe in my God, whom I have served since my youth and to whom I submitted zealously, after my departure, this wilderness, which until now was terrible and uninhabited, will be inhabited by a multitude of desert-citizens. What was written about it will be fulfilled: "The desolate hath many more children than she which hath a husband" (Is. 54:1; Gal. 4:27).

Св. Йоан Рилски. Стенопис от XIV в. в църквата на Земенския манастир.[4.] Because of this I beg you, my children, whom I have gathered in the Lord, I beg of you, my flesh and blood, do not neglect your father’s admonition and together with the apostle I say: “I am in travail again until Christ be formed in you” (Gal. 4:19). I beg you and make you swear on the dread name of God not to violate or abandon anything after my death, but everything I have written let be carried out, as it is written and as you have promised before God. Whosoever oversteps or violates something of it, let him be damned and separated from the Father and the Son and the Holy Spirit, to have no share with the saints, who were pleasing to God ages ago, but let his share be with those who had crucified the Lord of Glory (Acts 7:2) and with his betrayer Judas, to be erased from “the book of life” (Phil. 4:3) and not to be inscribed [in it] with the righteous.

[5.] First of all, I bequeath to you the obligation to preserve the holy faith immaculate and unaffected by any false teaching, just as we received it from the holy fathers, without "being led away with diverse and strange teachings" (Heb. 13:9). Hold fast and keep the traditions you have heard and seen from me. Do not deviate either to the right, or to the left, but walk along the royal road. Keep yourselves carefully away from worldly fascinations and always remember why you have come out of the world, and why you have despised it and worldly things.

[6.] Now again, keep yourselves away from the avaricious snake, “for the love of money is the root of all evil” (I Tim. 6:10), according to the apostle, who calls it a second idolatry. Because for the hermit wealth consists not in silver and gold,5 but in perfect poverty, in the denial of his personal will, and in lofty humbleness. I am not telling you this as my commandments, but [I am] recalling for you the commandments of Christ. For he told his holy disciples and through them everybody who had renounced the world: "Take no gold, nor silver, nor a bag, nor copper in your belts" (Matt. 10:9) and so on. For gold and silver are great enemies of the monk and bite those who have them like a snake.

holy relics of-one of greatest saints of all times Bulgarian saint John of Rila Rila mountain bulgaria

[7.] If we, however, have undoubted hope in God, he will not leave us deprived of anything, for he himself says: “A woman may forget her children, yet will I not forget thee” (Is. 49:15). Also in another place: “But seek first the kingdom of God, and his righteousness; and all these things shall be yours as well” (Matt. 6:33). For in the beginning, when I came to this wilderness, the sly enemy attempted to allure me, for the pious king sent to me a lot of gold.6 For the sake of God I refused to see him, for I understood that it was a perfidy of the devil. I did not accept it, but returned it to those who sent it, for I thought to myself: “If I wished to have gold and silver, and suchlike things, why came I into this terrible and impenetrable wilderness, where I found no man, but wild animals?” So I saved myself from the intrigues of the sly tempter, who endeavors to trip us up in those things, which we renounced willfully. That is why you are not to look for any of these things, “for your heavenly Father knows that you need them all” (Matt. 6:32) before your prayer [is offered].

[8.] Nor look to be recognized and beloved by earthly kings and princes, nor put your hope in them, leaving the heavenly King, with whom you enlisted to be soldiers and "wrestle not against flesh and blood," but "against the ruler of the darkness of this world" (Eph. 6:12). For the prophet Jeremiah also threatens us speaking so: "Cursed be the man that hopeth in man" and the rest. Enumerating the evils, he adds that "blessed is the man that hopeth in the Lord" (Jer. 17:5-8). Do not say: "What shall we eat, or drink, or in what shall we be dressed?" for the gentiles seek after these things. "Look at the birds of the air: for they neither sow nor reap, nor gather into barns; yet your heavenly father feeds them. Are you not of more value than they?" (Matt. 6:26). As soon as you have come out of the world, do not go back, neither with your body, nor with your mind, for, as it is said, "No man, having put his hand to the plough, and looking back, is fit for the Kingdom of Heaven" (Luke 9:62).

[9.] The Apostle [Paul] too, however, teaches us to "forget what lies behind and strain froward to what lies ahead" (Phil. 3:13). What does "forgetting those things which are behind" mean, my children? Nothing else except to deliver to oblivion all those things which, coming out of the world for God’s sake, we have left and despised, and to strive towards the feat which lies before us, to which we were called by our taskmaster, our most gracious God and Lord Jesus Christ, who has enabled us to endure his gentle yoke, "For his yoke is easy, and his burden is light" (Matt. 11:30).

[10.] As the grace of the Holy Spirit brought you together, so must you endeavor to live with one heart and one mind and one spirit, directing your eyes only towards the eternal reward, which God has prepared for those who have loved him. The communal life is in every way more useful for monks than the solitary one, for solitude is not suitable for the many, but only for a few who are perfect in all monastic virtues. The common life, on the other hand, is useful in general for everybody, about which the patristic books tell us and teach us sufficiently. The spirit-speaking prophet David glorified it saying: "See now what is so good and so pleasant as for brethren to dwell together in unity!" (Ps. 133:1). In addition to this, one spirit-moved ecclesiastical hymn writes in this way: "Because in this the Lord promised eternal life." But also our good Master Lord God Jesus Christ, does he not say to us himself, by his immaculate lips: "Where two or three are gathered together in my name, there I am in the midst of them"? (Matt. 18:20). Our God-bearing fathers say for the solitary life: "Woe to him that is alone when he falls; and there is not a second to lift him up" (Eccl. 4:10).

[11.] That is why, children, as the Holy Spirit through the mouth of the prophet glorifies the communal life, do you not neglect it either, but on the contrary, confirm it and be like "one body in the Lord" (Rom. 12:5), which has different members. Some of them form, however, the head which governs, others the feet which toil and bear, so that there is formed from all a single spiritual body in the Lord, created with a single mind and logical spirit, and directed by spiritual reasoning, in no wise having divisions. When such a dwelling and life in God is arranged, then he himself will be in the midst of you, governing you invisibly.

[12.] Do not seek the first place and authority, but remember those who have said: "If one would be first, he must be last of all, and servant of all" (Mark 9:35). Elect for yourselves preceptors and appoint superiors, whom God will show you, that is, men "of good report" (Acts 10:22) among everybody in spiritual matters and surpassing everybody in intelligence and spiritual discernment, and able to pasture well and comfortably the flock entrusted to them down the meadows of piety and of the life-giving commands of Christ. For these men it is proper to seek confirmation more from God than from our opinion.

      7. According to Goshev, "Zavetât," pp. 449–61, this author’s Parainesis had been available in a Slavonic translation since the reign of Symeon (893–927).

[13.] If, as our great father and monastic preceptor, the reverend Ephraem Syrus says,7 all of you begin to desire authority and presidencies, and all of you to be abbots, and all of you preceptors, and interpreters, and teachers, and among you spring up rivalries, quarrels, disputes, zealousness, calumnies, haughtinesses, envy and other passions indecorous for monks, then certainly be aware that Christ is not among you, for Christ is not the teacher of discord and dissent, but of peace and unity. For he prays to God the father for his holy disciples to be united, that is, of one mind—they themselves and everybody who believes in him through them, and says as follows: "Holy Father, keep them in thy name that they may be one, as we are" (John 17:11). In another place: "I do not pray for them only but also for those who believe in me through their word that all may be one" (John 17:20–21). If you will be one, be at peace one with another. For he said to his disciples, "Peace I leave with you, my peace I give you." (John 14: 27) For such is this peace of Christ, children, that again he speaks, saying, "Not as the world gives, do I give to you" (John 14:27). But this peace of Christ surpasses every mind. This is the peace, about which the prophet talks: "And his peace has no bounds." But also the apostle teaches us saying: "Strive for peace with all men and for the holiness, without which no man shall see God" (Heb. 12:14). May you have such a peace, now, among you, and let you arrange everything for God with great unity of mind and heart, so as not to enrage your own God and master.

[14.] If somebody is found among you who sows weeds, discords and other temptations, you have to eliminate at once such a man from your assembly, so that this will not be transfigured into a devouring canker, according to the apostle, and not to spread the evil among the good ones, and “lest any root of bitterness spring up and cause trouble by it, and the many be defiled” (Heb. 12:5); and the wicked wolf not trouble the peaceful flock of Christ, because this sort [of men] will appear. For of them Christ prophesies saying: "For it is necessary that temptations come; but woe to the world for temptations to sin!" (Matt. 16:7). For this and you, children, keep away from these things and do not allow them to live among you, but divert them away from yourselves as the shepherd chases away the scabby sheep from the pure flock.

[15.] Living together for the Lord’s sake and bearing the burdens of one another, do not neglect those who live in solitude and "wandering over deserts and in mountains, and in dens, and in caves of the earth, of whom the world was not worthy" (Heb. 11:38), but supply them as much as you can, in order to hold them as your petitioners before God, for the prayer of the pious may achieve much.

      8. For the translation of some of the late antique classics of ascetic literature into Slavonic, see Dujcev, "Réforme," p. 262.

[16.] Instruct yourselves in the Lord’s law day and night (Ps. 1:2). Read often the patristic books and try to be imitators of our holy fathers Antony, Theodosios and the others, who shone like lamps in the world with their good deeds.8 Hold firmly to the church rule, leaving or neglecting nothing of this, which is established by the holy fathers.

[17.] Manual labor must not be neglected by you, however, but work must be in your hands, and the prayer “Lord Jesus Christ, Son of God, have mercy on me, a sinner” must be permanently on your lips, as well as the memory of death in your mind. This was the practice of the ancient desert fathers. They did not eat their bread in vain, and they not only lived themselves by labor of their own hands, but they gave to the needy too, and so they were not disappointed in their hope. “For,” says the apostle [Paul], "it is well that the heart be strengthened by grace; not with foods which have not benefited their adherents" (Heb. 13:9). He says too: "Let brotherly love continue. Do not neglect to show hospitality to strangers; for thereby some have entertained angels unawares" (Heb. 13:1–2).

[18.] Establish the newly enlightened from your own race in the faith and instruct them to abandon the indecent pagan rites and the evil customs which they keep even after the acceptance of the holy faith. But they do this because of ignorance, and thus they need to be brought to their senses.

[19.] I had much more to say to you, my beloved children in the Lord, but it is impossible to write everything. I deliver you to him who is the source of all wisdom and reason, and the true Comforter— to the Holy and life-giving Spirit, in order that he himself gives you wisdom, to bring you to your senses, to enlighten you, to teach and instruct you in every good deed.

[20.] Now I leave you our beloved brother Gregory for instructor and superior in place of me, about whom all of you testify that he is able to govern you well and according to God, and you elect him by consensus as superior, even though he does not want it, but because of obedience and humility he acquiesces to your request. After him, [choose] whomever God will show you. As for myself, I wish henceforth to live in quiet and silence, to repent my sins and to beg mercy of God. Have mercy on me, your sinful father, always in your prayers that I may receive mercy on judgment day, for I have done nothing good on earth and fear that judgment and torment prepared for sinners like me. So may the blessing of God be with you all, guarding and protecting you from all evils. Amen.

I have written this in the year from the creation of the world 6449 ( = A.D. 941) on the twenty-fifth day of the month of March.

I, the humble and most sinful John, first inhabitant of the wilderness of Rila, sign with my own hand and confirm the above-written [testament].

© 2000 Dumbarton Oaks
Trustees for Harvard University
Washington, D.C.
Printed in the United States of America

Rila: Testament of John of Rila

Date: 941 Translator: Ilija Iliev

Here is also some more information of Rila Monastery for those who want to learn more what is consequence of a living of a great saint.

The monk John laid the foundations for what was to become the greatest monastery of medieval Bulgaria circa 930–31 in the mountains to the east of the Struma river valley in western Bulgaria.2 Born around 876–880, not much more than a dozen years after Boris-Michael (852–889), ruler of the Bulgars, had accepted Christianity in 865, John began his monastic career at the monastery of St. Dimiter near his birthplace, then lived for many years as a hermit. His final settlement was a site north of the Rila river, to the east of the present Rila monastery. Remains of the foundations of the first buildings are to be seen in the meadows south of the hermitage dedicated to St. Luke.3 Jealous of his independence, John refused to welcome the Bulgarian ruler Peter (927–969), who came to pay him homage. John’s Testament, translated below, was issued March 25, 941 to regulate the cenobitic community and is his only literary work. John then retired to his accustomed solitary life, and died on August 18, 946. He was a popular subject among hagiographers; seven lives in Bulgarian and two in Greek were composed between the twelfth and the nineteenth centuries.


B. Subsequent History of the Monastery in Medieval Times

Little is known about the Rila monastery during the Byzantine dominion over Bulgaria (1018– 1185). The earliest Slavonic life of John of Rila, the so-called "Popular Life," was composed in Bulgarian towards the end of this period, as was the first life in Greek, authored by George Skylitzes, an official on the staff of the Byzantine governor at Srédetz (modern Sofia) during the reign of Emperor Manuel I Komnenos (1143–1180), that now survives only in a Slavonic translation.5 The monastery’s fortunes revived considerably later during the Second Bulgarian Empire (1186–1396). Rila and several other monasteries, richly endowed by the Bulgarian rulers with new lands and villages, seem to have enjoyed considerable prosperity in the fourteenth century.6 There is also a charter of 1378 preserved in the monastery of the last Bulgarian king, Ivan Shishman (1371– 1393), that confirms the tax exemptions of the monastery’s existing properties and awards new lands as well; it refers to similar charters now lost that earlier Bulgarian monarchs had awarded to the monastery dating back to the middle of the thirteenth century.

Earlier in the fourteenth century, Rila had benefited also from a local patron, the protosebast Hreljo, a local lord and sometime vassal of the Serbian tsar Stephen Dusan (1331–1355), who erected a new monastery on the site of the existing Rila monastery, to the west of John’s original foundation, which continued in operation as the "Old Hermitage." Hreljo built a 75-foot protective tower, still preserved, in 1335. It included living quarters for Hreljo and his family as well as a chapel on the top floor dedicated to the Transfiguration.7 A brick inscription records Hreljo’s erection of this structure. In 1343 he also built a stone church, which survived until 1834. There were similar towers built at this time for the monasteries on Mount Athos (see (51) Koutloumousi [A4]), and there is one still existing at the Hilandar monastery. Forced to become a monk at the order of Dusan, who distrusted his loyalty, Hreljo was strangled to death by hired assassins in his tower in 1343, probably also at Dusan’s instigation. Hreljo’s gravestone, broken into many pieces, is preserved in the monastery’s museum and speaks of his entry into the monastery and unnatural death.8

In 1385, Dometian, the monastery’s superior, had John’s Testament recopied while hiding away the original along with the foundation’s other valuables for fear of the Turks, who had taken Srédetz in 1382. At about this time too Evtimij, the last Bulgarian patriarch of Turnovo, wrote his widely popular version of the Life of John of Rila.


C. Rila under Ottoman Rule

The Turkish sultans Beyazid I (1389–1402) and Mehmet I (1413–1421) issued firmans confirming the privileges Rila had received earlier from Bulgarian monarchs, but this did not save the monastery from later depredations, with the result that it was abandoned by the middle of the fifteenth century.9 There was a revival, however, in the second half of the century. Around 1460, the three brothers David, Joasaf and Teofan, sons of a certain Jakov, bishop of Krupnik, worked to strengthen and repair the damaged buildings. Shortly thereafter, a pact was reached in 1466 with the Russian monastery of St. Panteleemon on Mount Athos obliging Rila and the former institution to assist one another as needed in the future. Permission was obtained from the Turkish authorities in 1469 to transport the relics of John of Rila from Turnovo, the old capital of the Second Bulgarian Empire, where they had been since 1195. The translation considerably increased the Rila monastery’s prestige. A dependency (metoh) dedicated to Sts. Peter and Paul was built to the southwest of the main monastery in 1478.

Firmans issued by sultans Beyazid II (1481–1512) in 1498, Selim I (1512–1520) in 1519, and Murad III (1574–1595) confirmed the monastery in the possession of its properties, but like the earlier series of firmans, these did not succeed in protecting the foundation from the depredations of various brigands.10 Beginning in 1558–59, the monks succeeded in establishing direct relations with Russia, whose rulers they hoped would be sympathetic to their complaints of oppression at the hands of their Ottoman masters.

Despite extremely difficult conditions, which continued well into the second half of the eighteenth century, including attacks by robbers in 1766 and 1779, the monastery not only managed to survive but served as a kind of center of Bulgarian culture. Additional churches were built as dependencies towards the end of the eighteenth century and in the early years of the nineteenth century, then a complete reconstruction of the main monastery was begun in 1816.11 A fire in 1833, however, destroyed all the buildings there except for Hreljo’s tower and his fourteenthcentury stone church. The monastery was rebuilt once again in 1834 while the church was torn down to make room for a larger structure; both the monastery and the nineteenth-century church still stand today, along with Hreljo’s tower, the only medieval structure preserved on the site. Analysis Experts have endorsed the essential authenticity of the document.12 It is an example of the testamentary genre of monastic foundation documents, whose author seems to have made some use of (3) Theodore Studites and even (4) Stoudios.13 There are indeed some resemblances to the former document, such as the statement of purpose [3], the prohibition of changes [4], and the admonition to preserve the faith [5]. The use of the wilderness topos in the brief foundation history [1] also has a close parallel in (29) Kosmosoteira [1], a twelfth-century document. On the whole, however, this is a distinct document with its own concerns for the ordering of monastic life at Rila.


A. Lives of the Monks

Like his Stoudite predecessors, John of Rila endorses [10] the cenobitic lifestyle, but also urges his monks to establish [15] relations with and support neighboring solitaries. This coexistence of cenobitic and eremitic lifestyles, prefigured in John’s own career, would be one of the notable characteristics of Byzantine monasticism. The author demonstrates an acquaintance with the ascetic tradition of late antiquity, quoting [13] Ephraem Syrus and recommending [16] the study of patristic literature, in particular the Lives of St. Antony, founder of anchoritic monasticism, Theodosios the Koinobiarch, “and others” as well as respecting canon law. John also invokes [17] patristic authority for the practice of manual labor.


B. Constitutional Matters

While there is genuine disciplinary content in this document, its chief purpose, as in most testaments, was to designate [20] a successor, here the monk Gregory. John then announces his intent to retire into seclusion as part of an arrangement for assuring an orderly succession to the superiorship that is similar to that proposed in the eleventh century in (22) Evergetis [13]. C. Financial Matters

Aside from the commitment to self-sufficiency that seems implicit in his endorsement of manual labor, there are no indications of how John expected the foundation to support itself financially. He proudly asserts [7] that he refused a royal donation, perhaps an annuity like the solemnia attested in Byzantium in the tenth century, and he advises [8] his community not to seek favors from “earthly kings and princes” [8]. This deliberate shunning of material support is unusual. Many later founders did not fear for the independence of their foundations when accepting imperial largess or tax exemptions (e.g., (13) Ath. Typikon [36] or (19) Attaleiates [22]), nor did Rila itself long after John’s death. As Dujcev ("Réforme," p. 263) surmised, John probably was concerned about Bulgarian monasticism being too submissive to secular authority, understandably given the prior history of Bulgarian monasticism under royal patronage.


Share this on

Psychological instability and the gap between desire and reality

Wednesday, August 7th, 2013

sad reality - bulgarians see no future, protests in bulgaria are the least people can do

I'm in Sofia just for a few days and I'm stunned how expensive is life here if compared to people's revenues. I think it is almost impossible to live normal live in Sofia with money lower than 500 eur. I'm here for a  4 day with my Belarusian girlfriend and I'm trying not to spend too much and already spend about 200 EUR. This makes 50 euro per two person a day and this is just for going outside public transport Metro, Buses and taxis. This makes about 50 euro per day or 25 euro a day required for person to live normal (not at all luxury life) … It is no strange that people are protesting for already about 50 days here in Sofia and that Bulgarians are heavily drinking and smoking and don't want to work. Our Bulgarian nation is depressed and there is a good reason for that. We are forced to live almost like animals. There are no money for renovation the buildings, no money to eat properly, young people's morale is totally messed up for the reason culture here is almost dead or even the one that's left is heavily  connected with godlessness, sexuality and consumerism. It is no strange our structures politics and infrastructure here is so messed up. It all starts with people's messed heads and all this gets materialized in our daily lives … Money are the main aim of living of young people and life here is made in a way that you have to only strive after money and for money you should learn to do anytihng … I just don't understand how we ended up here, its quite a pain especially as I lived in end up communistic Soviet time sand I remember people was not so much after money as there was money for normal almost middle class life in Socialistic Bulgaria … There are plenty of knowledgeable people in my dear homeland. Plenty of brilliant and good people but most emigrate for the reason here conditions of living has become extremely abnormal. Truth is European union totally smashed us. With all this shop chains in Western model like Lidl and Billa  made just to collect even our last money and the lack of industry, if something doesn't change ASAP we will simply be cleaned up of the face of the world or at least noone will stay in this country. There are plenty of emigrants already, the problem is even in western europe and most other countries there is big problem with unemployment so even if we Bulgarians try to go out we can't find job. I know this post is a big rant but I feel sad for my beautiful homeland. We have one of the most beautiful natures in Europe, we have Sea Beaches and Mountains, we have culture of 15 centuries and own well developed language. But it seems we're loosing our identity day by day. Almost everywhere you go you hear some music in English – even though most people in Bulgaria do not speak decent English and are far from understanding music in English I more and more think there is almost straight logic information in English. Most song lyrics are just fractured and incomplete or messed up, mostly speaking about evil than good. It is tragedy how young people spend there time here in Bulgaria for nothing hanging in pubs and bars spending money for alcohol and cigarettes trying to waste themselves for the only reason they see no future …

Share this on

Install postfix on Debian Wheezy Linux / Postfix mail server with Dovecot and MySQL user storage on Debian Wheezy 7 Linux

Monday, August 5th, 2013

postfix Debian GNU Linux logo picture install and configure postfix with dovecot on Wheezy debian 7 Linux

I have recently installed Postfix on a server following ISPMail Tutorial on Debian Wheezy Linux 7. Officially as you can see on their website there is no official guide still for Debian Wheezy yet. Therefore my only option was to follow ISPMail tutorial using Postfix 2.7 (Debian Squeeze).

It was quite a struggle to adapt tutorial for Squeeze deb to Wheezy and it took me an  overall time of about of week (each day spending few hours trying to make various components of tutorial) work. But finally I managed to install it. This is how this article got born in hope that in future it will help others have a decent Postfix install on Wheezy.. 

For those unfamiliar with's ISPMail Postfix Tutorial it is pretty much standard step-by-step installation guide for dummies similar to or Thibs QmailRocks Updated Installation Guide.

In Other words  is probably the best Postfix full featured install tutorial currently online as of time of writting this post. is great for people who want to run full featured; 

Postfix SMTP configured to support;


  • Postfix to support Mail Virtual Domains (store E-mails in MySQL database)
  • Dovecot Secure IMAP / IMAPS / POP3 / POP3s server to offer Pop3 and Imap remote access
  • Support Properly Generated SSL Certificates for POP3s and IMAPs
  • Anti Spam – SMTPD restrictions, SPF,  RBL,  Greylisting
  • Install web frontend to support Web E-mail Domaim / Accounts easy administrations for users stored in MySQL db
  • Amavisd-New (to protect Mail server from Spam)
  • Postfix WebMail frontend with Roundcube or Squirrelmail

Here is the big picture as it gives good idea on how all above components correspond to each other:

how postfix dovecot amavis clamav and spamassassin work postfix the bigpicture

So here we go:

1. Install Postfix necessary  debian packages

a) Install Postfix / MySQL / phpmyadmin and Postfix support for MySQL mail storage deb packs


apt-get update

apt-get upgrade

apt-get install –yes ssh
apt-get install –yes postfix postfix-mysql
apt-get –purge remove 'exim4*'
apt-get install –yes mysql-client mysql-server dovecot-common dovecot-imapd dovecot-pop3d postfix libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl telnet mailutils
apt-get install –yes mysql-server phpmyadmin


b) Install deb packages for Dovecot and Imap Support as well as Roundcube and / or Squirrelmail for Webmail support


apt-get install –yes dovecot-pop3d dovecot-imapd dovecot-lmtpd

c) Install packages deb packages for Anti-spam greylisting (tumgreyspf)


apt-get install –yes tumgreyspf

2. Create necessary MySQL database structures

Next step is toconnect to MySQL as root via MySQL CLI or PhpMyadmin and  CREATE new user "mailuser" and new database "mailserver", then create basic structure for "mailserver" database – i.e. sql tables ("virtual_domains", virtual_users", virtual_aliases")
These user and database is used laters by Dovecot server  to connect and  fetch emails from MySQL on user request via POP3 or IMAP. I've taken all the SQL requests and from's site and placed them in one SQL file:

Below is mysql cli query to import it. If you prefer more user friendliness do it via PhpMyAdmin with a copy / paste from file or with PhpMyAdmin import



 wget -q
mysql -u root -p < create-postfix-mysql-user-database.sql

Link to create-postfix-mysql-user-database.sql is here

3. Setting up Dovecot required users and directories

Next its necessary configure some users and create directories where Dovecot will store its configuration files. Dovecot requires to create its custom files for each existing users in MySQL database. Therefore whenever user receives or sends e-mail or is simply created Dovecot also creates a user directory structure in /var/vmail/, for exmpl.:


# ls -al /var/vmail/
total 20
drwx—— 4 vmail vmail 4096 jul 29 09:15 .
drwx—— 3 vmail vmail 4096 jul 29 07:20 ..
drwx—— 3 vmail vmail 4096 jul 29 09:15 .imap
drwx—— 2 vmail vmail 4096 jul 29 09:15 INBOX
-rw——- 1 vmail vmail   24 jul 29 09:15 .subscriptions

The functions of Dovecot server again are:

  • Get emails from Postfix (MySQL database) and save them to disk
  • Allow mail users to fetch emails using POP3 or IMAP protocol with Outlook / Thunderbird whatever pop3 client

    groupadd -g 5000 vmail
    useradd -g vmail -u 5000 vmail -d /var/vmail -m
    chown -R vmail:vmail /var/vmail
    chmod u+w /var/vmail
    chgrp vmail /etc/dovecot/dovecot.conf
    chmod g+r /etc/dovecot/dovecot.conf
    chown root:root /etc/dovecot/dovecot-sql.conf
    chmod go= /etc/dovecot/dovecot-sql.conf


4. Create self-signed SSL certificate for Postfix mail and Dovecot pop3 server



openssl req -new -x509 -days 3650 -nodes -out /etc/ssl/certs/dovecot.pem -keyout /etc/ssl/private/dovecot.pem
chmod o= /etc/ssl/private/dovecot.pem
/etc/init.d/dovecot restart
openssl req -new -x509 -days 3650 -nodes -out /etc/ssl/certs/postfix.pem -keyout /etc/ssl/private/postfix.pem
chmod o= /etc/ssl/private/postfix.pem


5. Configuring Amavis (Anti Virus frontend) with Clamav AV

To reduce viruses it is a must nowadays to install Antivirus in Qmail I used qmail-scanner (perl script) frontend to Clamav Antivirus to check for Viruses and some messed up e-mails. In Postfix just like in Sendmail, tool that does the same is amavisd-new.  There are some configuration files to do, but as its time consuming to do changes one by one I prefer moving old /etc/amavis/ to /etc/amavis-bak/ and download and untar archive with already set  proper configs


apt-get install –yes amavisd-new
useradd clamav -g amavis
mv /etc/amavis /etc/amavis-old
cd /etc/
tar -zxvvf amavis-config-debian-wheezy-7.tar.gz

/etc/init.d/amavis start
Starting amavisd: amavisd-new.

Amavisd is meant to communicate in two port numbers with Postfix. Postfix passes Input in one (10024) and Output – Scanned File Status in (10025). Thus for normal amavis operation this two ports has to be showing as listening on localhost, e.g.:


netstat -nap | grep -E '10024|10025'
tcp        0      0*               LISTEN      13957/amavisd-new (
tcp        0      0*               LISTEN      9007/master     


6. Placing Dovecot working (properly configured) config files for Debian Wheezy

On there are plenty of configurations to copy paste inside files and how it is explained is a bit complicated thus played a lot mainly with /etc/postfix/ and /etc/postfix/ configurations until I finally had a working version of (SMTP) configured not to be an open relay and receive / sent email OK …
Here are configurations that worked for me:


mv /etc/postfix /etc/postfix-old
cd /etc/
wget -q
tar -zxvvf postfix-configs-debian-wheezy.tar.gz
… …..

[ ok ] Stopping Postfix Mail Transport Agent: postfix.

[ ok ] Starting Postfix Mail Transport Agent: postfix.


To download my good postfixs-debian-wheezy.tar.gz look here

Afterwards only setting you have to change in /etc/postfix/ is:


myhostname =

to your Fully Qualified Domain Name (FQDN), lets say

myhostname =

I find it also useful to remove from SMTP after connect banner reporting that Postfix is running on Debian in change:

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)


smtpd_banner = $myhostname ESMTP $mail_name


7. Placing Dovecot working config files in /etc/

Configuring Dovecot is not an easy task in Debian Linux Squeeze and Lenny, on Postfix ISPMail guide there is a special tutorial for each as there is none yet for Debian Wheezy. It took me long to figure it out how to translate from old config settings for Wheezy's Dovecot 2.1.7-7. Configuration files places has changed for some clarity in Dovecot 2.1.7-7. So many of the Workaround.rog's Squeeze Tutorial suggested changes in /etc/dovecot/dovecot.conf are to be made in files under /etc/dovecot/conf.d

Therefore quickest way to have working Dovecot is to move default config dir /etc/dovecot to /etc/dovecot-old and place tuned configs:

cd /etc/
wget -q
tar -zxvvf dovecot-configs-debian-wheezy.tar.gz


chown -R vmail:dovecot /etc/dovecot
/etc/init.d/dovecot restart

[ ok ] Restarting IMAP/POP3 mail server: dovecot.

To download dovecot-configs-debian-wheezy.tar.gz click here

8.Install Web Interface User / Domain edit Mail Frontend – Mail Admin Tool – Matv1.1

There are 4 web mail admin interfaces suggested by ISPMail tutorial:



  • Matv.1.1 – Mail Admin Tool
  • ISPWebadmin
  • Mailadm
  • VEA

I tried with ISPWebadmin and VEA, but only one that worked for me is MATv1.1. Actually I liked a lot Mail Admin tool it is simple and does support; create new mail domains, create new users in domains and add user aliases.

Mail admin tool login screen screenshot Debian / Ubuntu GNU Linux

mail admin tool matv1 postfix web mail admin tool debian gnu linux wheezy

Here is how to install

cd /var/www;
wget -q
tar -zxvvf MATv1.1.tar.gz
mv "MAT v1.1" mailadmin
cd mailadmin
cd includes
wget -q
mv config.php.txt config.php
cd /var/www/mailadmin
wget -q
mv index-matv1.php.txt index.php
chown -R www-data:www-data /var/www/mailadmin

Now point your browser to:




(where is your local or Internet IP address) and you should see Matt mailadmin popup. I hope my little tutorial will be of use to many. Comments and problems with install steps will be much appreciated and might lead hopefully to improvements of this little Postfix Install Wheezy tutorial Enjoy 🙂

9. Configuring Web mail access to Mail server Mailboxes with Squirrelmail and Roundcube

a) Configuring Squirrelmail to work with Postfix


apt-get install –yes squirrelmail
ln -s /etc/squirrelmail/apache.conf /etc/apache2/conf.d/squirrelmail.conf

Squirrelmail config options default folder config none postfix debian wheezy linux

(Select option 3) – Folder Defaults

Choose Option 1 – Press 1
and set (Default Folder Prefix) to 'none'.

You can take few minutes to browse to other options too to select for example some meaningful title for your Squirrel Webmail – i.e. organization name or whatever…

That's all now to access Squirrel open in Firefox:

To test squirrel is configured correctly try to login with user with pass summersun

b)Configure Roundcube + Postfix + Dovecot

Edit /etc/roundcube/apache.conf and uncomment:

#Alias /roundcube /var/lib/roundcube


Alias /roundcube /var/lib/roundcube
Then restart Apache:


/etc/init.d/apache2 restart

 10. Testing if everything works fine together

a) Testing if mail server defined domain has properly configured DNS – PTR, MX and TXT records

First I assume here that mailserver has proper configured PTR record and it is defined properly in DNS to be MX (Mail Exchange server). You will have to contact your ISP (Internet Service Provider) and ask them to create new PTR record corresponding to hostname of mail server defined in myhostname var in /etc/postfix/
To test whether you have PTR record run:

host has address mail is handled by 0
root@websrv:/etc/dovecot# host domain name pointer

In above example you see my domain has proper defined PTR record. To test you have defined in domain DNS server (zone files) proper MX record issue:

host -t MX mail is handled by 0

Again for sake of testing you see has defined MX with priority of 0 (which in those case is highest), since there are no other defined MX domains and priorities.

It is good practice that domain name has also proper SPF record this is done with DNS server zone record of type TXT. 
Once again here is SPF record defined for

host -t TXT descriptive text "google-site-verification=j9d4Bt5c_1ukGf4WBng0i4esOqJtbxSFVkG144dFqv4" descriptive text "spf1 a mx ptr ip4: -all"

You see 2nd line is the actual SPF record descriptive text "spf1 a mx ptr ip4: -all"

First line command returns is actually Domain DKIM key. I tried configuring DKIM keys following ISPMail tutorial unsuccesfully so by installing Postfix by my tutorial you will not have to have  DKIM keys (soft) installed or TXT records for Domain Keys defined.

b) Testing if mail server is able to send (deliver) mails to other MTA's correctly Next to test whether postfix is sending mails properly use:

mail -s "This is a simple test mail, no need to reply"

Do you get this mail
Hope so 🙂

Note that after writing the email you have to press "." and then Enter to send the mail.

To check everything is fine with sending the mail check in /var/log/mail.log, there should be something like;

Aug 2 08:29:56 websrv postfix/smtpd[16228]: connect from localhost[]
Aug 2 08:29:57 websrv postfix/smtpd[16228]: 0D323662499: client=localhost[]
 Aug 2 08:29:57 websrv postfix/cleanup[16224]: 0D323662499: message-id=<>
 Aug 2 08:29:57 websrv postfix/qmgr[14241]: 0D323662499: from=<>, size=749, nrcpt=1 (queue active)
 Aug 2 08:29:57 websrv amavis[13958]: (13958-01) Passed CLEAN {RelayedOpenRelay}, <> -> <>, Message-ID: <>, mail_id: 1oIcE-Zc9MND, Hits: -, size: 369, queued_as: 0D323662499, 828 ms
Aug 2 08:29:57 websrv postfix/smtp[16226]: 3C4A766249B: to=<>, relay=[]:10024, delay=1, delays=0.2/0.01/0.01/0.83, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[]:10025): 250 2.0.0 Ok: queued as 0D323662499)
Aug 2 08:29:57 websrv postfix/qmgr[14241]: 3C4A766249B: removed
Aug 2 08:29:57 websrv postfix/smtp[16235]: connect to[2a00:1450:4013:c01::1b]:25: Network is unreachable
Aug 2 08:29:58 websrv postfix/smtp[16235]: 0D323662499: to=<>,[]:25, delay=1.2, delays=0.08/0.01/0.65/0.49, dsn=2.0.0, status=sent (250 2.0.0 OK 1375450198 a48si4827663eep.113 – gsmtp)
Aug 2 08:29:58 websrv postfix/qmgr[14241]: 0D323662499: removed

As you see from above output gmail server returned status of  "Success" – 250 2.0.0 Ok: quequed as 0D323662499 – this means email is delivered OK and if the mail server IP from which you're sending is not listed in some Mailserver IPs Blacklist mail should arrive in a sec.

c) Testing if Dovecot POP3 and IMAP protocol are accessible by SQL kept mail accounts

Last thing to test is Dovecot (for Qmail users for sake of comparison – Dovecot is like Couirier IMAP and Courier POP3 mail server):

To test IMAP and POP3 easiest way is to use simple telnet connections. I've earlier written a small article on How to test if IMAP and POP3 mail service is working with telnet connections, so if you never done this take 2 mins to read it. By default ISPMail adds an email with username with password summersun

telnet localhost pop3
Trying ::1…
Connected to localhost.
Escape character is '^]'.
+OK Dovecot ready.
PASS summersun
+OK Logged in.
+OK Logging out.
Connection closed by foreign host.

To test IMAP protocol login

telnet localhost imap
Trying ::1…
Connected to localhost.
Escape character is '^]'.
01 login summersun
telnet> quit
Connection closed.

Well this is the end my friend 🙂 You should now have a properly running Postfix + Dovecot + Virtual Domains in SQL. Please drop me a thank you comment if it worked for you. If it doesn't drop a comment so I can integrate it and improve this tutorial. Happy Hacking 😉

Share this on

How to disable GNOME popup notification in Debian Wheezy Linux

Friday, August 2nd, 2013

how to disable remove GNOME 2 / 3 popup e mail notification  Debian Ubuntu Linux screenshot

I found it very annoying to have a pop-up notification every time I receive a new email it is just pointless there especially, when I already use Thunderbird (IceDove) to fetch my email via pop3. This pop-up notification though planned to be useful messes with my Desktop and breaks the habit on how I'm used to old GNOME interface…. I remember same popup notification was present on older Fedora releases (back in time when I used Fedora Linux for my Desktop).

disable Gnome popup notification new email Debian GNU Linux Wheezy 7 screenshot

My logical guess was in order to disable popup notification in GNOME 3 I had to tamper with gconf-editor. In gconf-editor config database there is:

Apps -> Notification daemon

Problem it is not possible to turn it off. Only available change options are:

default-sound, popup_location, sound_enabled, and theme

After some time of try / fail attempts I found the solution on linuxquestions forum, its quite raw solution but it works, all I had to do is change permissions of /usr/lib/notification-daemon/notification-daemon;

debian:~# chmod 0000 /usr/lib/notification-daemon/notification-daemon

Another thing that is handy to disable is POP UP Window with warning that you have low disk space on Hard Drive.

The warinng for Disk space is very annoying and popups up on every GNOME boot. Actually the hard drive with Low disk space is and old mounted partition in NTFS and I only use it to read data.

Here is how to disable HDD Notification Warnings in GNOME:

debian:~# chmod 0000 /usr/lib/gnome-disk-utility/gdu-notification-daemon

Share this on

Client Denied By Server Configuration Linux Apache error solution

Thursday, August 1st, 2013

Client denied by server configuration fix solution Apache feather logo

If you run Apache server on Debian Linux / Ubuntu / CentOS whatever Linux OS and you try to install a new PHP application under lets say /var/www/ getting an error in Apache error.log like:

[Wed Jul 31 03:36:21 2013] [error] [client] client denied by server configuration: /var/www/vea/index.php, referer:

This is due to misconfigured AllowOverrides in some of your main configuration files.

So what is causing the error?

Reason is by default in most current Linux distributions Apache is configured to have restrictive policy following the good security practice (Restrictive by default).
Apache is configured by default to not accept AllowOverrides – i.e. AllowOverride None for DocumentRoot /, because there are plenty of administrators who run Apache without having profound understanding leaving it to interpret by default mod_rewrite rules from .htaccess files etc.

To fix this issue, hence you have to add extra configuration for AllowOverride directive for directory giving the err. In this case /vea:

<Directory /var/www/vea/> 
Options -Indexes FollowSymLinks
AllowOverride AuthConfig
FileInfo Order allow,deny
Allow from all

Above rules are a bit restrictive and will allow only to have .htaccess with only for protecting directory with htaccess passsword for exmpl. – (AuthUserFile, AuthGroupFile, AuthName, AuthType) .htaccess.
-Indexes – instructs /var/www/vea directory listing to be disabled, below two lines:

Order allow, deny
Allow from all

Makes the directory Allowed to be visible by all, however note that it is possible in some of other Apache configuration files to have other rules configured for /vea documentroot /var/www/ which are preventive (Default Deny) – if this is the case just walk through all Apache configs and change where necessary to Allow from all.

In some cases it is possible Web application or Website placed requires AllowOverride All directive instead. If above <Directory>

does not help and you continue to get:

[Wed Jul 31 03:36:21 2013] [error] [client] client denied by server configuration: /var/www/php-application/index.php, referer:  

Try setting Directory rules with AllowOverride All ;

<Directory /var/www/php-application/> 
Options -Indexes FollowSymLinks
AllowOverride All
FileInfo Order allow,deny
Allow from all

Debian / Ubuntu server admins should check closely for AllowOverride rules in files /etc/apache2/conf.d/*

as well as in /etc/apache2/mods-available/*:

Usually there are AllowOverride rules set from files:


and also in


On Debian GNU / Linux, very common reason for getting client denied by server configuration is AllowOverride definitions in /etc/apache2/conf.d/security, default AllowOverride there are set to None, i.e.:

<Directory />
AllowOverride None
Order Deny,Allow
Deny from all

If that's the case with you make sure you config rules to become:

# <Directory />
# AllowOverride None
# Order Deny,Allow
# Deny from all
# </Directory>

A very useful command to find where there is occurance of AllowOverride in Apache many configs is:

root@linux:~# cd /etc/apache2
root@linux:/etc/apache2# grep -rli AllowOverride *


Once you did all necessary config Restart Apache:

root@linux:~# /etc/init.d/apache2 restart

Share this on