0

I try to add a email server on my raspberry (with a apache server already runing)

I Try a lot of things and conf for a while and it look like all mail are sent on port 25 even if the config si supposed to not use port 25

there is my main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Raspbian)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2



# TLS parameters
smtpd_tls_cert_file = /etc/letsencrypt/live/[url]/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/[url]/privkey.pem
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = [url]
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = [url], [url-backup] , localhost.localdomain, localhost
relayhost = 
mynetworks = 0.0.0.0/0, 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
home_mailbox = Maildir/

as you ca see there is a strange "mynetworks = 0.0.0.0/0," im not sure what is it but if i d'ont put this postfix return an error when i try to send a mail.

on master.cf i have changed these lines

587      inet  n       -       y       -       -       smtpd
submission inet n       -       y       -       -       smtpd

and i have these result on mailq

-Queue ID-  --Size-- ----Arrival Time---- -Sender/Recipient-------
91E3721F55D      401 Tue Jul  5 13:43:15  pi@Pi4Chou
  (connect to mailsec.protonmail.ch[176.119.200.129]:25: Connection timed out)
                                        jrmz@protonmail.com

5FA2821F55E      399 Tue Jul  5 13:56:03  pi@Pi4Chou
(connect to alt4.gmail-smtp-in.l.google.com[74.125.200.26]:25: Connection timed out)
                                        jrmouraz.jrm@gmail.com

-- 0 Kbytes in 2 Requests.

this is supposed to be a fast temporary solution, xd

i have try to test connection to imap.gmail.com with telnet and port 25 and this not works but it works on port 465

0 Answers0