Rewriting URL path in nginx without redirecting

For legacy reasons, I have URLs like I want /foo.cgi?id=nnn.html to respond with the contents of a file nnn.html, where nnn is a number that varies.

In nginx, how do I define a custom mapping from URL paths to different file paths without generating redirects? (That is, while I want the contents of nnn.html to be served, I want the browser-visible URL to continue to be foo.cgi?id=nnn.)

Dovecot Configuration: rewriting / key→value lookup for variables; aliasing the domain

I’d like to configure Dovecot in a way so that it dispatches userdb/passwd lookups into domain specific locations, where the domain itself may have several aliases, but all of them direct to the same location.

The Dovecot wiki gives a simple, trivial example

Multiple passwd files

You can use all the variables in the passwd-file filenames, for example:

passdb {   driver = passwd-file   # Each domain has a separate passwd-file:   args = /etc/auth/%d/passwd } 

However this does not take care of the domain aliasing that may take place. For example a company might have the domains and, and would like to alias them to all work with the same file /site/example/mail/passwd.

Assuming the above example, it would require to rewrite the %d variable through some alias lookup or to first alias the domain, before moving on to look up the user and authenticating.

Now I do understand that Dovecot doesn’t treat the domain part in any special way, so I could users just have configure their MUAs using the joint domain alias. However this doesn’t deal with domain aliasing on delivery.

Ideally I could insert some lookup to rewrite the domain part early on, to be used for delivery and authentication. However I don’t see how to do that without crude hacks.

Rewriting ‘From:’ in ssmtp/mail no longer works in Ubuntu 18.04

In Ubuntu 14.04 I had the following system running which is basically described here and also here. One element of this is that the ‘From:’ address is taken from /etc/ssmtp/revaliases: 

and the ‘’ was used as ‘From:’ when I issued a mail like echo -e “Hi there” | mail -s Test

In a new installation of Ubuntu 18.04, the ‘From:’ is now

 Clearname <username@hostname> 

where clearname is the name string in /etc/passwd, username is the linux username, and hostname is the linux host name (although changing it with ‘hostname’ does not alter the result).

Of course, this e-mail address is not going to work, I would like to supply my real address. It seems like new versions of GMail or SSMTP have broken this useful and essential feature.

I would be grateful for help!

Rewriting complex formal derivatives

Formal derivatives are given by the following formulas

\begin{align} \frac{\partial f}{\partial z} = \frac{1}{2} \bigg( \frac{\partial f}{\partial x} – i\frac{\partial f}{\partial y} \bigg) \ \frac{\partial f}{\partial \overline{z}} = \frac{1}{2} \bigg( \frac{\partial f}{\partial x} + i\frac{\partial f}{\partial y} \bigg) \end{align} I am to rewrite $ $ \frac{\partial \overline{f}}{\partial z}$ $ and $ $ \frac{\partial \overline{f}}{\partial \overline{z}}$ $

How can it be done? Am I to use Riemann — Cauchy equations? If yes how?

Rewriting sender address not working in postfix

I’m running postfix on a Raspberry Pi, with the goal of having mail sent from the Pi always look like it’s coming from my personal “external” email address (the Pi is never intended to receive mail).

I’ve tried to do this by setting up a sender rewrite hash like this:


which I then process with:

sudo postmap hash:/etc/postfix/sender_canonical_maps 

However, after restarting postfix (and confirming it’s running fine), when I send an email using mailx:

pi@mycroft:/etc/postfix $   mailx -s "Hello There!" mark dkdkd Cc:  

what arrives at the destination has a sender address of mark@mycroft.localdomain, which isn’t the desired result.

In case it matters, here’s what my /etc/aliases file looks like:

mailer-daemon: postmaster postmaster: root nobody: root hostmaster: root usenet: root news: root webmaster: root www: root ftp: root abuse: root noc: root security: root root: mark mark: 

Rewriting image output in views: how to provide replacement pattern inside twig tag?

In views I want to rewrite output of image field by using twig function drupal_image (see module Twig Tweak). When I provide the image path directly, this code works:

{{ drupal_image('public://myimage.jpg' , image_responsive_style, responsive=true) }} 

But I can not manage to provide image path by a variable, like this pseudocode:

{{ drupal_image('{{ uri }}' , image_responsive_style, responsive=true) }} 

The problem seems to be how to provide the variable {{ uri }} properly inside the surrounding twig tag.

Advanced Article Spinning | Article Spinner Services | Rewriting Article for $1

Advanced Article Spinning / Article Spinner Service We will spin the article for you that mimics human being’s ability to rewrite an article. If you want to spin an article for your website/blog, we can do it for you at very cheap price! We have experience doing this ~ where our team will manually check through the spinned article and amend/correct as needed. WHAT YOU WILL GET Guaranteed Human Readable Spinned Article Unlike the free services (plenty out there) which gives you rubbish, our article spinning is authentic, original and totally readable by your website visitorsPerfect for Human Readers & Search Engines We focus on very high quality spinned articles that are not only good for human readers but also search engines.No Duplicate, Plagarism-Free You can check all the spinned article for plagarism using Copyscape and you will be amazed that your article will pass the test easily. YOUR ARTICLE MUST BE … English OnlyMaximum of 500 words. If your article has more than 500 words, please order the add-on. You will be pleased with our service! I guarantee that… ———– NOTE : I am starting off selling my services here and thus am doing a SUPER GOOD DEAL with no limit as to how many you can buy. Others may charge you much much more but I would like to build my credibility so that’s why it is only $ 1 per article of 500 words. ———– Thank you for your support!!

by: mlc2019
Created: —
Category: Content & Writing
Viewed: 394

Rewriting a set of integers to get rid of repetition but keeping subset sum ordering

Say, I have a set of 6 +ve integers sorted in ascending order:

$ A = \{2,4,4,4,5,7\}$

Now to make it easier to deal with (Minimum one starts with 1) I deducted one from all of them:

$ \therefore B= \{1,3,3,3,4,6\}$

Now what I am trying to do is get rid of the repetition of numbers and I tried by keeping one number (4) and the rest same numbers in the incremental way (4,5) and the increased amount (+2) is added to the following numbers (4,6) after that.

$ \therefore C = \{1,3,4,5,6,8\}$

But I wanted to keep the subset sum ascending ordering, which seems like doesn’t now hold. For example:

For Set A: $ (2), (4), (4), (4), (5), (2,4)… $

Sums are: $ 2,4,4,4,5,6 …$

For Set C: $ (1), (3), (4), (1,3), (5), (6), (1,6)….. $

Sums are: $ 1,3,4,4,5,6,7…$

Up to this point it is fine. But what if I want to generate them from the original set $ A$ , and the problem is the order doesn’t not hold anymore!

For example:

For Set A: $ (2), (4), (4), (4), (5), (2,4)… $

Now if we replace 2 with 1, 4 with (3,4,5), 5 with 8 and 7 with 8:

It becomes: $ (1), (3), (4), (5), (1,3)…$

Now the sums are: $ 1,3,4,5,4…$ We see that subset sum ascending ordering doesn’t hold any longer $ (..,4,5,4..)$ .

Now my question is: Is there any way I can get rid of the repetition numbers i.e. they will become unique and the subset sum ordering will remain intact???