Getting email off your Linux server with ssmtp and yandex

linux_mailA quick note to self about configuration of servers with ssmtp and yandex mail service (any other would work too, of course). I keep forgetting how it is done and keep spending time looking about so here goes the summary.

Install ssmtp package, if missing, install also bsd-mailx.

Configuration for ssmtp goes into /etc/ssmtp/ssmtp.conf

MailHub=smtp.yandex.ru:587 # Provider SMTP server hostname and port
UseStartTLS=YES # Secure connection (SSL/TLS)
FromLineOverride=YES # Force the From: line
Hostname=example.com # The name of this host
RewriteDomain=example.com # The host the mail appears to be coming from
Root=webmaster@example.com # Redirect mail for root@ to webmaster@example.com
AuthUser=webmaster@example.com # Provider mail account
AuthPass=password # The password for the mail account

Note that it is not UseTLS anymore but UseStartTLS, otherwise you’ll get

May 25 18:47:18 example sSMTP[315]: Creating SSL connection to host
May 25 18:47:18 example sSMTP[315]: SSL connection using (null)
May 25 18:47:18 example sSMTP[315]: Cannot open smtp.yandex.ru:587

Now all of the accounts that send email must be mentioned in the /etc/ssmtp/revaliases file and be mapped to this existing account at the provider:

root:webmaster@example.com:smtp.yandex.ru
www-data:webmaster@example.com:smtp.yandex.ru
cron:webmaster@example.com:smtp.yandex.ru

Now we have a working configuration but the password for the service is exposed in a world-readable config file. To fix that, we create a new group:

groupadd ssmtp

Change the ownership of both the config file and the sSMTP binary to this group:

chown :ssmtp /etc/ssmtp/ssmtp.conf

chown :ssmtp /usr/sbin/ssmtp

Set the SGID bit for the binary so that others invoking it get the proper permissions:

chmod g+s /usr/sbin/ssmtp

And restrict the permissions of the config file:

chmod 640 /etc/ssmtp/ssmtp.conf

Now everything should work like a charm… unless I forgot something again :)

Permanent link to this article →

Invaders are changing the sexual life of Europe

Amazing how things are turning out in Europe nowadays with the influx of all the asylum seekers, refugees and other immigrants. The sexual life is definitely changing, most of the time unwillingly for the locals.

A surge in violent attacks and rape attempts on women and girls in Sweden caused the police to advice women not to go outdoors alone anymore. Sex attacks on girls and children in Germany cause the public authorities to introduce new rules: the public swimming pools will be sex segregated now. Moreover, the swimming pools “have also hired plainclothes security officials, dressed in swimwear to look like other visitors, who will be on patrol swimming in the pools and using the slides.” In Germany the sex attacks can be followed on a map created by volunteers drawing information from the media reported cases, called “Cologne every day“.

088_bergbeklimmer_zanzuYou would think the government may want to do something about it, right? Well, the Ministry of Health has put up an explicitly-illustrated website dedicated exclusively to promoting interracial and non-traditional sex between the nonwhite “refugees” and Europeans. The website says that its purpose is to give “advice on sex and sexuality for migrants who have not been living long in Germany.” The drawings on the website mostly depict interracial sex and the website also promotes homosexuality, lesbianism, bisexuality, and “transgenderism.”

115_lepelen_zanzuThe website provides useful advice like “A man and a woman, or two men, can have sex with penetration of the anus. A woman cannot get pregnant through penetration of the anus. However, avoid semen leaking into the vagina.” For those girls, who are afraid to go out onto the streets, the site helpfully hints: “You can also have vaginal sex using objects, like a dildo or a vibrator (sex toys).” On the other hand, if you are a male and you are not sure whether you should get out onto the street or in a swimming pool and score, the site advises: “If you drink alcohol, you can feel more like having sex and you feel fewer restraints.” Yeah-hoo!

Overall, the government message leaves no uncertainty about one thing: anal intercourse between “migrants” and Europeans must be viewed by both sides as the new norm, whether the latter like it or not.

Permanent link to this article →

Movie: The Intern

The_Intern-Experience_never_gets_old

I watched the movie “The Intern” by a recommendation from a friend and did not feel sorry even for a second. The movie is a very refreshing experience, it feels very light-footed, so to say, with an interesting story told expertly by good artists in a very convincing way. The current movie landscape is almost all “bigger than life” and this movie stands out being “just right”.

Interestingly, the story has come at just the right time for me. The CEO of an Internet start-up is being pushed by venture capitalists into accepting a downgrade and hiring another CEO to actually lead the business. I had this discussion twice this week with potential business leaders. It seems all the hype nowadays is to get money from venture capitalists or investors and get going real quick. What people forget is that this way they give up the essential control of their own business. It’s not theirs anymore and they would have to accept some decisions by the real owners – the financial owners of the company. That’s a bad idea, don’t do it unless you absolutely must. Make your own company on your own terms with your own effort. What’s the hurry? And a large part of the movie’s plot is also about that – make your own company your own way.

But, of course, there is more than that. A love story, a get back into the action story, a dad going astray under the pressure of being in a woman’s role in the family, a woman going psychologically ruined under the pressure of a man’s role in the society – it’s all there, all greatly shown, without excesses, without too much hype, but very much life-like. And, yes, it’s great when you are accepted as never being too old for the job if you know how to do.

Anyway, the story is great, Robert De Niro is still wonderful, Rene Russo is splendid and it’s definitely a worthwhile movie to watch.

The_Intern_Robert_De_Niro_and_Rene_Russo

Permanent link to this article →

What would you do if you were God?

I know what I would do: exactly what I am doing now!

You see, if I was God, I could do anything, so I would try to live my life in different ways to see which way would be most exciting, interesting, pleasurable, whatever… Then I would likely come to the point where I would also like to live completely different lives. Quickly, I would discover that I can live several lives in parallel and compare… From there, it is a quick step to actually living every life around and enjoying all of them! Of course, I would actually have to make sure that while I am living the life I would not know that it’s all me, because it would quickly lose any sense otherwise, would it not? All of me would pretend to not know anything about Me and get on with life to only get reconciled eventually after living the life.

So, yes, if I was God, I would be living all these lives simultaneously, in all this huge universe, and enjoying it all in all its diversity. I guess, I am doing it already. Cool, eh?

Bruce-Almighty

Permanent link to this article →

Russell’s Teapot

Bertrand_Russell_transparent_bgMany orthodox people speak as though it were the business of skeptics to disprove received dogmas rather than of dogmatists to prove them. This is, of course, a mistake. If I were to suggest that between the Earth and Mars there is a china teapot revolving about the sun in an elliptical orbit, nobody would be able to disprove my assertion provided I were careful to add that the teapot is too small to be revealed even by our most powerful telescopes. But if I were to go on to say that, since my assertion cannot be disproved, it is intolerable presumption on the part of human reason to doubt it, I should rightly be thought to be talking nonsense. If, however, the existence of such a teapot were affirmed in ancient books, taught as the sacred truth every Sunday, and instilled into the minds of children at school, hesitation to believe in its existence would become a mark of eccentricity and entitle the doubter to the attentions of the psychiatrist in an enlightened age or of the Inquisitor in an earlier time.

— Bertrand Russell

Permanent link to this article →