ineffective to send out emails from my Linux Host. Below is the command I try :
echo "This is the message body and contains the message" | sudo mailx -v mypunnq@gmail.com -s "This is the subject"
or
mail -s "Test Subject" mypunnq@gmail.com < /home/system/mailbody.txt
end product :
Mail Delivery Status Report will be mailed to .
here is the Running serve.
$ ps -ef | grep postfix
postfix 2993 30866 0 19:15 ? 00:00:00 pickup -l -t unix -u
system 4399 594 0 19:28 pts/0 00:00:00 grep --color=auto postfix
root 30866 1 0 2020 ? 00:00:19 /usr/libexec/postfix/master -w
postfix 30868 30866 0 2020 ? 00:00:05 qmgr -l -t unix -u
here is the telnet showing port 25 is LISTENING on my system :
$ telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 efendibey_live.localdomain ESMTP Postfix
here is the end product of mailq
:
$ mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
AE3BF1FC5 606 Sun Feb 7 19:15:10 system@efendibey_live.localdomain
(connect to mx2.zoho.com[136.143.191.44]:25: Connection timed out)
mohtashim@digiklug.com
7410B47CA 602 Sun Feb 7 19:18:57 system@efendibey_live.localdomain
(delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[2404:6800:4003:c06::1a]:25: Network is unreachable)
mypunnq@gmail.com
3EC5F1EC2 474 Sun Feb 7 19:13:34 system@efendibey_live.localdomain
(connect to mx2.zoho.com[136.143.191.44]:25: Connection timed out)
mohtashim@digiklug.com
456251FC6 656 Sun Feb 7 19:18:04 system@efendibey_live.localdomain
(connect to mx2.zoho.com[136.143.191.44]:25: Connection timed out)
mohtashim@digiklug.com
1CB9D48FB 652 Sun Feb 7 19:20:04 system@efendibey_live.localdomain
(connect to alt2.gmail-smtp-in.l.google.com[2404:6800:4003:c06::1a]:25: Network is unreachable)
mypunnq@gmail.com
1FE9B450F 652 Sun Feb 7 19:19:45 system@efendibey_live.localdomain
(connect to alt2.gmail-smtp-in.l.google.com[2404:6800:4003:c06::1a]:25: Network is unreachable)
mypunnq@gmail.com
B180025B5 654 Sun Feb 7 19:25:25 root@efendibey_live.localdomain
(delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[2404:6800:4003:c06::1a]:25: Network is unreachable)
mypunnq@gmail.com
update :
The outbound port is besides capable and connect :
$ telnet gmail-smtp-in.l.google.com 25
Trying 108.177.119.26...
Connected to gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP g24si11485107edh.82 - gsmtp
once I fire the control to sent out an electronic mail I can see it in the mailQ
and then disappear from the Queue, however, I still do not receive the mail in my inbox .
[system@efendibey_live ~]$ echo "This is the message body and contains the message" | sudo mailx -v mohtashim@digiklug.com -s "This is the subject"
Mail Delivery Status Report will be mailed to .
[system@live ~]$ mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
3723C16BC* 658 Mon Feb 8 13:37:13 root@ebey_live.localdomain
mohtashim@digiklug.com
-- 1 Kbytes in 1 Request.
[system@live ~]$ mailq
Mail queue is empty
[system@live ~]$
The below is the output from tail -f /var/log/maillog
for a individual mail transport control.
Feb 8 15:29:43 Efendibey_Live postfix/pickup[10591]: E4F5F16A9: uid=0 from=
Feb 8 15:29:43 Efendibey_Live postfix/cleanup[18223]: E4F5F16A9: message-id=<20210208152943.E4F5F16A9@efendibey_live.localdomain>
Feb 8 15:29:43 Efendibey_Live postfix/qmgr[1193]: E4F5F16A9: from=, size=467, nrcpt=1 (queue active)
Feb 8 15:29:45 Efendibey_Live postfix/smtp[18225]: E4F5F16A9: to=, relay=mx.zoho.com[136.143.191.44]:25, delay=1.2, delays=0.03/0.01/0.67/0.51, dsn=5.7.1, status=bounced (host mx.zoho.com[136.143.191.44] said: 541 5.7.1 Mail rejected due to antispam policy (in reply to RCPT TO command))
Feb 8 15:29:45 Efendibey_Live postfix/cleanup[18223]: 468D216BC: message-id=<20210208152945.468D216BC@efendibey_live.localdomain>
Feb 8 15:29:45 Efendibey_Live postfix/qmgr[1193]: 468D216BC: from=<>, size=2472, nrcpt=1 (queue active)
Feb 8 15:29:45 Efendibey_Live postfix/bounce[18227]: E4F5F16A9: sender non-delivery notification: 468D216BC
Feb 8 15:29:45 Efendibey_Live postfix/qmgr[1193]: E4F5F16A9: removed
Feb 8 15:29:45 Efendibey_Live postfix/local[18228]: 468D216BC: to=, relay=local, delay=0.02, delays=0.01/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Feb 8 15:29:45 Efendibey_Live postfix/qmgr[1193]: 468D216BC: removed
I flush tried the -f legitimateemail@gmail.com
option in mailx
but still, no emails received .
here is my /etc/hosts
entry
# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1 guest
::1 guest
127.0.0.1 Efendibey_Live
::1 Efendibey_Live
Can you please suggest how can I get emails to work from my Linux horde ?