Why getting this tls_socket_read error in Mutt? - sockets

I get the error in Mutt 1.5.21 (2010-09-15) with large amount (>500) of mails when accessing my mails through SSH in Chromebook but in the server Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-66-generic x86_64):
which seems to be a known bug about mutt - TLS packet with unexpected length:
mutt tls_socket_read (a tls packet with unexpected length was received was received.)
Changing set imap_keepalive=900 higher does not help.
My $HOME/.muttrc where the alias is corresponding to my real email address:
alias masi Masi Lorem <masiipsunloremlorem#gmail.com>
#create folders for sennnt mail#
send-hook . my_hdr Fcc: +.sent_`date +%Y_%B`
set sort=threads
set postponed="$HOME/mail/postponed"
mailboxes "=inbox"
mailboxes "=sent"
mailboxes "=draft"
#^u to open url
macro pager \cu |urlview\n
set imap_keepalive=900 # default
set timeout=300
## send-hook '~t ^masimasiloremhello#gmail\.fi$' 'my_hdr From: Test Hooooook From Mutt Works if you see me <user#host>'
##### Headers
## main headers
ignore *
unignore From: To: Cc: Subject: Date:
## headers in editor
set edit_headers="yes"
set editor="vim"
set beep_new
set record="$HOME/mail/sent/mails"
set mbox=+mbox
macro index,pager y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list"
Fix
I think the update to the latest Mutt version with the patches of 2014 should fix the problem.
I am testing the upgrade in two servers and I will report if it works.
Why this bug is occurring in Mutt?

This is Ubuntu specific bug.
Switch to Debian so you avoid those bugs in the future.

Related

Enable TLS 1.2 on windows 10 64-bit + check if it is enabled or not

I want to run my PS1 files which connect to SharePoint online, the script keeps raising this error:-
Message: The underlying connection was closed: An unexpected error occurred on a send.
now based on my readings that one reason for getting this error is that we need to enable TLS 1.2 on the client , as mentioned in this link # https://learn.microsoft.com/en-us/mem/configmgr/core/plan-design/security/enable-tls-1-2-client ..
so i tried the steps mentioned in the link, where i added the register key under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp but i can not find this HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp as there is no folder named WinHttp under internet settings... Can anyone advice?on this , why my windows 10 does not have the second registry path + are there other steps that i need to do to enable TLS 1.2 ?
Thanks
To ensure TLS 1.2 is used, add this anywhere before the first request you make.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Vscode snippet
If you are using vscode, here is the code for a snippet, so you can quickly add this in your code whenever needed.
"tls12": {
"prefix": "tls12",
"body": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12"
},

CPanel - Error login “A fatal error or timeout occurred while processing this directive. ”

I face this problem multiple time. It happen when I put my login information on cpanel login, then the page goes empty except these message:
Template::Exception:
[TYPE]=[file]
[INFO]=[parse error - home/retro/stats_bar.html.tt line 84-90: unexpected token (%)
[% IF stat.pc.defined;
stat.percent = stat.pc;
[%
IF stat.pc.defined;
stat.percent = stat.pc;
END; %]]
[TEXT]=[
]
at cpanel.pl line 1050.
cpanel::cpanel::cptt_exectag("/usr/local/cpanel/base/frontend/paper_lantern/index.auto.tmpl", 1) called at cpanel.pl line 4408
cpanel::cpanel::run_standard_mode() called at cpanel.pl line 864
cpanel::cpanel::script("cpanel::cpanel", "./frontend/paper_lantern/index.html") called at cpanel.pl line 271
I tried to re-install the cpanel by using this command scripts/upcp --force it goes good. But the next day happen again, at the exact time of 11:30 am.
I opened CPanel support ticket, but it has been a day, and no reply yet.
Hello,
If you running just cpanel, do cpanel force update
"/scripts/upcp --force"
If you running cpanel with CloudLinux do LVE Manager updated
"yum update lvemanager"
Visit https://www.cloudlinux.com/cloudlinux-os-blog/entry/lve-manager-updated-1-6
lvemanager-2.0-41 1
WEB-689: set Content-type: text/html in CloudLinux.cgi;
WEB-839: fixed broken cPanel's styles when "LVE Manager" plugin is opened (cPanel 11.69.9999 only);
LVEMAN-1203: fixed retro theme errors on cPanel EDGE (11.70);
LVEMAN-1188: improved StatsBar integration in cPanel WHM.

How to specify the Mailbin that the icinga2 uses when invoking the mail command

I have icinga2 set up on a Ubuntu xenial machine. I'm using postfix to send emails, which is working properly, i.e.
echo "hello world" | mail -s "test subject" sammy#example.com
sends an email as expected.
However, when an icinga sends an email, I find the following error message:
/var/log/icinga2/debug.log
[2017-12-12 02:56:05 +0000] notice/Process: PID 5512 >
('/etc/icinga2/scripts/mail-host-notification.sh' '-4' '$
$a.mydomain.com' (PID: 5512, arguments: '/etc/icinga2/scripts/mail-host-notification.sh' '-4' '127.0.0$
Can't canonicalize "./Maildir"
./Maildir/sent: No such file or directory
Failed to save message in "./Maildir/sent" - message not sent
I know that the error is caused by the Maildir directory not being set up. However, I can't figure out how to determine which user is invoking the mail command. I also don't know what the cwd is set to in ./Maildir/sent.
I would be very grateful if anyone could help me figure out either:
Where to set up the Maildir
How to specify the user that icinga uses so as to know where to set up the Maildir
A better method to get icinga to send emails
Thanks in advance
I was able to get my icinga2 instance to mail properly by creating the Maildir in the / directory and setting the owner:group to nagios:nagios. Currently not sure how to configure this, but it is a working configuration!

How can I delete a message without mailbox file lock? I'm using Perl's Mail::Box

I run Postfix on Ubuntu 16.04 server to send "internal email" messages and a crontab Perl job to parse the related bounce messages (delivered to local mailbox /var/mail/bounceparser). The Perl code basically checks the bounceparser mailbox, parse all the messages and take some actions (delete bounced addresses, etc).
The problem is that when I try to delete those already-parsed messages using Mail::Box library, the mailbox gets locked and if a new message arrives the postfix daemon throws an exception trying to deliver the message: "cannot update mailbox /var/mail/bounceparser for user bounceparser. cannot open file: Permission denied".
Is there a way to delete a message without locking the mailbox file? If it's not possible, any other suggested strategy?
The code I use to delete the messages:
my $mbox = Mail::Box::Mbox->new(folder =>'/var/mail/bounceparser', access => 'rw');
# #mailbox_pending_deletes contains the list of message ids to delete
for my $message_id (#mailbox_pending_deletes){
$message = $mbox->find($message_id);
$message->delete;
}
my $delete_result = $mbox->close(write=>'MODIFIED');
Thank you!
As suggested by #SteffenUllrich using mailbox single file box it's not a good idea (sincerely I was using it just because it's the default Postfix configured value ^_^).
So, if you have a similar issue 1.- Configure Postfix to use Maildir instead of Mailbox for messages delivery (main.cf file):
# Set Postfix to deliver messages to Maildir user folder
home_mailbox = Maildir/
and 2.- use Mail::Box:Maildir and not the Mail::Box:Mbox I was using to find-delete the messages.
my $mbox = Mail::Box::Maildir->new(folder =>'/home/bounceparser/Maildir', access => 'rw');
# #mailbox_pending_deletes contains the list of message ids to delete
for my $message_id (#mailbox_pending_deletes){
$message = $mbox->find($message_id);
$message->delete;
}
my $delete_result = $mbox->close(write=>'MODIFIED');
Fortunately the Sisimai library I use to parse the bounce/delivery/etc messages also accepts a Maildir path to go for the messages:
my $v = Sisimai->make('/home/bounceparser/Maildir/new','hook'=>$x);
Thanks for helping!

How to configure open-fire server with HttpUploadComponent for offline file transferring?

I use Openfire with Conversations and would like to implement offline file transferring with HttpUploadComponent, I have copied httpupload folder inside openfire folder as below screenshot:
Then I did below configurations in openfire:
I also installed Python and configured config.yml file in httpupload folder like below:
component_jid: upload.192.168.105.164
component_secret: 1234
component_port: 5275
storage_path : ./var/lib/httpupload/
max_file_size: 20971520 #20MiB
http_address: 0.0.0.0 #use 0.0.0.0 if you don't want to use a proxy
http_port: 8080
get_url : http://192.168.105.164:8080/
put_url : http://192.168.105.164:8080/
expire_interval: 82800 #time in secs between expiry runs (82800 secs = 23 hours). set to '0' to disable
expire_maxage: 2592000 #files older than this (in secs) get deleted by expiry runs (2592000 = 30 days)
user_quota_hard: 104857600 #100MiB. set to '0' to disable rejection on uploads over hard quota
user_quota_soft: 78643200 #75MiB. set to '0' to disable deletion of old uploads over soft quota an expiry runs
allow_web_clients: true #answer OPTIONS requests to allow web clients to upload files
I did run Httpupload server as well :
After starting python server, if you go openfire\serversetting\external components*view the external components* [in the first line], you'll see whether session is created or not:
After all of this, when I want to send a file from android client its failling and It gives me this error:
Where is my problem? Thanks.
In attached error screenshot, the last word is 403, which is indicating that it's related to authorization on HttpUploadComponent end.
Now I started to check the code of this component and on line 83 of https://github.com/siacs/HttpUploadComponent/blob/master/httpupload/server.py it is picking the variable "storage_path" from configuration to place the file in that directory.
Now as mentioned in your question, you have set storage_path : ./var/lib/httpupload/
But you are on a windows machine and this path is invalid.
Try giving a valid windows os path.