Postfix email not sending outbound mails. All mails are in que

Operating system:
OS version:
The operating system Ubuntu 18.04.5 LTS installed virtualmin . everything is fine . Hosted 2 sites by adding virtual server. The postfix was installed along with virtualmin . I can send mail internally (between the 2 hosted sites) and can receive mail from outside. All mail send to outside domains are in que. I have googled many articles realted to postfix and tried many buit still the issue was not sorted.
the status of mail in webmin is as below
|3FED07E1C8 |2020/11/16 10:42:28 AM |info@greatlakes-reinsurance.com |syednavas@gmail.com |977 bytes |connect to alt4.gmail-smtp-in.l.google.com[108.177.97.27]:25: Connection timed out|

Can anyone can support or help

IP address: 54.155.244.207
Domains hosted are as below

  1. nedloydelogistics.com
  2. greatlakes-reinsurance.com
    Kindly let me know what i have to do in config

What you must do on your server:

add to main.cf
sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost_maps

create file /etc/postfix/relayhost_maps and put into it:

@nedloydelogistics.com       [23.239.10.207]:587
@greatlakes-reinsurance.com      [23.239.10.207]:587

Then on the CLI:

postmap /etc/postfix/relayhost_maps
chown root:root /etc/postfix/relayhost_maps.db
chmod 400 /etc/postfix/relayhost_maps.db
service postfix reload

Set in DNS records for each domain (nedloydelogistics.com, greatlakes-reinsurance.com…)

txt
v=spf1 a mx ip4:23.239.10.207 ip6:2600:3c03::f03c:91ff:fe25:1d3b -all

txt
vps03._domainkey

"v=DKIM1; k=rsa; t=s; 
p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyi2/rIAkAUG9RKa"
"hOroX2kSt4nmBxkoK46QK6GnUKHi7nGcm9K5K77cdYsAM36oIGSuiHfyEz9wRbZ2c4KaM8/VfWXFO//cAHLLWiWSlh8I5hlRmkJx+Rko+CK1IbDmyh5Jfv0t"
"C1N89wALNrY/FIfCtSFk9iRKT8a3Rthsf/OCJNzpsY39kp20bHGW91nOCfGdjVY4+vFbcJKYVXqHSgQ7izqilp4HpypCLPXtpTcdhdK1eyoslNFJkVnBUjMnT/io"
"KXeqJhVQEyFuV3b7z4X+DMyUTg+p3JLt6R2fJYsRYxy+z9mUYI88PrUnmFuYoDxDYFrvG+S2d77hjpwVAnQIDAQAB"

And that is all. You will be able to create unlimited number of mailboxes under each domain and receive unlimited email but can send only 100 email per day.

Enjoy!

Thanks Mr calport,
The setting you have provided was done and the email service for both inbound and outbound works perfect. As its sending via ur smtp. Is my smtp configuration wrong or the AWS blocks 25 and 587 by default. I have allowed port 25 and 587 in security group in VPC and when testing using portforwarding tester online i can see 25 and 587 is open for mail.nedloydelogistics.com and other. so is it bcz of reverse DNS or SMTP blocked by AWS or my SMTP config in postfix.
Kindly help

I got the same problems, the only difference is self-hosting. I did open/allow port 25, 587 then checked with the port scan (canyouseeme, pentest-tools) and I could see ISP not blocking these ports, so I don’t know what wrong. Any suggestions guys? Wish someone could Teamviewer and check my setting.

I fixed my problem. Can i know where you hosted your server. mine was with AWS. Although while testing port 25 and 587, it seemed open for my server. But actually the outgoing mails was blocked by AWS. I requested to waive the restriction via the form in this page https://aws.amazon.com/premiumsupport/knowledge-center/ec2-port-25-throttle/. Once it was approved the mail start working. pls verify the DNS records for SPF, DKIM are proper

I hosted my server on my PC. I found that my ISP (Suddenlink) blocked the outbound port, and as you said “while testing port 25 and 587, it seemed open for my server. But actually the outgoing mails was blocked”. So in case, they not approved to unblock the outbound for these ports, what should I do next?

If its from ISP. there will be a SMTP of ISP (mail.yoursip.com and port) to be used while configuring outlook and other clients. Pls get that and assign in SMTP or else u can use third party SMTPs like sendgrid.com or Gmail

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.