Solved

Postfix and Dovecot new mail setup not working

Posted on 2013-11-22
11
379 Views
Last Modified: 2013-11-26
Installed Postfix and Dovecot today, I'm receiving email fine but, I cannot send at all, no matter where I try and send an email to I get.........

Transaction failed
554 5.7.1 <email address@domain.com>: Relay access denied

I'm VERY weak with Linux - can someone give me some guidance

If I change the line in my /etc/postfix/main.cf to

mynetworks = localhost

Open in new window


Then it works, but my Outlook client stops being able to send and my iPhone does not work with my mail account.

Pete
0
Comment
Question by:Pete Long
  • 6
  • 5
11 Comments
 
LVL 16

Expert Comment

by:Enphyniti
Comment Utility
You probably want to define your networks manually.  Is the server on the same subnet as your outlook client?

At anyrate, if you're relaying for 'mynetworks' then 'mynetworks' has to contain the address info for everything you want to relay for.  You can enter this in class or host mode

mynetworks = 127.0.0.0/8, 192.168.0.0/28

etc...  try that and reload postfix
0
 
LVL 57

Author Comment

by:Pete Long
Comment Utility
I could enter 0.0.0.0/0 but I suspect then I suspect I would be an open relay?

There must be a way to only allow authenticated users to send/relay?

PL
0
 
LVL 57

Author Comment

by:Pete Long
Comment Utility
I could  be using any IP at any site - Outlook needs to be able to connect to and send via SMTP as does my iphone? I cant add every single IP address I might need to send from?
0
 
LVL 57

Author Comment

by:Pete Long
Comment Utility
0.0.0.0/0 works

It seems to ad authentication I need to add, to

smtpd_recipient_restrictions,

"permit_sasl_authenticated,reject_unauth_destination"

But thats not making any sense at the moment......................
0
 
LVL 16

Accepted Solution

by:
Enphyniti earned 500 total points
Comment Utility
Ah.  I gotcha.

Yeah, you don't want to set up an open relay.  What you are looking for is authentication via ESMTP or POP-before_SMTP.  With Pop-before-SMTP, essentially, IPs from which successful POP authentications are made are added to a short term relay list.  The duration is configurable.  It's been many years since I did it, but it worked okay.

I've never used ESMTP, but you might want to look into that first.

take a look at this link: http://wiki2.dovecot.org/HowTo/PopBSMTPAndDovecot
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 57

Author Comment

by:Pete Long
Comment Utility
I think this will de what I need http://www.postfix.org/SASL_README.html
0
 
LVL 16

Expert Comment

by:Enphyniti
Comment Utility
yeah that looks like it would work as well.
0
 
LVL 57

Author Comment

by:Pete Long
Comment Utility
it didn't - my lack of Linux knowledge is very frustrating I don't have a clue what I'm doing ;(
0
 
LVL 16

Expert Comment

by:Enphyniti
Comment Utility
That makes it pretty difficult to run a mailserver.  Have you considered Google Apps or Office 365?
0
 
LVL 16

Expert Comment

by:Enphyniti
Comment Utility
Sorry, I re-read that last post and realized it's not very helpful and comes off kind of rude.

I only mean to illustrate that getting a mailserver running is only part of maintaining one, and probably not even the most difficult part at that.  You're also on the hook for diagnosing and fixing it when it breaks, and knowing the signs of external intrusion and what do do about it.

Without a solid understanding of the underlying OS, you might be setting yourself up for some long and frustrating evenings of despair in the future.

I only mentioned the alternatives because they might be more practical for your situation.

On the other hand, if this is not a business/production system and you're just doing it to learn, then there's no better way to learn than by doing.

I would start with PopBSMTP since it is probably the easiest to implement even if it's not the "best" method out there.
0
 
LVL 57

Author Comment

by:Pete Long
Comment Utility
No offence taken M8 :)

>>>I only mean to illustrate that getting a mailserver running is only part of maintaining one, and probably not even the most difficult part at that.  You're also on the hook for diagnosing and fixing it when it breaks, and knowing the signs of external intrusion and what do do about it.

I agree, I look after a few hundred M$ Exchange Servers :)

It took me a while to get this problem sorted, but for the benefit of anyone else who finds this Q this is how I did it..................

Configure Postfix for SASL Authentication from Dovecot

Thanks for your help - I hope I can return the favor one day in one of my stronger TAs

Pete
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
The purpose of this video is to demonstrate how to set up a Mailchimp campaign. This will include styling and adding elements to a newsletter/email. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchim…
This Micro Tutorial will demonstrate the easy use of Gmail embedding images in your email so the recipient of your email can view them in context.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now