Un utente ha chiesto informazioni su Postie di Wordpress

Postie non si collegherà a Gmail

Un utente ha chiesto 👇

Di recente ho spostato il mio sito Web da un server di hosting nel mio seminterrato a un server cloud di Google. Il server è un piccolo server con gli ultimi 7 centesimi di wordpress e gli ultimi postie.
Dopo che il sito è stato sui server cloud di google / computing per alcuni giorni, ho notato che postie non recuperava le email.
Sì, ho seguito tutte le domande frequenti e le istruzioni per la configurazione del mio account Gmail.
compresi i suggerimenti qui: http://postieplugin.com/postie-gmail/
Ottengo il seguente errore:

FAI UN POP SOP IN PRESENTAZIONE DA Gmail
getemails: connettiti a pop.gmail.com:995 (pop3-ssl)
getemails: procol: pop3-ssl
pConnessione: casella di posta: INBOX
Collegamento tramite presa
Socket: tls: //pop.gmail.com: 995
Errore socket: 13 – Autorizzazione negata
getemails: errore di connessione al server Autorizzazione negata
Ci sono 0 messaggi da elaborare

Dalla console posso eseguire:

socat – OPENSSL: pop.gmail.com: 995
USA Username@gmail.com
PASS password

Il server si connette alla mia casella di posta, ma postie continua a fornire l’errore precedente. qualche indizio su cosa c’è che non va? Cosa posso fornire per aiutare con la diagnosi?

Questo argomento è stato modificato 1 anno, 11 mesi fa da. Questo argomento è stato modificato 1 anno, 11 mesi fa da.

(@rapitharian)

1 anno, 11 mesi fa

Ho fatto alcuni test extra e ho scoperto quando ho eseguito il comando socat di seguito dalla CLI del server che posso elencare il numero di messaggi nel mio account di posta elettronica.

socat – OPENSSL:pop.gmail.com:995
  USER Username@gmail.com
  PASS Password
  List
  quit

Ma, quando provo a connettermi con Postie, trovo ancora quanto segue:

Postie Configuration Test
OS: Linux web 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019 x86_64
PHP Version: 7.3.3
PHP error_log: 
PHP log_errors: On
PHP get_temp_dir: /tmp/
PHP cURL version: 7.64.0
MySQL Version: 5.5.60
WordPress Version: 5.1
WordPress Singlesite
WP_TEMP_DIR: (none)
WP_HOME: (none)
home_url(): http://www.WEBSITE.COM
WP_SITEURL: (none)
site_url(): https://www.WEBSITE.COM
WP_DEBUG: Off
WP_DEBUG_DISPLAY: On
WP_DEBUG_LOG: Off
WP_MAX_MEMORY_LIMIT: 256M (default)
WP_MEMORY_LIMIT: 40M
imagick version: 
gd version: 
image editor not supported: WP_Image_Editor_Imagick
image editor not supported: WP_Image_Editor_GD
Registered image sizes
image memory limit: 256M
DISABLE_WP_CRON: Off
ALTERNATE_WP_CRON: Off
WP_CRON_LOCK_TIMEOUT: 60
iconv: present
Active plugins
Postie is in /var/www/html/WEBSITE/wp-content/plugins/postie/
Postie Version: 1.9.32
POSTIE_DEBUG: Off

Clock
This shows what time it would be if you posted right now
Wordpress timezone: America/New_York (-4)
Current time: 2019-03-10 20:52:32
Current time (gmt): 2019-03-11 00:52:32
Postie time correction: -4
Post time: 2019-03-10 20:52:32

Encoding
default_charset: UTF-8
DB_CHARSET: utf8
DB_COLLATE: database default
WordPress encoding: UTF-8
Connect to Mail Host
Postie connection: sockets
Postie protocol: pop3-ssl
Postie server: pop.gmail.com
Postie port: 995
Unable to connect. The server said:
There was an error connecting to the server Permission denied

Qualche suggerimento che potrebbe impedire a un postino di connettersi?

Ecco le mie informazioni di debug:

Starting mail fetch
WordPress datetime: 2019-03-10 21:08:23
doing postie_session_start
wp_content_path: /var/www/html/WEBSITE/wp-content
OS: Linux web02 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019 x86_64
PHP Version: 7.3.3
PHP error_log: 
PHP log_errors: On
PHP get_temp_dir: /tmp/
PHP cURL version: 7.64.0
MySQL Version: 5.5.60
WordPress Version: 5.1
WordPress Singlesite
WP_TEMP_DIR: (none)
WP_HOME: (none)
home_url(): http://www.WEBSITE.COM
WP_SITEURL: (none)
site_url(): https://www.WEBSITE.COM
WP_DEBUG: Off
WP_DEBUG_DISPLAY: On
WP_DEBUG_LOG: Off
WP_MAX_MEMORY_LIMIT: 256M (default)
WP_MEMORY_LIMIT: 40M
imagick version: 
gd version: 
image editor not supported: WP_Image_Editor_Imagick
image editor not supported: WP_Image_Editor_GD
Registered image sizes

Array
(
    [0] => thumbnail
    [1] => medium
    [2] => medium_large
    [3] => large
    [4] => portfolio-full
    [5] => portfolio-one
    [6] => portfolio-two
    [7] => portfolio-three
    [8] => portfolio-five
    [9] => blog-large
    [10] => blog-medium
    [11] => recent-posts
    [12] => recent-works-thumbnail
    [13] => 200
    [14] => 400
    [15] => 600
    [16] => 800
    [17] => 1200
)

No registered filters for image_downsize
No registered filters for wp_handle_upload
No registered filters for wp_get_attachment_thumb_file
No registered filters for wp_handle_upload_prefilter
No registered filters for wp_handle_sideload_prefilter
No registered filters for pre_move_uploaded_file
image memory limit: 256M
DISABLE_WP_CRON: Off
ALTERNATE_WP_CRON: Off
WP_CRON_LOCK_TIMEOUT: 60
iconv: present
Active plugins

Array
(
    [0] => fusion-builder/fusion-builder.php
    [1] => fusion-core/fusion-core.php
    [2] => postie/postie.php
    [3] => username-changer/username-changer.php
)

Postie is in /var/www/html/WEBSITE/wp-content/plugins/postie/
Postie Version: 1.9.32
POSTIE_DEBUG: On
No registered filters for postie_filter_email
No registered filters for postie_filter_email2
No registered filters for postie_filter_email3
No registered filters for postie_author
No registered filters for postie_post_before
No registered filters for postie_post_after
No registered filters for postie_file_added
No registered filters for postie_gallery
No registered filters for postie_comment_before
No registered filters for postie_comment_after
No registered filters for postie_category_default
Registered filters for postie_log_debug
Registered filters for postie_log_error
No registered filters for postie_session_start
No registered filters for postie_session_end
No registered filters for postie_preconnect
No registered filters for postie_post_pre
No registered filters for postie_email_reject_recipients
No registered filters for postie_email_notify_recipients
No registered filters for postie_email_reject_subject
No registered filters for postie_email_notify_subject
No registered filters for postie_email_reject_body
No registered filters for postie_place_media
No registered filters for postie_place_media_before
No registered filters for postie_place_media_after
No registered filters for postie_raw
No registered filters for postie_bare_link
No registered filters for postie_category
No registered filters for postie_file_added_pre
No registered filters for postie_include_attachment
memory at start of email processing: 45215048
MAKE SURE POP IS TURNED ON IN SETTING AT Gmail
getemails: Connecting to pop.gmail.com:995 (pop3-ssl)
getemails: procol: pop3-ssl
pConnection: mailbox: INBOX
Connecting via Socket
Socket: tls://pop.gmail.com:995
Socket error: 13 - Permission denied ()
getemails: There was an error connecting to the server Permission denied
There are 0 messages to process

Array
(
    [add_meta] => no
    [admin_username] => superuberuser
    [allow_html_in_body] => 1
    [allow_html_in_subject] => 1
    [allow_subject_in_mail] => 1
    [audiotemplate] => <a href="{FILELINK}">{FILENAME}</a>
    [audiotypes] => Array
        (
            [0] => m4a
            [1] => mp3
            [2] => ogg
            [3] => wav
            [4] => mpeg
        )

    [authorized_addresses] => Array
        (
            [0] => NJ@emails.nixle.com
            [1] => NJSP@emails.nixle.com
        )

    [banned_files_list] => Array
        (
        )

    [confirmation_email] => 
    [convertnewline] => 0
    [converturls] => 1
    [custom_image_field] => 0
    [default_post_category] => 4
    [category_match] => 1
    [default_post_tags] => Array
        (
        )

    [default_title] => Live From The Field
    [delete_mail_after_processing] => 1
    [drop_signature] => 1
    [filternewlines] => 1
    [forward_rejected_mail] => 1
    [icon_set] => silver
    [icon_size] => 32
    [auto_gallery] => 0
    [image_new_window] => 
    [image_placeholder] => #img%#
    [images_append] => 1
    [imagetemplate] => <a href="{PAGELINK}"><img src="{MEDIUM}" alt="{CAPTION}" width="{MEDIUMWIDTH}" height="{MEDIUMHEIGHT}" class="alignnone size-medium wp-image-{ID}" /></a>
    [imagetemplates] => Array
        (
            [simple_link] => <a href="{FILELINK}">{FILENAME}</a>
            [no_wrappers] => <a href="{IMAGE}"><img src="{THUMBNAIL}" alt="{CAPTION}" title="{CAPTION}" class="attachment" /></a>
            [wordpress_default] => <a href="{PAGELINK}"><img src="{MEDIUM}" alt="{CAPTION}" width="{MEDIUMWIDTH}" height="{MEDIUMHEIGHT}" class="alignnone size-medium wp-image-{ID}" /></a>
            [thumbnail_left] => <div style="float:left;margin-right:10px;"><a href="{IMAGE}"><img src="{THUMBNAIL}" alt="{CAPTION}" title="{CAPTION}" class="attachment" /></a></div>
            [thumbnail_right] => <div style="float:right;margin-left:10px;"><a href="{IMAGE}"><img src="{THUMBNAIL}" alt="{CAPTION}" title="{CAPTION}" class="attachment" /></a></div>
            [robert_felty] => <div style="margin-right:10px;background:black;color:white;padding:2px; width:{MEDIUMWIDTH};float:left"><a href="{IMAGE}"><img src="{MEDIUM}" alt="{CAPTION}" title="{CAPTION}" class="attachment" /></a><div style="padding:.2em;text-align:left">{CAPTION}</div></div>
            [postie_legacy] => <div class="postie-image-div"><a href="{IMAGE}"><img src="{THUMBNAIL}" alt="{FILENAME}" title="{FILENAME}" style="border:none" class="postie-image" /></a></div>
            [custom] => 
        )

    [input_protocol] => pop3-ssl
    [input_connection] => sockets
    [interval] => fiveminutes
    [mail_server] => pop.gmail.com
    [mail_server_port] => 995
    [mail_userid] => EmailAddress@gmail.com
    [maxemails] => 0
    [message_start] => :start
    [message_end] => :end
    [message_encoding] => UTF-8
    [message_dequote] => 1
    [post_status] => publish
    [prefer_text_type] => html
    [return_to_sender] => 0
    [role_access] => Array
        (
            [editor] => 1
        )

    [selected_audiotemplate] => simple_link
    [selected_imagetemplate] => wordpress_default
    [selected_video1template] => vshortcode
    [selected_video2template] => simple_link
    [shortcode] => 
    [sig_pattern_list] => Array
        (
            [0] => --s?[rn]?
            [1] => --s
            [2] => --
            [3] => ---
        )

    [smtp] => Array
        (
        )

    [start_image_count_at_zero] => 0
    [supported_file_types] => Array
        (
            [0] => application
        )

    [turn_authorization_off] => 0
    [time_offset] => -4
    [video1template] => 
    [video1types] => Array
        (
            [0] => mp4
            [1] => mpeg4
            [2] => 3gp
            [3] => 3gpp
            [4] => 3gpp2
            [5] => 3gp2
            [6] => mov
            [7] => mpeg
            [8] => quicktime
        )

    [video2template] => <a href="{FILELINK}">{FILENAME}</a>
    [video2types] => Array
        (
            [0] => x-flv
        )

    [video1templates] => Array
        (
            [simple_link] => <a href="{FILELINK}">{FILENAME}</a>
            [small] => <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="128"height="96"> <param name="src" value="{FILELINK}" /> <param name="autoplay" value="no" /> <param name="controller" value="true" /> <embed src="{FILELINK}" width="128" height="96"autoplay="no" controller="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" width="128" height="110" scale="tofit"></embed> </object>
            [medium] => <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="320"height="240"> <param name="src" value="{FILELINK}" /> <param name="autoplay" value="no" /> <param name="controller" value="true" /> <embed src="{FILELINK}" width="320" height="240"autoplay="no" controller="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" width="320" height="260" scale="tofit"></embed> </object>
            [medium_widescreen] => <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="480"height="270"> <param name="src" value="{FILELINK}" /> <param name="autoplay" value="no" /> <param name="controller" value="true" /> <embed src="{FILELINK}" width="480" height="270"autoplay="no" controller="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" width="480" height="290" scale="tofit"></embed> </object>
            [large] => <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="480"height="360"> <param name="src" value="{FILELINK}" /> <param name="autoplay" value="no" /> <param name="controller" value="true" /> <embed src="{FILELINK}" width="480" height="360"autoplay="no" controller="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" width="480" height="380" scale="tofit"></embed> </object>
            [large_widescreen] => <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="640"height="360"> <param name="src" value="{FILELINK}" /> <param name="autoplay" value="no" /> <param name="controller" value="true" /> <embed src="{FILELINK}" width="640" height="360"autoplay="no" controller="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" width="640" height="380" scale="tofit"></embed> </object>
            [vshortcode] => 
            [custom] => 
        )

    [video2templates] => Array
        (
            [simple_link] => <a href="{FILELINK}">{FILENAME}</a>
            [small] => <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="128"height="96"> <param name="src" value="{FILELINK}" /> <param name="autoplay" value="no" /> <param name="controller" value="true" /> <embed src="{FILELINK}" width="128" height="96"autoplay="no" controller="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" width="128" height="110"></embed> </object>
            [medium] => <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="320"height="240"> <param name="src" value="{FILELINK}" /> <param name="autoplay" value="no" /> <param name="controller" value="true" /> <embed src="{FILELINK}" width="320" height="240"autoplay="no" controller="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" width="320" height="260"></embed> </object>
            [medium_widescreen] => <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="480"height="270"> <param name="src" value="{FILELINK}" /> <param name="autoplay" value="no" /> <param name="controller" value="true" /> <embed src="{FILELINK}" width="480" height="270"autoplay="no" controller="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" width="480" height="290"></embed> </object>
            [large] => <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="480"height="360"> <param name="src" value="{FILELINK}" /> <param name="autoplay" value="no" /> <param name="controller" value="true" /> <embed src="{FILELINK}" width="480" height="360"autoplay="no" controller="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" width="480" height="380"></embed> </object>
            [large_widescreen] => <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="640"height="360"> <param name="src" value="{FILELINK}" /> <param name="autoplay" value="no" /> <param name="controller" value="true" /> <embed src="{FILELINK}" width="640" height="360"autoplay="no" controller="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" width="640" height="380"></embed> </object>
            [flv_embed] => [flv:{FILELINK} 480 270]
            [custom] => 
        )

    [wrap_pre] => no
    [featured_image] => 0
    [include_featured_image] => 1
    [email_tls] => 
    [post_format] => standard
    [post_type] => post
    [generaltemplates] => Array
        (
            [postie_default] => <a href="{FILELINK}">{ICON} {FILENAME}</a>
            [simple_link] => <a href="{FILELINK}">{FILENAME}</a>
            [custom] => 
        )

    [generaltemplate] => <a href="{FILELINK}">{ICON} {FILENAME}</a>
    [selected_generaltemplate] => postie_default
    [generate_thumbnails] => 1
    [reply_as_comment] => 1
    [force_user_login] => 0
    [auto_gallery_link] => Default
    [ignore_mail_state] => 
    [strip_reply] => 1
    [postie_log_error] => 1
    [postie_log_debug] => 0
    [category_colon] => 1
    [category_dash] => 1
    [category_bracket] => 1
    [prefer_text_convert] => 1
    [category_remove] => 1
    [ignore_email_date] => 0
    [use_time_offset] => 0
    [postie_log_error_notify] => (All Admins)
    [image_resize] => 1
)

Mail fetch complete, 0 emails
doing postie_session_end
memory at end of email processing: 45223992

Grazie in anticipo per l’aiuto.
Rap

Autore del plugin

(@ wayneallen-1)

1 anno, 11 mesi fa

Durante il test lo fai dallo stesso server che ospita il sito web? Cioè hai inserito ssh?
Eseguire il test dal tuo computer locale non ti darà davvero nulla.

Questa risposta è stata modificata 1 anno, 11 mesi fa da.

(@rapitharian)

1 anno, 11 mesi fa

Wayne Allen,
Sì, mi sono connesso al server tramite ssh e l’ho testato dal prompt dei comandi del server.
Proverò a rimuovere e reinstallare un postino per vedere se aiuta. Forse è stata una cattiva installazione del plugin?
-Rap

(@rapitharian)

1 anno, 11 mesi fa

Ok, nessuna rimozione del plugin rimosso e reinstallato. Stesso comportamento.
Ora proverò a riavviare il server per vedere se ciò farà qualcosa.
-Rap

(@rapitharian)

1 anno, 11 mesi fa

Il riavvio non ha aiutato.

Questo è quello che ho al prompt dei server quando provo e chiedo ssh.

[rapitharian@web02 ~]$ socat - OPENSSL:pop.gmail.com:995
+OK Gpop ready for requests from 35.211.101.203 w8mb247392852lji
USER UserName@gmail.com
+OK send PASS
PASS GmailPassword
+OK Welcome.
LIST
+OK 6 messages (87091 bytes)
1 13735
2 13666
3 13579
4 13134
5 15676
6 17301
.
quit

Fammi sapere cosa posso fare per aiutarti ad aiutarmi.

Wayne, tu sei lo sviluppatore; possiamo fare una sessione remota se aiuta. Posso configurare WebEx.

Sono in perdita totale. Potrei dover iniziare a scavare nei log del server. Penso quasi che abbia a che fare con PHP.

-Rap

(@rapitharian)

1 anno, 11 mesi fa

L’ho trovato nel mio /var/log/httpd/WEBSITE_error.log

[Tue Mar 12 20:49:48.649374 2019] [php7:warn] [pid 3404] [client 172.69.63.77:35528] PHP Warning:  stream_socket_client(): unable to connect to tls://pop.gmail.com:995 (Permission denied) in /var/www/html/WEBSITE/wp-content/plugins/postie/lib/pSocketConnection.php on line 37, referer: https://www.WEBSITE.COM/wp-cron.php?doing_wp_cron=1552438187.9988579750061035156250

[Tue Mar 12 20:49:48.649555 2019] [php7:notice] [pid 3404] [client 172.69.63.77:35528] Postie [error]: getemails: There was an error connecting to the server Permission denied, referer: https://www.WEBSITE.COM/wp-cron.php?doing_wp_cron=1552438187.9988579750061035156250

Non sono sicuro dell’importanza della riga 37 in pSocketConnection.php

-Rap

Autore del plugin

(@ wayneallen-1)

1 anno, 10 mesi fa

Hanno qualcosa a che fare con il tuo ambiente?

https://stackoverflow.com/questions/19666427/stream-socket-client-unable-to-connect-to-apple-apns-permission-denied
https://stackoverflow.com/questions/33951036/smtp-error-failed-to-connect-to-server-permission-denied-13

(@rapitharian)

1 anno, 10 mesi fa

Ottima chiamata su Wayne Allen!
Ho solo tempo per testare, ho iniziato con il primo collegamento.
Ho disabilitato selinux andando su vim / etc / selinux / config e impostato SELINUX = disabled.
Dopo il riavvio, Postie può connettersi a Gmail.

Successivamente, ho modificato nuovamente il valore in SELINUX = enforced e riavviato di nuovo.

Alla fine ho eseguito il comando: setsebool -P httpd_can_network_connect 1 Questo comando imposta vero httpd_can_network_connect e mi permette di continuare a usare SELINUX e usare Postie per i post.
Grazie per tutto l’aiuto.
Rap

Autore del plugin

(@ wayneallen-1)

1 anno, 10 mesi fa

Sono contento che abbia aiutato. Grazie per averci segnalato.

Was this helpful?

0 / 0

Lascia un commento 0

Your email address will not be published. Required fields are marked *