Poczta debian z konsoli - Problem

Ogólne pytania dotyczące systemu
azaz1
Posty: 9
Rejestracja: 11 sierpnia 2011, 11:43

Poczta debian z konsoli - Problem

Post autor: azaz1 »

Witam
Debian11 i wszystko działało idealne do czerwca z pocztą Gmail aż podobno wyłączyli obsługę SMTP
Teraz na nic nie mogę wysłać poczty poprzez konsolę zmieniając pocztę czy to na interie onet czy wp
Robię to poprzez Mutt i Esmtp a wygląda to następująco
Zawsze wyskakuje błąd
Połączenie z interia.pl (Przerwane wywołanie systemowe) nie zostało ustanowione.
Wysłanie listu nie powiodło się.



polecenie wysyłania

Kod: Zaznacz cały

/usr/bin/esmtp | mutt -s "kopia-SERVER" xxx@wp.pl -a /var/archiwum.zip

esmtprc

Kod: Zaznacz cały

identity xxx_debian@interia.pl
        hostname poczta.interia.pl:465
        username "xxx_debian@interia.pl"
        password "xxx"
        starttls required
        default
        mda "/usr/bin/esmtp -d %T"

Muttrc

Kod: Zaznacz cały

set sendmail="/usr/bin/esmtp" 
set use_from=yes
set envelope_from=yes
set use_envelope_from=yes
set smtp_url = "smtp://xxx_debian@interia.pl:465/"
set smtp_pass = "xxx"
set from = "xxx_debian@interia.pl"
set realname = "xxx_debianinteria.pl"
set spoolfile = "+INBOX"
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
set move = no
# System configuration file for Mutt
# Default list of header fields to weed when displaying.
# Ignore all lines by default...
ignore *
# ... then allow these through.
unignore from: subject to cc date x-mailer x-url user-agent
# Display the fields in this order
hdr_order date from to cc subject
# emacs-like bindings
bind editor    "\e<delete>"    kill-word
bind editor    "\e<backspace>" kill-word
# map delete-char to a sane value
bind editor     <delete>  delete-char
# some people actually like these settings
#set pager_stop
#bind pager <up> previous-line
#bind pager <down> next-line
# Specifies how to sort messages in the index menu.
set sort=threads
# The behavior of this option on the Debian mutt package is
# not the original one because exim4, the default SMTP on Debian
# does not strip bcc headers so this can cause privacy problems;
# see man muttrc for more info
#unset write_bcc
# Postfix and qmail use Delivered-To for detecting loops
unset bounce_delivered
set mixmaster="mixmaster-filter"
# System-wide CA file managed by the ca-certificates package
set ssl_ca_certificates_file="/etc/ssl/certs/ca-certificates.crt"
# imitate the old search-body function
macro index \eb "<search>~b " "search in message bodies"
# simulate the old url menu
macro index,pager,attach,compose \cb "\
<enter-command> set my_pipe_decode=\$pipe_decode pipe_decode<Enter>\
<pipe-message> urlview<Enter>\
<enter-command> set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<Enter>" \
"call urlview to extract URLs out of a message"
macro generic "<esc>1" ":set from=karaluch45@gmail.com realname='Debian_Server'"
# Show documentation when pressing F1
macro generic,pager <F1> "<shell-escape> zcat /usr/share/doc/mutt/manual.txt.gz | sensible-pager<enter>" "show Mutt documentation"
# show the incoming mailboxes list (just like "mutt -y") and back when pressing "y"
# note: these macros have been subsumed by the <browse-mailboxes> function.
# macro index y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list"
# macro pager y "<exit><change-folder>?<toggle-mailboxes>" "show incoming mailboxes list"
bind browser y exit
# Handler for gzip compressed mailboxes
# open-hook   '\.gz$'  "gzip -cd  '%f' >  '%t'"
# close-hook  '\.gz$'  "gzip -c   '%t' >  '%f'"
# append-hook '\.gz$'  "gzip -c   '%t' >> '%f'"
# If Mutt is unable to determine your site's domain name correctly, you can
# set the default here. (better: fix /etc/mailname)
#
# set hostname=cs.hmc.edu
# If your sendmail supports the -B8BITMIME flag, enable the following
#
# set use_8bitmime
# Use mime.types to look up handlers for application/octet-stream. Can
# be undone with unmime_lookup.
mime_lookup application/octet-stream
# Upgrade the progress counter every 250ms, good for mutt over SSH
# see http://bugs.debian.org/537746
set time_inc=250
# Allow mutt to understand References, Cc and In-Reply-To as headers in mailto:
mailto_allow = cc in-reply-to references 
## *** DEFAULT SETTINGS FOR THE ATTACHMENTS PATCH ***
## Please see the manual (section "attachments")  for detailed
## documentation of the "attachments" command.
## Removing a pattern from a list removes that pattern literally. It
## does not remove any type matching the pattern.
##  attachments   +A */.*
##  attachments   +A image/jpeg
##  unattachments +A */.*
## This leaves "attached" image/jpeg files on the allowed attachments
## list. It does not remove all items, as you might expect, because the
## second */.* is not a matching expression at this time.
## Remember: "unattachments" only undoes what "attachments" has done!
## It does not trigger any matching on actual messages.
## Qualify any MIME part with an "attachment" disposition, EXCEPT for
## text/x-vcard and application/pgp parts. (PGP parts are already known
## to mutt, and can be searched for with ~g, ~G, and ~k.)
##
## I've added x-pkcs7 to this, since it functions (for S/MIME)
## analogously to PGP signature attachments. S/MIME isn't supported
## in a stock mutt build, but we can still treat it specially here.
attachments   +A */.*
attachments   -A text/x-vcard application/pgp.*
attachments   -A application/x-pkcs7-.*
## Discount all MIME parts with an "inline" disposition, unless they're
## text/plain. (Why inline a text/plain part unless it's external to the
## message flow?)
attachments   +I text/plain
## These two lines make Mutt qualify MIME containers.  (So, for example,
## a message/rfc822 forward will count as an attachment.)  The first
## line is unnecessary if you already have "attach-allow */.*", of
## course.  These are off by default!  The MIME elements contained
## within a message/* or multipart/* are still examined, even if the
## containers themselves don't qualify.
#attachments  +A message/.* multipart/.*
#attachments  +I message/.* multipart/.*
## You probably don't really care to know about deleted attachments.
attachments   -A message/external-body
attachments   -I message/external-body
# See /usr/share/doc/mutt/README.Debian for details.
source /usr/lib/mutt/source-muttrc.d| 

Będę wdzięczny za wszelką pomoc.
Ostatnio zmieniony 06 września 2022, 08:55 przez LordRuthwen, łącznie zmieniany 1 raz.
Powód: używaj znaczników CODE
Awatar użytkownika
LordRuthwen
Moderator
Posty: 2302
Rejestracja: 18 września 2009, 21:45
Lokalizacja: klikash?

Re: Poczta debian z konsoli - Problem

Post autor: LordRuthwen »

A jakiś verbose się da włączyć?
azaz1
Posty: 9
Rejestracja: 11 sierpnia 2011, 11:43

Re: Poczta debian z konsoli - Problem

Post autor: azaz1 »

Przepraszam.
Awatar użytkownika
marcin1982
Moderator
Posty: 1730
Rejestracja: 05 maja 2011, 12:59
Lokalizacja: Zagłębie Dąbrowskie

Re: Poczta debian z konsoli - Problem

Post autor: marcin1982 »

Debian11 i wszystko działało idealne do czerwca z pocztą Gmail aż podobno wyłączyli obsługę SMTP
Nie SMTP wyłączyli, tylko generowanie haseł dla "mniej bezpiecznych" aplikacji, które nie obsługują OAuth. Hasła można dalej generować, ale trzeba włączyć weryfikację dwuetapową na koncie GMail.

Po drugie, odnośnie esmtprc:
starttls required
Jeśli starttls to sprawdź z portem 587.
mes mariusz
Posty: 19
Rejestracja: 19 czerwca 2014, 12:53

Re: Poczta debian z konsoli - Problem

Post autor: mes mariusz »

I jak? Zadziałało Wam wysyłanie poczty mutt-em przez interię?

Mi ruszyć nie chce:

Kod: Zaznacz cały

# echo "E-mail content" | mutt -s "Subject" moj.mail@gmail.com
Połączenie z interia.pl (Przerwane wywołanie systemowe) nie zostało ustanowione.
muttrc:

Kod: Zaznacz cały

set imap_user = "nasza.nazwa@interia.pl"
set imap_pass = "nasze.haslo"
set smtp_url = "smtp://nasza.nazwa@interia.pl:587/"
set smtp_pass = "nasze.haslo"
set from = "nasza.nazwa@interia.pl"
set realname = "nasza.nazwa@interia.pl"
set folder = "imaps://poczta.interia.pl:993"
set spoolfile = "+INBOX"
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
set move = no
Jakiś pomysł ?
Awatar użytkownika
LordRuthwen
Moderator
Posty: 2302
Rejestracja: 18 września 2009, 21:45
Lokalizacja: klikash?

Re: Poczta debian z konsoli - Problem

Post autor: LordRuthwen »

A masz włączone w ustawieniach konta logowanie klientem? W Interiowej poczcie zewnętrzne klienty (nie ich webmail) trzeba ręcznie włączyć.
ODPOWIEDZ