Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Planet.nl mailserver using postfix as MTA
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Wilhelm
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2003
Posts: 149

PostPosted: Sun Feb 01, 2004 11:05 pm    Post subject: Planet.nl mailserver using postfix as MTA Reply with quote

Preface:

Hi all because this might be applicable to international users with ADSL who have their port 25 blocked i've written this in english.


Description:

After getting ADSL i was unable to communicate to the outside world using post 25 aka SMTP port. This has been done to stop spammers from sending email and protects you from receiving spam emails. This is called Spam-in and Spam-out.

Planet.nl has a solution to this problem for sendmail which i implemented in my postfix emailserver configuration after agonizing hours trying to fix my router or ethernet modem (which ofcourse was working 100% ok).


Solution:

To make your MTA accessible in and out you must set up 2 things.

- The modified DNS to make all incomming traffic go via mailrelay.planet.nl
- The email leaving your MTA must be forwarded to mail.planet.nl.

Adjust your DNS file

Code:

$ORIGIN         mydomain.com.
$TTL            86400
@               IN      SOA             ns.mydomain.com.  root.mydomain.com. (
                                                2004020101      ;serial
                                                1H              ;refresh
                                                15M             ;retry
                                                1W              ;expiry
                                                1D )            ;minimum

                IN      NS              ns.mydomain.com.
                IN      NS              ns1.mydomain.com.
                IN      MX      10      mail.mydomain.com.
                IN      MX      50      mailrelay.planet.nl.

ns              IN      A               123.123.123.123
ns1             IN      A               123.123.123.123
www             IN      A               123.123.123.123
imap            IN      A               123.123.123.123
smtp            IN      A               123.123.123.123
mail            IN      A               123.123.123.123
mail2           IN      A               123.123.123.123

<-- snip -->


Note that the mailrelay is set up as secondary mailserver. The primary email server will timeout and then the emails will go to the mailrelay and get forwarded to the primary one after the mailrelay has had a look at it. The mailrelay CAN access your port 25 and that's why it all works.


Then to make postfix relay the emails outbound one must add the following to their postfix/main.cf

Code:

# INTERNET OR INTRANET

# The relayhost parameter specifies the default host to send mail to
# when no entry is matched in the optional transport(5) table. When
# no relayhost is given, mail is routed directly to the destination.
#
# On an intranet, specify the organizational domain name. If your
# internal DNS uses no MX records, specify the name of the intranet
# gateway host instead.
#
# In the case of SMTP, specify a domain, host, host:port, [host]:port,
# [address] or [address]:port; the form [host] turns off MX lookups.
#
# If you're connected via UUCP, see also the default_transport parameter.
#
#relayhost = $mydomain
#relayhost = gateway.my.domain
#relayhost = uucphost
#relayhost = [an.ip.add.ress]
relayhost = mail.planet.nl



This forwards your email through planet.nl's mail server.


Hopefully somebody will find this useful.
Back to top
View user's profile Send private message
Braempje
l33t
l33t


Joined: 31 Jan 2003
Posts: 748

PostPosted: Mon Feb 02, 2004 7:53 am    Post subject: Reply with quote

@MODERATOR: move to tips & tricks, this is too good for just the dutch community :D
_________________
Dictionary of the Flemish Sign Language - Woordenboek Vlaamse Gebarentaal
Back to top
View user's profile Send private message
Wilhelm
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2003
Posts: 149

PostPosted: Mon Feb 02, 2004 8:07 pm    Post subject: Reply with quote

I know but this is specific to my dutch provider. However i don't know if other ISPs have mailrelays like mine does to redirect port 25 access.

The outgoing email part should work for anyone though.

Hopefully it might come in useful for other people.
Back to top
View user's profile Send private message
mach.82
Tux's lil' helper
Tux's lil' helper


Joined: 30 Oct 2003
Posts: 75
Location: 43°N/79°W

PostPosted: Tue Apr 13, 2004 12:48 am    Post subject: Reply with quote

I ran into this very same problem with sympatico.ca here in Canada. The simplest solution is to switch DSL provider.
Here I can recommend the following in Ontario, Canada:

www.kos.net; and
www.istop.com
Back to top
View user's profile Send private message
Wilhelm
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2003
Posts: 149

PostPosted: Mon Apr 25, 2005 3:24 pm    Post subject: Reply with quote

Another tip:

Create a postfix alias for port 25 since your users will end up on the mailserver of your ISP which sux bolocks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum