I need help configuring postfix mail server within AWS


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat I need help configuring postfix mail server within AWS
# 1  
Old 10-10-2016
I need help configuring postfix mail server within AWS

I am trying to setup the postfix email server on Redhat Linux 6.5 running as an EC2 instance in AWS. I can do reverse port mapping to open a port
from our internal network to the AWS linux server, so we should be able to get to our mail server, even though it is a one way path from our internal
network to AWS. I just to figure out how to configure postfix to get to the open port for our network. This is from the /var/log/maillog file. I don't
know where it is getting the mail_smtp.domain.org or mail_smtp2.domain.org servers from. Could this be something that Amazon has configured?
Any help would be appreciated.

Code:
Oct 10 16:05:01 ip-10-1-84-36 postfix/qmgr[23601]: 1A865418A9: from=<oracle@ip-10-10-10.101.ec2.internal>, size=491, nrcpt=1 (queue active)
Oct 10 16:05:01 ip-10-1-84-36 postfix/qmgr[23601]: 1957E418AA: from=<oracle@ip-10-10-10.101.ec2.internal>, size=491, nrcpt=1 (queue active)
Oct 10 16:05:01 ip-10-1-84-36 postfix/qmgr[23601]: 17A38418AB: from=<oracle@ip-10-10-10.101.ec2.internal>, size=491, nrcpt=1 (queue active)
Oct 10 16:05:01 ip-10-1-84-36 postfix/qmgr[23601]: 1BBF9418A8: from=<root@ip-10-10-10.101.ec2.internal>, size=493, nrcpt=1 (queue active)
Oct 10 16:05:01 ip-10-1-84-36 postfix/qmgr[23601]: 7FFDD418AC: from=<oracle@ip-10-10-10.101.ec2.internal>, size=491, nrcpt=1 (queue active)
Oct 10 16:05:01 ip-10-1-84-36 postfix/qmgr[23601]: 30B5E418A5: from=<root@ip-10-10-10.101.ec2.internal>, size=493, nrcpt=1 (queue active)
Oct 10 16:05:31 ip-10-1-84-36 postfix/smtp[25102]: connect to mail_smtp.domain.org[10.10.20.102]:25: Connection timed out
Oct 10 16:05:31 ip-10-1-84-36 postfix/smtp[25103]: connect to mail_smtp.domain.org[10.10.20.102]:25: Connection timed out
Oct 10 16:05:31 ip-10-1-84-36 postfix/smtp[25106]: connect to mail_smtp.domain.org[10.10.20.102]:25: Connection timed out
Oct 10 16:05:31 ip-10-1-84-36 postfix/smtp[25104]: connect to mail_smtp.domain.org[10.10.20.102]:25: Connection timed out
Oct 10 16:05:31 ip-10-1-84-36 postfix/smtp[25105]: connect to mail_smtp.domain.org[10.10.20.102]:25: Connection timed out
Oct 10 16:06:01 ip-10-1-84-36 postfix/smtp[25102]: connect to mail_smtp2.domain.org[10.10.20.103]:25: Connection timed out
Oct 10 16:06:01 ip-10-1-84-36 postfix/smtp[25105]: connect to mail_smtp2.domain.org[10.10.20.103]:25: Connection timed out
Oct 10 16:06:01 ip-10-1-84-36 postfix/smtp[25106]: connect to mail_smtp2.domain.org[10.10.20.103]:25: Connection timed out
Oct 10 16:06:01 ip-10-1-84-36 postfix/smtp[25103]: connect to mail_smtp2.domain.org[10.10.20.103]:25: Connection timed out
Oct 10 16:06:01 ip-10-1-84-36 postfix/smtp[25104]: connect to mail_smtp2.domain.org[10.10.20.103]:25: Connection timed out
Oct 10 16:06:01 ip-10-1-84-36 postfix/smtp[25102]: 1A865418A9: to=<myemail@domain.org>, relay=none, delay=3780, delays=3720/0.02/60/0, dsn=4.4.1, 
status=deferred (connect to mail_smtp2.domain.org[10.10.20.103]:25: Connection timed out)
Oct 10 16:06:01 ip-10-1-84-36 postfix/smtp[25105]: 1BBF9418A8: to=<myemail@domain.org>, relay=none, delay=3794, delays=3734/0.04/60/0, dsn=4.4.1, 
status=deferred (connect to mail_smtp2.domain.org[10.10.20.103]:25: Connection timed out)
Oct 10 16:06:01 ip-10-1-84-36 postfix/smtp[25106]: 7FFDD418AC: to=<myemail@domain.org>, relay=none, delay=3332, delays=3272/0.04/60/0, dsn=4.4.1, 
status=deferred (connect to mail_smtp2.domain.org[10.10.20.103]:25: Connection timed out)
Oct 10 16:06:01 ip-10-1-84-36 postfix/smtp[25104]: 17A38418AB: to=<myemail@domain.org>, relay=none, delay=3407, delays=3347/0.03/60/0, dsn=4.4.1, 
status=deferred (connect to mail_smtp2.domain.org[10.10.20.103]:25: Connection timed out)
Oct 10 16:06:01 ip-10-1-84-36 postfix/smtp[25103]: 1957E418AA: to=<myemail@domain.org>, relay=none, delay=3705, delays=3645/0.02/60/0, dsn=4.4.1,
 status=deferred (connect to mail_smtp2.domain.org[10.10.20.103]:25: Connection timed out)
Oct 10 16:06:01 ip-10-1-84-36 postfix/error[25164]: 30B5E418A5: to=<myemail@domain.org>, relay=none, delay=6311, delays=6251/60/0/0, dsn=4.4.1, 
status=deferred (delivery temporarily suspended: connect to mail_smtp2.domain.org[10.10.20.103]:25: Connection timed out)
Oct 10 16:10:01 ip-10-1-84-36 postfix/qmgr[23601]: B5C6C40129: from=<oracle@ip-10-10-10.101.ec2.internal>, size=494, nrcpt=1 (queue active)
Oct 10 16:10:01 ip-10-1-84-36 postfix/qmgr[23601]: B8F1341884: from=<oracle@ip-10-10-10.101.ec2.internal>, size=491, nrcpt=1 (queue active)
Oct 10 16:10:01 ip-10-1-84-36 postfix/error[25266]: B5C6C40129: to=<myemail@domain.org>, relay=none, delay=23751, delays=23751/0.02/0/0.01, 
dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to mail_smtp2.domain.org[10.10.20.103]:25: Connection timed out)
Oct 10 16:10:01 ip-10-1-84-36 postfix/error[25267]: B8F1341884: to=<myemail@domain.org>, relay=none, delay=23715, delays=23715/0.02/0/0.01, 
dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to mail_smtp2.domain.org[10.10.20.103]:25: Connection timed out)
Oct 10 16:20:01 ip-10-1-84-36 postfix/qmgr[23601]: 4DB8A4189F: from=<oracle@ip-10-10-10.101.ec2.internal>, size=491, nrcpt=1 (queue active)

# 2  
Old 10-17-2016
Two things to check:

1) Did you configure postfix to listen on the correct IP in /etc/postfix/main.cf? inet_interfaces is probably the option you are looking for. you can see if postfix is listening with:
Code:
lsof -i :25

2) are you allowing inbound port 25 traffic in your ec2 security group?

Setting up a mail server is not easy. If you are interested in a guide to get all the necessary pieces set up, here is what I used. This guide is based on ubuntu, but I was able to get all of this working on a CentOS7 KVM instance that I then converted and is running in EC2. The only real bang-your-head-against-the-wall pieces with these instructions were getting clamav and spamassassin and their associated milters to work properly. Once that is all working, converting it to use mysql for passwords and accounts was fairly simple.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issues sending emails using PostFix Mail Server

I'm unable to send email from my Linux server despite SMTP port 25 Active and Listening. # hostname TechX I checked the mail log ( /var/log/maillog ) and found the below error. I'm sharing all the ".cf" files seen in the error log. 1. # more /etc/postfix/main.cf # postfix... (0 Replies)
Discussion started by: mohtashims
0 Replies

2. UNIX for Advanced & Expert Users

Need an help in configuring Postfix mail relay server

Hello, We have 2 servers, server A and Server B in same domain. I have already configured the Serevr A to send an email to the internet (outside domain) by opening the port 25 to the internet. Now I need to send an email to the outside domain from Server B using server A. I have opened the... (1 Reply)
Discussion started by: sathishbabu89
1 Replies

3. UNIX for Dummies Questions & Answers

Configuring mail to send email from server to client

Hi, I want to send an email from server to my gmail account for all critical messages reported in the server. Kindly help me in configuring the same. Regards Rochit (1 Reply)
Discussion started by: rochitsharma
1 Replies

4. UNIX for Dummies Questions & Answers

Please help with Postfix config issue - How to allow remote Exchange server to relay to my postfix

Hi guys One of our clients have a problem with sending email to a certain domain. No matter what we try, the mails just dont get delivered. What I did then, is created a new connector on their Exchange server, pointing all mail sent to their client at "domain1" to relay to our Postfix mail... (0 Replies)
Discussion started by: wbdevilliers
0 Replies

5. IP Networking

postfix - reinject mail to postfix from hold queue directory

hi all. Am using smtpd_recipient_restrictions & check_recipient_access in postfix. The hash file looks like this: emailaddress1 HOLD emailaddress2 HOLD The aim is to place email from these recipients in the hold directory,check them then reinject them back in postfix on some... (0 Replies)
Discussion started by: coolatt
0 Replies

6. Programming

Mail sending from VFP9 through internal postfix esmtp server.

hi all, please help me in this regard. I am VFP 9 programmer. I want to send the mail from within VFP 9 application. I have used CDO of microsoft which is working fine. however to be able to send the mail i have to setup the router gateway on user machine which enable him to surf through the... (0 Replies)
Discussion started by: choudharidl
0 Replies

7. Ubuntu

Reg:Postfix Mail Server

We have a redhat enterprise linux 4 server.we have configured postfix as our MTA.squirrel mail as webmail and apache is configured for webserver.We configured outlook as mail client.The mail server is working and our users ae saving a copy of mail in the linux server.Our problem is whenever the... (0 Replies)
Discussion started by: ramjimh
0 Replies

8. UNIX for Advanced & Expert Users

Configuring Linux box with the smtp mail server

Hi all, I was trying to configure SMTP server with my linux box. I made changes to the /etc/mail/sendmail.cf whereby editing the line DAEMON_OPTIONS(`Port=<port number>,Addr=<mail server name>, Name=MTA')dnl after this ive created a new sendmail.cf file by using the command m4... (4 Replies)
Discussion started by: amit_kv1983
4 Replies

9. UNIX for Dummies Questions & Answers

Configuring my PostFix Mail Server

Hi folks! I have a Postfix email server running on my MacOs x box. I would like to customize this automatic message to portuguese language: ============ This is the Postfix program at host myserver.com. I'm sorry to have to inform you that the message returned below could not... (4 Replies)
Discussion started by: fundidor
4 Replies
Login or Register to Ask a Question