Cpanel overwrites amazon SES entries in exim.conf - amazon-web-services

I need to add some additional configurations on my exim.conf file. But it will get overwrited after some time automatically. I read in some other forum to add entries via exim configuration editor in cpanel. But, on that editor, i cant add such entries. It only allows to select a field and its value only. How can i add custom entries?
begin authenticators
ses_login:
driver = plaintext
public_name = LOGIN
client_send = :
===========
begin routers
send_via_ses:
driver = manualroute
domains = ! +local_domains
transport = ses_smtp
route_list = * email-smtp.us-east-1.amazonaws.com
========
begin transports
#entry for amazon
ses_smtp:
driver = smtp
port = 25
hosts_require_auth = $host_address
hosts_require_tls = $host_address
Entry is something like the above entry. How can i resolve this?

In the Exim Advanced config edit, you can add them.
For the auth, search for the bold text "Section: AUTH" -- there is a text area below it... enter in the "ses_login" details.
For the routers, search for the bold text "Section: PREROUTERS" -- there is a text area below it... enter in the "send_via_ses" details.
Lastly, for the transports, search for the bold text "Section: TRANSPORTSTART" -- there is a text area below it... enter in the "ses_smtp" details.
Once you are finished, scroll all the way down and save your config.. It should now be maintained in your /etc/exim.conf.

You can go to /etc/exim.conf.local which is the customization file for Cpanel. You will find all sections described by half crazed.
In fact, the Advanced configuration page for exim stores all the custom data in exim.conf.local
Since the file is super small, it helps to quickly implement changes and test.

Related

how to fix if en-gb.php language file not working in only admin

I have problem in Opencart 3.0.2.0 in all language file showing their text and variable in page and working perfectly in admin except en-gb.php. Please see below image.
I have try to debug but couldn't fix it.I also checked "storage" modification file to see if any file overwritten but it is same code all place.
you can see this code below already written in en-gb.php but its variable value not showing in any page of admin.
$_['code'] = 'en';
$_['direction'] = 'ltr';
$_['date_format_short'] = 'd/m/Y';
$_['date_format_long'] = 'l dS F Y';
$_['time_format'] = 'h:i:s A';
$_['datetime_format'] = 'd/m/Y H:i:s';
$_['decimal_point'] = '.';
$_['thousand_point'] = ',';
here are the steps I would take to troubleshoot this issue:
check the language settings in admin -> system -> localization -> language. this is how it should look http://joxi.ru/eAOYwZkU9EDEDm
check the opencart store settings in admin -> system -> settings -> edit your store and visit tab local. is should look like this http://joxi.ru/nAyxya7FgGbGv2
then check the opencart language editor at admin -> design -> language editor. should look like this http://joxi.ru/E2p1aYlS7VxVEA
if all is correct there, lets check the code. in admin/language/en-gb/en-gb.php. should look like this http://joxi.ru/V2VLwxqSdVqVyr
then check if there are any modifications to the language file at system/storage/modifications/admin/language/en-gb/en-gb.php (the file should not exist)
if you have vqmod installed, I would also check the cache in vqmod/vqcache/...
if all of this is correct, we need to dig deeper into the core of OpenCart
the language file eb-gb (which is also the name of the language directory) in admin is loaded by the controller admin/startup/startup.php on line 27
$language->load($this->config->get('config_admin_language'));
so you can start by checking this code by returning the value after it like this:
$language->load($this->config->get('config_admin_language'));
//this will output everything that is currently in the languge ibject.
print_r($language);
it should look like this http://joxi.ru/l2ZRw70szkLLl2
If it doesn't return an array, the issue could be that this code is not loaded properly OR that the result is somewhere overwritten by an empty array.
If your store has modifications, you will need to check the system/storage/modifications and search for any code that could be doing something similar
if that is correct, there is one more place to check. in admin/event/language.php you may have some issues. add this code on line 9
public function index(&$route, &$args) {
foreach ($this->language->all() as $key => $value) {
if (!isset($args[$key])) {
$args[$key] = $value;
}
}
// this will output the current values of the language object with the route name.
echo $route;
echo '<pre>';
print_r($args);
echo '</pre>';
}
it should look like this http://joxi.ru/DmBL9V6SJPWjWA
if at some point after a specific route like common/footer you see that the text_home is empty or missing, then you need to check that route and its modifications and see what happened there.
If none of this helps, send us a ticket at https://dreamvention.ee/support and I will personally take a look.
Hope this helps.

opencart: I can edit order but cannot delete it. (with Error log)

I use opencart version 2.1.0.1
Everytime I click admin > sales > order, it will pop up "error undefined." By closing that popup window, I can still edit order but cannot delete order (no response).
In my log, there is:
PHP Notice: Undefined variable: order_id in
/var/www/html/opencart2101/system/storage/modification/admin/view/template/sale/order_list.tpl on line 821
The line 821 is:
url: 'index.php?route=extension/openbay/addorderinfo&token=<?php echo $token; ?>&order_id=<?php echo $order_id; ?>&status_id=' + status_id,
However, I haven't installed any openbay related module. Also, line 821 is inside <!-- --> mark. It should have no effect.
Help!
Although this is now an older version of opencart, I still see this being reported a lot around and about.
The problem occurs due to the store front adding the http url rather than the https url to the order. So firstly you need to fix that. If you dont want to read all of my explanation, you can just hit up the bold points :)
Either way BACKUP EVERYTHING actually not really, back up the file you are going to edit and backup your whole database.
open:
catalog/controller/checkout/confirm.php at around line 100
Find:
$order_data['store_url'] = HTTP_SERVER;
Change to:
$order_data['store_url'] = HTTPS_SERVER;
Now you will want to fix your database because for reasons I cannot fathom, the domain name is placed in the order along with the stores id. and when editing orders it is the usage of that directly within your admin order page that throws up the undefined notice. Basically the browser blocks the request because its trying to make an insecure request from a secure page.
Crack open phpmyadmin or whatever database tool you have on hand.
locate the table, default is oc_orders
Browsing the table, look for the column that contains your store url (i cant remember the name off hand, i think its just store_url but it will be obvious anyway. if you are multi store you will need to run the query for each
I am sure somebody can come up with a clever way to automatically convert just the http into https with a single use sql query on the one column, but this works for me.
Run SQL: adjust as appropriate
UPDATE `oc_orders` SET `store_url` = 'https://example.com' WHERE store_id = 0;

Yahoo Pipes and Website Name

How do I fetch Page Name with Yahoo Pipes?
I'm making a news / blog aggregator, and need to know the name of the site where the info is coming from (bbc, cnn, fox, etc).
Do I need to do this with REGEX?
Anyone that can help?
You can fetch the page using the XPath Fetch Page or Fetch Feed modules in the Sources menu. Maybe with others too.
After that you can extract the page name itself using the various operators, possibly Regex, or others, depending on the source page you are using and the output you want to get.
In general your question is too broad and difficult to answer. To get you started, I created an example pipe that extracts the title of your question from this post, which is basically the "page name" of the current page.
http://pipes.yahoo.com/pipes/pipe.info?_id=668acf3f807c30d7b75f12459edd3252
I used the XPath Fetch Page with parameters:
URL = this page
Extract using XPath = //div[#id="question-header"]
I got that div path by inspecting the source code of this page, where I saw that div#question-header is the container of a question. I could have selected a deeper inner container or a higher level container. It all depends on the amount of other information you need. The more information you want to you from the page, the higher level container you select.
Next, I used the Create RSS operator to create a proper RSS feed, with parameters:
Title = h1.a
Link = h1.a.href
I chose these elements because in the container I extracted with xpath, the page name is inside h1 a. In Yahoo Pipes you use a dot as the path separator.
I found this sample pipe http://pipes.yahoo.com/pipes/pipe.info?_id=69b5dce1c59501a0c64a660c1cfdb856. The page title included the name of the site too. I am not sure if this what you are looking for.

How do I create text file for Confluence and then import it as a Confluence wiki page?

Here is what I want to accomplish:
I am writing a script which will parse some source code, extract some comments that I want it to extract and I will store this text in a text file.
I want to write another script that uses the content of this text file to be programatically transformed into a Confluence wiki-page.
Please tell me the best way to do this. I already saw this
I felt that I could change the input in the above example to take input from text file and update contents of Confluence page. But, I am not sure how it will be formatted. If I have to format it, what do I need to do?
Thanks in advance!
As an alternative to XML-RPC you can use the integrated WebDAV plugin.
Write a script that creates a directory in the selected space.
The directory name will be the page name. After creating the directory a text-file with the same name (with .txt extension) will be created in the directory which holds the content of the page
let your script edit this file in insert the content of your text-file.
Information about the usage of the plugin:
Configuring a WebDAV client for Confluence
Confluence WebDAV Plugin
Troubleshooting WebDAV
I Also saw the code you are referring to. I tweaked it a bit a produced the following code that me help you for the second part of your question.
My code creates a new space and also a new page from a text file that is inserted in the previously created space.
import sys
import xmlrpc.client
import os
import re
# Connects to confluence server with username and password
site_URL = "YOUR_URL"
server = xmlrpc.client.ServerProxy(site_URL + "/rpc/xmlrpc")
username = "YOUR_USERNAME"
pwd = "YOUR_PASSWORD"
token = server.confluence2.login(username, pwd)
# The space you want to add a page to
spacekey = "YOUR_SPACENAME"
# Retrives text from a file
f = open('FileName.txt', 'r')
content = f.read()
f.close()
# Creates a new page to insert in the new space from text file content
newpage = {"title":"NEW_PAGENAME", "space":spacekey, "content":content}
server.confluence2.storePage(token, newpage)
server.confluence2.logout(token)
For your formatting issues, html is supported, but I have not quite figured out how to use CSS styles other than inline (everthing else does not seem to work).
These styles work when you write them with the HTML macro inside Confluence, but from the remote API, it does not seem to behave the same way.
UPDATE :
You can use the {html} macro to include your html by using :
content = server.confluence2.convertWikiToStorageFormat(token, content)
You can also specify your CSS in your global CSS stylesheet.
Another option is to develop a plugin to include a CSS resource :
https://developer.atlassian.com/display/CONFDEV/Creating+a+Stylesheet+Theme
I have tried this way and works petty well for me:
I used a Java program to created a programmatic client to create the dynamic content. This created a HTML document out of my plain text.
I used a RPC client connected to Confluence to uploaded it as a new page.
Your html will be preserved. But if you want to add CSS or JS/JQuery etc on top of your html you will need to create a Macro and enable it for the Particular page. This feature is not available in Confluence OnDemand.

TextMate: Preview in Firefox without having to save document first?

Using TextMate:
Is it possible to assign a shortcut to preview/refresh the currently edited HTML document in, say, Firefox, without having to first hit Save?
I'm looking for the same functionality as TextMate's built-in Web Preview window, but I'd prefer an external browser instead of TextMate's. (Mainly in order to use a JavaScript console such as Firebug for instance).
Would it be possible to pipe the currently unsaved document through the shell and then preview in Firefox. And if so, is there anyone having a TextMate command for this, willing to share it?
Not trivially. The easiest way would be to write the current file to the temp dir, then launch that file.. but, this would break any relative links (images, scripts, CSS files)
Add a bundle:
Input: Entire Document
Output: Discard
Scope Selector: source.html
And the script:
#!/usr/bin/env python2.5
import os
import sys
import random
import tempfile
import subprocess
fname = os.environ.get("TM_FILEPATH", "Untitled %s.html" % random.randint(100, 1000))
fcontent = sys.stdin.read()
fd, name = tempfile.mkstemp()
print name
open(name, "w+").write(fcontent)
print subprocess.Popen(["open", "-a", "Firefox", name]).communicate()
As I said, that wont work with relative resource links, which is probably a big problem.. Another option is to modify the following line of code, from the exiting "Refresh Browsers" command:
osascript <<'APPLESCRIPT'
tell app "Firefox" to Get URL "JavaScript:window.location.reload();" inside window 1
APPLESCRIPT
Instead of having the javascript reload the page, it could clear it, and write the current document using a series of document.write() calls. The problem with this is you can't guarantee the current document is the one you want to replace.. Windows 1 could have changed to another site etc, especially with tabbed browsing..
Finally, an option that doesn't have a huge drawback: Use version control, particularly one of the "distributed" ones, where you don't have to send your changes to a remote server - git, mercurial, darcs, bazaar etc (all have TextMate integration also)
If your code is in version control, it doesn't matter if you save before previewing, you can also always go back to your last-commited version if you break something and lose the undo buffer.
Here's something that you can use and just replace "Safari" with "Firefox":
http://wiki.macromates.com/Main/Howtos#SafariPreview
Open the Bundle Editor (control + option + command + B)
Scroll to the HTML Bundle and expand the tree
Select "Open Document in Running Browser(s)"
Assign Activation Key Equivalent (shortcut)
Close the bundle editor
I don't think this is possible. You can however enable the 'atomic saves' option so every time you alt tab to Firefox your project is saved.
If you ever find a solution to have a proper Firefox live preview, let us know.