I've been using 'gnus' in emacs for several weeks now, but haven't found any solution to the problems of multiple pop3 accounts. I have this section in my '.gnus.el' -
(setq mail-sources '((file :path "/var/mail/boudiccas")
(pop :server "mail.talktalk.net"
:user "boztu#talktalk.net"
:password "custardcreams")
(pop :server "pop.mail.yahoo.com"
:user "winnie#yahoo.com"
:password "rhubarbpie")))
This is what I have but it doesn't seem to be connecting. How should it be shown in the '.gnus.el' please? I have four pop3 accounts to use if I could only find out how to use multiple pop3 mailboxes.
Related
What I've got
I'm testing postfix on Virtualbox. Initially I had success by passing incoming mail (towards my domain) to a pipe (approach 1 from this answer https://superuser.com/a/1490699 ) and letting outgoing mail send as normal.
Now I've switched my postfix config to use virtual mailbox features (still on Virtualbox) so I can use Mysql to query that the domain and user exists before accepting mail. With config such as:
virtual_transport = myhook:dummy
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
all working well when testing via postmap -q, and I removed my domain from "mydestination" to ensure mail is not transported to local.
The Issue
I've followed a lot of guides
https://www.linode.com/docs/guides/email-with-postfix-dovecot-and-mysql/
https://wiki.gentoo.org/wiki/Complete_Virtual_Mail_Server/Postfix_to_Database
However these guide are made with Dovecot in mind and I wont be using that.
When sending mail via command line to another user that is found within the virtual mailboxes I get the following error
to=<me#laravel8.test>, orig_to=<me>, relay=none, delay=36, delays=36/0.02/0.05/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=laravel8.test type=AAAA: Host not found)
This is despite the domain appearing in virtual_mailbox_domains. Changing to ipv4 had no change
I read that this can be due to Postfix not using /etc/hosts (which points laravel8.test to 127.0.0.1) so I added the following lines to main.cf
lmtp_host_lookup = native
smtp_host_lookup = native
But now I get this error:
to=<support#laravel8.test>, relay=none, delay=0, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for laravel8.test loops back to myself)
Yes, Is that not what I want? I want mail sent to another user to then transport this mail to my pipe as declared in virtual_transport.
No matter what I do I only seem to encounter more issues.
Please help if possible.
Issue seems to be
/etc/postfix/mysql-virtual-mailbox-domains.cf
was
user = root
password =
hosts = 127.0.0.1
dbname = laravel
query = SELECT domain FROM mailbox WHERE domain='%d' LIMIT 1
When it should be
user = root
password =
hosts = 127.0.0.1
dbname = laravel
query = SELECT domain FROM mailbox WHERE domain='%s' LIMIT 1
I got really confused about when and where %s should be used or %d and %u. Here postfix only sends domain to this mysql query so must be whole string as %s
I new with clojure and I am trying to host a server with a specific url using it.
Doing some research online I got something as below.
(ns rest-demo.core
(:require [org.httpkit.server :as server]
[compojure.core :refer :all]
[compojure.route :as route]
[ring.middleware.defaults :refer :all]
[clojure.string :as str]
[clojure.data.json :as json])
(:gen-class))
(defn hello-name
[req]
{:status 200
:headers {"Content-Type" "text/html"}
:body (str "Hello " (:name (:params req)))})
(defroutes app-routes
(GET "/hello" [] hello-name)
(route/not-found "Error, page not found!"))
(defn -main
"This is our main entry point"
[& args]
(let [port (Integer/parseInt (or (System/getenv "PORT") "3000"))]
; Run the server with Ring.defaults middleware
(server/run-server (wrap-defaults #'app-routes site-defaults) {:port port})))
Running with lein run and accessing the 127.0.0.1:3000/hello I can access the API.
How would I host this with a url of my choice?
Thanks in advance!
A URL* consists of several parts, two of the most important ones are
the hostname of the computer on which it's being hosted
the path to the specific page.
It looks like you have taken care of #2.
For solving #1 you can take two approaches:
find a good place on the internet to host your program. Something like Heroku
find a way to give you laptop a name on the internet. Something like https://portmap.io/
when you get these problems solved then we get back to the programming part of this question. httpskit will by default answer requests with any hostname. so you don't need to do anything and can accept the defaults.
'*' there are distinctions between URL vs. URI at play here and i'm glossing over them
Hosting this on a specific URL of your choice basically means, you would like your web application to be accessible on that particular URL. For that, you would first have to purchase the domain (for example .com) from an ICANN-accredited domain name registrar(like Namecheap, domain.com, Godaddy) for a fee and then configure it to redirect it to the server where you are sunning the service from. In this case, it would your machine's public IP address(or as #Arthur_Ulfeldt mentioned use something like portmap or ngrok).
This is certainly not recommended as your machine might not have a good uptime or reliable connectivity. Which is why you would host it on a cloud solution. Either something like Heroku(a PaaS which would be the best choice for you as it is really easy to deploy for Clojure) or some compute instances from any of the providers(AWS ec2 or GCP compute engine or Azure VM's) just clone your application there, run your server there and redirect all your requests there.
I know that, to use smtp in gitlab 7.1.1, you need the following config; In:
/home/git/gitlab/config/gitlab.yml
edit following line
## Email settings
# Email address used in the "From" field in mails sent by GitLab
email_from: account#your-mail-server.com
and rename this file
/home/git/gitlab/config/initializers/smtp_settings.rb.sample
to
/home/git/gitlab/config/initializers/smtp_settings.rb
and edit following settings:
ActionMailer::Base.smtp_settings = {
address: "email.server.com",
port: 456,
user_name: "smtp",
password: "123456",
domain: "gitlab.company.com",
authentication: :login,
enable_starttls_auto: true
}
and restart GitLab instance.
Is there other points you need to be aware in order to use smtp-based email with GitLab 7.x?
Note that:
config/initializers/smtp_settings.rb has been added to .gitignore only recently (GitLab 7.0+, PR 7062, commit a727d25)
issue 6023 does mention:
Gitlab uses the system configured sendmail to issue emails to users.
The recommended method is to configure your host sendmail so that it properly works and then Gitlab will successfully email as a result.
If configuring sendmail is not desirable, then Gitlab provides smtp_settings.rb which can be used to override default Gitlab email settings.
This uses ruby net::smtp to configure email.
In order to properly configure it one must know the available SMTP AUTH methods allowed by their mail provider. ruby net::smtp supports only three auth schemes: PLAIN, LOGIN, and CRAM MD5.
issue 6845 reminds us:
If you're using SMTP, make sure you change:
config.action_mailer.delivery_method = :sendmail
to
config.action_mailer.delivery_method = :smtp
in the config/environments/production.rb file.
I know that it's possible to edit code on the remote server with emacs and scp. I use tramp for this.
For example it is described here: http://jeremy.zawodny.com/blog/archives/000983.html
But is it possible to edit code via remote gateway with emacs? That means that to access the code one has to login to gateway server first and then login to other server.
I think the keyword you are missing is "Multi Hops". It is possible to do this with TRAMP; you'll find all the details in the relevant manual sections :
Gateway Methods
Multi hops
For example:
;; ensure `tramp-default-proxies-alist' is defined before we append to it
(require 'tramp)
;; Add the proxy rule
(add-to-list 'tramp-default-proxies-alist
'("server2\\.blabla\\.de" nil "/ssh:server1.blabla.de:"))
Emacs is able to access the Internet with packages such as url.el or the W3 web browser.
Also, the Emacs Lisp Package Archive is heavily dependent on package url.el.
Now, how do I configure Emacs to use my HTTP proxy to connect to the Internet in general?
Bonus points for any help with ELPA behind a proxy.
Yes, I've had problems with HTTP proxies before.
For w3m, this setting has worked for me:
(setq url-proxy-services '(("no_proxy" . "work\\.com")
("http" . "proxy.work.com:911")))
I've got authorization working by:
(setq url-proxy-services
'(("no_proxy" . "^\\(localhost\\|10\\..*\\|192\\.168\\..*\\)")
("http" . "proxy.com:8080")
("https" . "proxy.com:8080")))
(setq url-http-proxy-basic-auth-storage
(list (list "proxy.com:8080"
(cons "Input your LDAP UID !"
(base64-encode-string "LOGIN:PASSWORD")))))
Works for Emacs 24.3. It is based on non-public API tricks, so might not work in another Emacs versions...
Emacs populates the url-proxy-services variable from the http_proxy, https_proxy and no_proxy environment variables if they are set.
This is a bit old, but I had issues connecting as well. One thing I needed to do is add my certificate to the the gnutls-trustfiles in order to connect.
(with-eval-after-load 'gnutls
(add-to-list 'gnutls-trustfiles "path/to/cert.crt"))
(setq url-proxy-services
'(("no_proxy" . "^\\(localhost\\|10\\..*\\|192\\.168\\..*\\)")
("http" . "proxy.com:8080")
("https" . "proxy.com:8080")))