LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-19-2017, 05:33 AM   #1
kryspek
LQ Newbie
 
Registered: Apr 2017
Posts: 8

Rep: Reputation: Disabled
Exclamation Postfix Mail Relay Server with HA for ISP


Hello,
I'm completely new to this whole story with Relay servers, I've been given task to set up Open source relay server with high authority. The scenario is:
Isp that im currently working with wants a separate server to forward emails to it's destination. Mainly used for printers etc to send out notifications to users. Mail server is currently set up on a different server, running office 365. It has to be an Open Relay, I've been looking through many sources and still can't get the whole understanding of it.

My question is how to set up Postfix on Ubuntu to act as ONLY open relay server on a separate server, and from my understanding how to point the Server 1 Office 365 to send mail through the relay server, which then will deliver mail to it's destination. I know Open relay is bad for spammers, but i believe there's settings in postfix to allow what networks are allowed to relay emails through it.

Need more information? Feel free to ask me!
Thanks for help!
 
Old 04-19-2017, 07:46 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,240

Rep: Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408
So what have you tried so far?
 
Old 04-19-2017, 09:20 AM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by kryspek View Post
My question is how to set up Postfix on Ubuntu to act as ONLY open relay server on a separate server, and from my understanding how to point the Server 1 Office 365 to send mail through the relay server, which then will deliver mail to it's destination. I know Open relay is bad for spammers, but i believe there's settings in postfix to allow what networks are allowed to relay emails through it.
https://help.ubuntu.com/community/Postfix < -- start here.

Ask away.
 
1 members found this post helpful.
Old 04-19-2017, 09:54 AM   #4
kryspek
LQ Newbie
 
Registered: Apr 2017
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
https://help.ubuntu.com/community/Postfix < -- start here.

Ask away.
Thank you very much for this link! Haven't came across it yet! It will come in very handy!

Iv'e set up before Postfix to relay email through gmail, with spamassassin and GUI Webmin to try understand this whole thing, I've came across this page also, https://nacko.net/creating-an-outgoi...-spamassassin/
Quote:
7) Later on, we’ll be setting up some real email addresses to map to virtual host names. To prepare for this, add this line to the end of the file.
virtual_alias_maps = hash:/etc/postfix/virtual


In /etc/postfix/virtual, we want to define our real email addresses. We recommend setting up at least these three.
postmaster admin@yourdomain.com
abuse admin@yourdomain.com
root admin@yourdomain.com
I'm struggling to understand this part, any other tutorial i have read, always specified relayhost = and then specified the login and the password for that email service, and in this tutorial above he doesn't do anything like that but does Virtual Host Maps where any other previous tutorial hasn't. Also have been chatting with my coli and said i won't be touching the main server where the SMTP is located, which it put me off tracks, because i thought i will have to provide some sort of login and password from that mail server into the second server which is the Relay Server.
Thanks!


//Edit

What domains to receive mail for <-- Virtual maps?
If thats the case how to configure Virtual Alias Maps to accept any email form any user on any domain?
Thanks

Last edited by kryspek; 04-19-2017 at 11:18 AM.
 
Old 04-19-2017, 11:13 AM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Here's what I suggest:
Read twice the Configuration section at https://help.ubuntu.com/community/Postfix#Configuration
Relay_host values can be compared to a working host's configuration using
Code:
postconf -d
on an existing postfix server.

I don't have the focus right now for this, sorry.
Here's some self-paced instruction material.
https://www.google.com/search?q=postfix+to+office+365

Using Office 365 as a Smart Host with Postfix


Good Luck.
 
1 members found this post helpful.
Old 04-23-2017, 08:24 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 24,197

Rep: Reputation: 7127Reputation: 7127Reputation: 7127Reputation: 7127Reputation: 7127Reputation: 7127Reputation: 7127Reputation: 7127Reputation: 7127Reputation: 7127Reputation: 7127
Quote:
Originally Posted by kryspek View Post
Thank you very much for this link! Haven't came across it yet! It will come in very handy!
Iv'e set up before Postfix to relay email through gmail, with spamassassin and GUI Webmin to try understand this whole thing, I've came across this page also, https://nacko.net/creating-an-outgoi...-spamassassin/

I'm struggling to understand this part, any other tutorial i have read, always specified relayhost = and then specified the login and the password for that email service, and in this tutorial above he doesn't do anything like that but does Virtual Host Maps where any other previous tutorial hasn't. Also have been chatting with my coli and said i won't be touching the main server where the SMTP is located, which it put me off tracks, because i thought i will have to provide some sort of login and password from that mail server into the second server which is the Relay Server.

//Edit

What domains to receive mail for <-- Virtual maps? If thats the case how to configure Virtual Alias Maps to accept any email form any user on any domain?
Don't know why you're doing anything with virtual alias maps or anything else. If you want an open relay, a basic install of Postfix gets you 90% there. The documentation (that you were linked to before), tells you how to do this: http://www.postfix.org/BASIC_CONFIGU...tml#relay_from

Put whatever networks/addresses you want to relay mail for into the mynetworks line in main.cf, either for whole subnets or individual hosts...it explains both.
 
Old 04-25-2017, 12:04 PM   #7
schnappi
Member
 
Registered: Apr 2017
Posts: 52

Rep: Reputation: 3
Postfix relay:

Append postfix/main.cf with (ignore three smtp_sasl options if want open relay)

[CODE]
Code:
relayhost = smtp-relay-server.hostname:port
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_use_tls = yes
smtpd_tls_cert_file= file
smtpd_tls_key_file= file
smtp_tls_CAfile = file
Create/ edit postfix/sasl_passwd (if want authentication) with

Code:
smtp-relay-server.hostname:port username:password
Run

Code:
postmap postfix/sasl_passwd
&
Code:
service postfix restart

Last edited by schnappi; 04-25-2017 at 12:06 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix Mail Relay Server harsha.s.aryan@gmail.com Linux - Server 4 11-03-2015 01:48 AM
Postfix relay to ISP's auth smtp server henkie32 Linux - Server 5 08-30-2012 03:20 AM
Postfix Mail server to relay mail for dynamic IP clients seventy-7 Linux - Server 2 01-28-2009 02:59 AM
Using sendmail to relay mail to ISP mail server Swift&Smart Linux - Software 26 11-09-2008 03:00 PM
How to setup Mail Relay server on SUSE Linux ES9 using Postfix 2.1.2 su-se Linux - Newbie 10 09-12-2008 04:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration