Answer the question
In order to leave comments, you need to log in
Postfix emails are not sent (connection refused). Where to look for a problem?
Good day,
I've run into a problem that I can't find a solution for myself.
I have a dedicated virtual machine in the corporate network, LAMP is spinning on it. There was a need to send notifications by mail (only outgoing, incoming are not required), letters are generated using PHP via mail.
For these purposes installed postfix. Settings below.
I don’t see any problems with the local availability of the server, I can telnet on port 25 from another local machine without any problems
telnet localnetwork-ip 25
ehlo localhost
250-gnoc-ts
250-PIPELINING
250-ETRN
....
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
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
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ ssl-cert-snakeoil.key
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=gnoc-ts
alias_maps=hash:/etc/aliases
alias_database=hash:/etc/aliases
mydestination=_ALL_, gnoc-ts, gnocts, localhost.localdomain, localhost
relayhost=
mynetworks_style=10
mynetworks0=. 171.0/24, 127.0.0.0/8[::ffff:127.0.0.0]/104[::1]/128 mailbox_size_limit
= 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
<?php
$result = mail('[email protected]', 'subject', 'message');
if($result)
{
echo 'all the way';
}
else
{
echo 'something wrong';
}
?>
Feb 15 03:45:23 gnocts postfix/qmgr[3862]: 3C192618DB: from=, size=312, nrcpt=1 (queue active)
Feb 15 03:45:23 gnocts postfix/qmgr[3862]: 5E48B619AC: from= , size=312, nrcpt=1 (queue active)
Feb 15 03:45:23 gnocts postfix/smtp[6387]: connect to mx2.mts.ru[213.87.44.5]:25: Connection refused
Feb 15 03:45: 23 gnocts postfix/smtp[6387]: connect to mx4.mts.ru[213.87.44.6]:25: Connection refused
Feb 15 03:45:23 gnocts postfix/smtp[6388]: connect to mx2.mts.ru[213.87 .44.5]:25: Connection refused
Feb 15 03:45:23 gnocts postfix/smtp[6388]: connect to mx4.mts.ru[213.87.44.6]:25: Connection refused
Feb 15 03:45:23 gnocts postfix/smtp[6387]: 3C192618DB: to=, relay=none, delay=8757, delays=8757/0.01/0.01/0, dsn=4.4.1, status=deferred (connect to mx4.list.ru[213.87.44.6]:25: Connection refused)
Feb 15 03:45:23 gnocts postfix/smtp[6388]: 5E48B619AC: to=, relay=none, delay=8754, delays=8754/0.01/ 0.01/0, dsn=4.4.1, status=deferred (connect to mx4.list.ru[213.87.44.6]:25: Connection refused)
Feb 15 03:15:23 gnocts postfix/smtp[6227]: connect to mxs.mail.ru[217.69.139.150]:25: Connection refused
Feb 15 03:15:23 gnocts postfix/smtp[6227]: connect to mxs .mail.ru[94.100.180.150]:25: Connection refused
Feb 15 03:15:23 gnocts postfix/smtp[6227]: D23C1619AF: to=, relay=none, delay=2102, delays=2102/0.01/0.04/ 0, dsn=4.4.1, status=deferred (connect to mxs.mail.ru[94.100.180.150]:25: Connection refused)
Feb 15 03:15:23 gnocts postfix/qmgr[3862]: message repeated 3 times: [ D23C1619AF: from=, size=343, nrcpt=1 (queue active)]
Answer the question
In order to leave comments, you need to log in
Your e-mail server looks from the Internet, judging by the fact that it sends soap to external domains?
What is his address on the internet? Is there anything written in the reverse dns zone for this address? )) after all, the servers where your mail is directed may not take it into account or not the correct return address (domain in it) or the absence of records in the reverse dns zone for your white address of the mail server.
Send me mail to [email protected] THROUGH YOUR MAIL SERVER, I'll look at everything, just write from which address to expect it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question