Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Postfix and Dovecot new mail setup not working

Posted on 2013-11-22
11
385 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
ID: 39670103
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
ID: 39670199
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
ID: 39670211
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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 57

Author Comment

by:Pete Long
ID: 39670230
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
ID: 39670242
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
 
LVL 57

Author Comment

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

Expert Comment

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

Author Comment

by:Pete Long
ID: 39670357
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
ID: 39670365
That makes it pretty difficult to run a mailserver.  Have you considered Google Apps or Office 365?
0
 
LVL 16

Expert Comment

by:Enphyniti
ID: 39670417
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
ID: 39679275
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Send email attachment to file folder 4 65
Thunderbird: Adding a signature to emails 2 53
smtp c source code 7 85
Ethical Phishing 4 67
The biggest nightmare for any Exchange Server Administrator is to keep the server running without any issue. But the problems often come and they need to be resolved efficiently and timely. Here are important troubleshooting points: Define the Pr…
Pegasus Mail (http://www.pmail.com/) is a donation ware that is a collaboration of David Harris along with his team members. It is a desktop mail client that offers the option of configuring more than one mail account with single set up. It supports…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

856 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